annotate libinterp/dldfcn/config-module.awk @ 19997:4f6ae6b94abe

make --enable-silent-rules configure option more useful * sparse-mx-ops: Rename from smx-ops. * genpropdoc.m: Write to stdout if filename is not supplied. * Makefile.am, build-aux/common.mk, doc/interpreter/Makefile.am, doc/interpreter/graphics_properties.mk, etc/icons/Makefile.am, libgui/Makefile.am, libinterp/Makefile.am, libinterp/corefcn/module.mk, libinterp/octave-value/module.mk, libinterp/operators/module.mk, libinterp/parse-tree/module.mk, liboctave/cruft/module.mk, liboctave/cruft/ranlib/module.mk, liboctave/cruft/slatec-fn/module.mk, liboctave/numeric/module.mk, liboctave/operators/module.mk, scripts/Makefile.am, scripts/java/module.mk, src/Makefile.am, test/Makefile.am: Preface rules with $(AM_V_GEN) or similar as needed. Improve consistency of rules. Prefer commands that write to stdout, redirecting output to $@-t, then moving to $@. * doc/interpreter/images.awk, libinterp/dldfcn/config-module.awk: Generate rules with $(AM_V_GEN).
author John W. Eaton <jwe@octave.org>
date Fri, 20 Feb 2015 17:18:19 -0500
parents 228cfaf24208
children 925fdd91abba
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9794
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
1 BEGIN {
13023
7d1e11d922aa maint: split fields correctly in config-module.awk script
John W. Eaton <jwe@octave.org>
parents: 13010
diff changeset
2 FS = "|";
7d1e11d922aa maint: split fields correctly in config-module.awk script
John W. Eaton <jwe@octave.org>
parents: 13010
diff changeset
3 nfiles = 0;
7d1e11d922aa maint: split fields correctly in config-module.awk script
John W. Eaton <jwe@octave.org>
parents: 13010
diff changeset
4
9794
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
5 print "## DO NOT EDIT -- generated from module-files by config-module.awk";
10449
e85fa73ac3a0 src/DLD-FUNCTIONS/config-module.awk: emit additions to EXTRA_DIST
John W. Eaton <jwe@octave.org>
parents: 9794
diff changeset
6 print ""
e85fa73ac3a0 src/DLD-FUNCTIONS/config-module.awk: emit additions to EXTRA_DIST
John W. Eaton <jwe@octave.org>
parents: 9794
diff changeset
7 print "EXTRA_DIST += \\"
15076
000587f92082 rename src/DLD-FUNCTIONS directory to src/dldfcn
John W. Eaton <jwe@octave.org>
parents: 15039
diff changeset
8 print " dldfcn/config-module.sh \\"
000587f92082 rename src/DLD-FUNCTIONS directory to src/dldfcn
John W. Eaton <jwe@octave.org>
parents: 15039
diff changeset
9 print " dldfcn/config-module.awk \\"
000587f92082 rename src/DLD-FUNCTIONS directory to src/dldfcn
John W. Eaton <jwe@octave.org>
parents: 15039
diff changeset
10 print " dldfcn/module-files \\"
000587f92082 rename src/DLD-FUNCTIONS directory to src/dldfcn
John W. Eaton <jwe@octave.org>
parents: 15039
diff changeset
11 print " dldfcn/oct-qhull.h"
10449
e85fa73ac3a0 src/DLD-FUNCTIONS/config-module.awk: emit additions to EXTRA_DIST
John W. Eaton <jwe@octave.org>
parents: 9794
diff changeset
12 print ""
13010
edc5ec6e949b maint: allow --enable-static --disable-dl to work again
John W. Eaton <jwe@octave.org>
parents: 12163
diff changeset
13 }
edc5ec6e949b maint: allow --enable-static --disable-dl to work again
John W. Eaton <jwe@octave.org>
parents: 12163
diff changeset
14 /^#.*/ { next; }
edc5ec6e949b maint: allow --enable-static --disable-dl to work again
John W. Eaton <jwe@octave.org>
parents: 12163
diff changeset
15 {
edc5ec6e949b maint: allow --enable-static --disable-dl to work again
John W. Eaton <jwe@octave.org>
parents: 12163
diff changeset
16 nfiles++;
13023
7d1e11d922aa maint: split fields correctly in config-module.awk script
John W. Eaton <jwe@octave.org>
parents: 13010
diff changeset
17 files[nfiles] = $1;
7d1e11d922aa maint: split fields correctly in config-module.awk script
John W. Eaton <jwe@octave.org>
parents: 13010
diff changeset
18 cppflags[nfiles] = $2;
7d1e11d922aa maint: split fields correctly in config-module.awk script
John W. Eaton <jwe@octave.org>
parents: 13010
diff changeset
19 ldflags[nfiles] = $3;
7d1e11d922aa maint: split fields correctly in config-module.awk script
John W. Eaton <jwe@octave.org>
parents: 13010
diff changeset
20 libraries[nfiles] = $4;
9794
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
21 } END {
12163
55ebf5df9ea6 Use Automake and GNU Make variables for increased portability in DLD-FUNCTIONS/*.oct creation
Rik <octave@nomad.inbox5.com>
parents: 12162
diff changeset
22 sep = " \\\n";
15076
000587f92082 rename src/DLD-FUNCTIONS directory to src/dldfcn
John W. Eaton <jwe@octave.org>
parents: 15039
diff changeset
23 print "DLDFCN_SRC = \\";
12162
c9f42acd84e2 Use Makefile rules based on timestamp files for src/DLD-FUNCTIONS/*.oct
John W. Eaton <jwe@octave.org>
parents: 10869
diff changeset
24 for (i = 1; i <= nfiles; i++) {
c9f42acd84e2 Use Makefile rules based on timestamp files for src/DLD-FUNCTIONS/*.oct
John W. Eaton <jwe@octave.org>
parents: 10869
diff changeset
25 if (i == nfiles)
c9f42acd84e2 Use Makefile rules based on timestamp files for src/DLD-FUNCTIONS/*.oct
John W. Eaton <jwe@octave.org>
parents: 10869
diff changeset
26 sep = "\n";
15076
000587f92082 rename src/DLD-FUNCTIONS directory to src/dldfcn
John W. Eaton <jwe@octave.org>
parents: 15039
diff changeset
27 printf (" dldfcn/%s%s", files[i], sep);
12162
c9f42acd84e2 Use Makefile rules based on timestamp files for src/DLD-FUNCTIONS/*.oct
John W. Eaton <jwe@octave.org>
parents: 10869
diff changeset
28 }
c9f42acd84e2 Use Makefile rules based on timestamp files for src/DLD-FUNCTIONS/*.oct
John W. Eaton <jwe@octave.org>
parents: 10869
diff changeset
29 print "";
c9f42acd84e2 Use Makefile rules based on timestamp files for src/DLD-FUNCTIONS/*.oct
John W. Eaton <jwe@octave.org>
parents: 10869
diff changeset
30
9794
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
31 sep = " \\\n";
15076
000587f92082 rename src/DLD-FUNCTIONS directory to src/dldfcn
John W. Eaton <jwe@octave.org>
parents: 15039
diff changeset
32 print "DLDFCN_LIBS = $(DLDFCN_SRC:.cc=.la)";
12162
c9f42acd84e2 Use Makefile rules based on timestamp files for src/DLD-FUNCTIONS/*.oct
John W. Eaton <jwe@octave.org>
parents: 10869
diff changeset
33 print "";
13010
edc5ec6e949b maint: allow --enable-static --disable-dl to work again
John W. Eaton <jwe@octave.org>
parents: 12163
diff changeset
34 print "if AMCOND_ENABLE_DYNAMIC_LINKING";
12162
c9f42acd84e2 Use Makefile rules based on timestamp files for src/DLD-FUNCTIONS/*.oct
John W. Eaton <jwe@octave.org>
parents: 10869
diff changeset
35 print "";
15076
000587f92082 rename src/DLD-FUNCTIONS directory to src/dldfcn
John W. Eaton <jwe@octave.org>
parents: 15039
diff changeset
36 print "octlib_LTLIBRARIES += $(DLDFCN_LIBS)";
12162
c9f42acd84e2 Use Makefile rules based on timestamp files for src/DLD-FUNCTIONS/*.oct
John W. Eaton <jwe@octave.org>
parents: 10869
diff changeset
37 print "";
c9f42acd84e2 Use Makefile rules based on timestamp files for src/DLD-FUNCTIONS/*.oct
John W. Eaton <jwe@octave.org>
parents: 10869
diff changeset
38 print "## Use stamp files to avoid problems with checking timestamps";
c9f42acd84e2 Use Makefile rules based on timestamp files for src/DLD-FUNCTIONS/*.oct
John W. Eaton <jwe@octave.org>
parents: 10869
diff changeset
39 print "## of symbolic links";
c9f42acd84e2 Use Makefile rules based on timestamp files for src/DLD-FUNCTIONS/*.oct
John W. Eaton <jwe@octave.org>
parents: 10869
diff changeset
40 print "";
19997
4f6ae6b94abe make --enable-silent-rules configure option more useful
John W. Eaton <jwe@octave.org>
parents: 19798
diff changeset
41 print "define gen-oct-stamp-file"
4f6ae6b94abe make --enable-silent-rules configure option more useful
John W. Eaton <jwe@octave.org>
parents: 19798
diff changeset
42 print " rm -f $(<:.la=.oct)";
4f6ae6b94abe make --enable-silent-rules configure option more useful
John W. Eaton <jwe@octave.org>
parents: 19798
diff changeset
43 print " la=$(<F) && \\";
4f6ae6b94abe make --enable-silent-rules configure option more useful
John W. Eaton <jwe@octave.org>
parents: 19798
diff changeset
44 print " of=$(<F:.la=.oct) && \\";
4f6ae6b94abe make --enable-silent-rules configure option more useful
John W. Eaton <jwe@octave.org>
parents: 19798
diff changeset
45 print " cd dldfcn && \\";
4f6ae6b94abe make --enable-silent-rules configure option more useful
John W. Eaton <jwe@octave.org>
parents: 19798
diff changeset
46 print " $(LN_S) .libs/`$(SED) -n -e \"s/dlname='\\([^']*\\)'/\\1/p\" < $$la` $$of && \\";
4f6ae6b94abe make --enable-silent-rules configure option more useful
John W. Eaton <jwe@octave.org>
parents: 19798
diff changeset
47 print " touch $(@F)";
4f6ae6b94abe make --enable-silent-rules configure option more useful
John W. Eaton <jwe@octave.org>
parents: 19798
diff changeset
48 print "endef"
4f6ae6b94abe make --enable-silent-rules configure option more useful
John W. Eaton <jwe@octave.org>
parents: 19798
diff changeset
49 print ""
4f6ae6b94abe make --enable-silent-rules configure option more useful
John W. Eaton <jwe@octave.org>
parents: 19798
diff changeset
50
4f6ae6b94abe make --enable-silent-rules configure option more useful
John W. Eaton <jwe@octave.org>
parents: 19798
diff changeset
51 for (i = 1; i <= nfiles; i++) {
9794
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
52 basename = files[i];
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
53 sub (/\.cc$/, "", basename);
15076
000587f92082 rename src/DLD-FUNCTIONS directory to src/dldfcn
John W. Eaton <jwe@octave.org>
parents: 15039
diff changeset
54 printf ("dldfcn/$(am__leading_dot)%s.oct-stamp: dldfcn/%s.la\n", basename, basename);
19997
4f6ae6b94abe make --enable-silent-rules configure option more useful
John W. Eaton <jwe@octave.org>
parents: 19798
diff changeset
55 print "\t$(AM_GEN_V)$(gen-oct-stamp-file)"
12162
c9f42acd84e2 Use Makefile rules based on timestamp files for src/DLD-FUNCTIONS/*.oct
John W. Eaton <jwe@octave.org>
parents: 10869
diff changeset
56 print "";
9794
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
57 }
13010
edc5ec6e949b maint: allow --enable-static --disable-dl to work again
John W. Eaton <jwe@octave.org>
parents: 12163
diff changeset
58 print "else";
edc5ec6e949b maint: allow --enable-static --disable-dl to work again
John W. Eaton <jwe@octave.org>
parents: 12163
diff changeset
59 print "";
15076
000587f92082 rename src/DLD-FUNCTIONS directory to src/dldfcn
John W. Eaton <jwe@octave.org>
parents: 15039
diff changeset
60 print "noinst_LTLIBRARIES += $(DLDFCN_LIBS)";
13010
edc5ec6e949b maint: allow --enable-static --disable-dl to work again
John W. Eaton <jwe@octave.org>
parents: 12163
diff changeset
61 print "";
9794
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
62 print "endif";
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
63
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
64 for (i = 1; i <= nfiles; i++) {
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
65 basename = files[i];
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
66 sub (/\.cc$/, "", basename);
13010
edc5ec6e949b maint: allow --enable-static --disable-dl to work again
John W. Eaton <jwe@octave.org>
parents: 12163
diff changeset
67 print "";
15076
000587f92082 rename src/DLD-FUNCTIONS directory to src/dldfcn
John W. Eaton <jwe@octave.org>
parents: 15039
diff changeset
68 printf ("dldfcn_%s_la_SOURCES = dldfcn/%s\n",
18013
501cb6a90f0f maint: Replace unnecessary tabs with spaces.
Rik <rik@octave.org>
parents: 17773
diff changeset
69 basename, files[i]);
13010
edc5ec6e949b maint: allow --enable-static --disable-dl to work again
John W. Eaton <jwe@octave.org>
parents: 12163
diff changeset
70 if (cppflags[i])
edc5ec6e949b maint: allow --enable-static --disable-dl to work again
John W. Eaton <jwe@octave.org>
parents: 12163
diff changeset
71 {
15076
000587f92082 rename src/DLD-FUNCTIONS directory to src/dldfcn
John W. Eaton <jwe@octave.org>
parents: 15039
diff changeset
72 printf ("dldfcn/%s.df: CPPFLAGS += %s\n",
13010
edc5ec6e949b maint: allow --enable-static --disable-dl to work again
John W. Eaton <jwe@octave.org>
parents: 12163
diff changeset
73 basename, cppflags[i]);
19798
228cfaf24208 put custom CPPFLAGS after AM_CPPFLAGS for dld functions (bug #44060)
John W. Eaton <jwe@octave.org>
parents: 18013
diff changeset
74 printf ("dldfcn_%s_la_CPPFLAGS = $(AM_CPPFLAGS) %s\n",
13010
edc5ec6e949b maint: allow --enable-static --disable-dl to work again
John W. Eaton <jwe@octave.org>
parents: 12163
diff changeset
75 basename, cppflags[i]);
edc5ec6e949b maint: allow --enable-static --disable-dl to work again
John W. Eaton <jwe@octave.org>
parents: 12163
diff changeset
76 }
15076
000587f92082 rename src/DLD-FUNCTIONS directory to src/dldfcn
John W. Eaton <jwe@octave.org>
parents: 15039
diff changeset
77 printf ("dldfcn_%s_la_LDFLAGS = -avoid-version -module $(NO_UNDEFINED_LDFLAG) %s $(OCT_LINK_OPTS)\n",
13010
edc5ec6e949b maint: allow --enable-static --disable-dl to work again
John W. Eaton <jwe@octave.org>
parents: 12163
diff changeset
78 basename, ldflags[i]);
15271
648dabbb4c6b build: Refactor liboctave into multiple subdirectories. Move libcruft into liboctave.
Rik <rik@octave.org>
parents: 15195
diff changeset
79 printf ("dldfcn_%s_la_LIBADD = $(DLD_LIBOCTINTERP_LIBADD) ../liboctave/liboctave.la %s $(OCT_LINK_DEPS)\n",
13010
edc5ec6e949b maint: allow --enable-static --disable-dl to work again
John W. Eaton <jwe@octave.org>
parents: 12163
diff changeset
80 basename, libraries[i]);
9794
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
81 }
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
82 }