annotate libinterp/dldfcn/config-module.awk @ 20829:9cef0a1207e4 @

cell2mat: add tests for cells of cells and char arrays
author Carnë Draug <carandraug@octave.org>
date Tue, 13 Oct 2015 11:40:05 +0100
parents 0ce7d8303152
children
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 += \\"
20537
0ce7d8303152 eliminate recursive make invocations in liboctave and libinterp directories
John W. Eaton <jwe@octave.org>
parents: 20003
diff changeset
8 print " libinterp/dldfcn/config-module.sh \\"
0ce7d8303152 eliminate recursive make invocations in liboctave and libinterp directories
John W. Eaton <jwe@octave.org>
parents: 20003
diff changeset
9 print " libinterp/dldfcn/config-module.awk \\"
0ce7d8303152 eliminate recursive make invocations in liboctave and libinterp directories
John W. Eaton <jwe@octave.org>
parents: 20003
diff changeset
10 print " libinterp/dldfcn/module-files \\"
0ce7d8303152 eliminate recursive make invocations in liboctave and libinterp directories
John W. Eaton <jwe@octave.org>
parents: 20003
diff changeset
11 print " libinterp/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";
20537
0ce7d8303152 eliminate recursive make invocations in liboctave and libinterp directories
John W. Eaton <jwe@octave.org>
parents: 20003
diff changeset
27 printf (" libinterp/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 "";
20003
925fdd91abba create .oct files directly instead of using stamp files (bug #44329)
John W. Eaton <jwe@octave.org>
parents: 19997
diff changeset
41 print "%.oct : %.la"
20537
0ce7d8303152 eliminate recursive make invocations in liboctave and libinterp directories
John W. Eaton <jwe@octave.org>
parents: 20003
diff changeset
42 print " $(AM_V_GEN)$(INSTALL_PROGRAM) libinterp/dldfcn/.libs/$(shell $(SED) -n -e \"s/dlname='\\([^']*\\)'/\\1/p\" < $<) $@"
19997
4f6ae6b94abe make --enable-silent-rules configure option more useful
John W. Eaton <jwe@octave.org>
parents: 19798
diff changeset
43 print ""
13010
edc5ec6e949b maint: allow --enable-static --disable-dl to work again
John W. Eaton <jwe@octave.org>
parents: 12163
diff changeset
44 print "else";
edc5ec6e949b maint: allow --enable-static --disable-dl to work again
John W. Eaton <jwe@octave.org>
parents: 12163
diff changeset
45 print "";
15076
000587f92082 rename src/DLD-FUNCTIONS directory to src/dldfcn
John W. Eaton <jwe@octave.org>
parents: 15039
diff changeset
46 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
47 print "";
9794
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
48 print "endif";
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
49
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
50 for (i = 1; i <= nfiles; i++) {
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
51 basename = files[i];
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
52 sub (/\.cc$/, "", basename);
13010
edc5ec6e949b maint: allow --enable-static --disable-dl to work again
John W. Eaton <jwe@octave.org>
parents: 12163
diff changeset
53 print "";
20537
0ce7d8303152 eliminate recursive make invocations in liboctave and libinterp directories
John W. Eaton <jwe@octave.org>
parents: 20003
diff changeset
54 printf ("libinterp_dldfcn_%s_la_SOURCES = libinterp/dldfcn/%s\n",
18013
501cb6a90f0f maint: Replace unnecessary tabs with spaces.
Rik <rik@octave.org>
parents: 17773
diff changeset
55 basename, files[i]);
13010
edc5ec6e949b maint: allow --enable-static --disable-dl to work again
John W. Eaton <jwe@octave.org>
parents: 12163
diff changeset
56 if (cppflags[i])
edc5ec6e949b maint: allow --enable-static --disable-dl to work again
John W. Eaton <jwe@octave.org>
parents: 12163
diff changeset
57 {
20537
0ce7d8303152 eliminate recursive make invocations in liboctave and libinterp directories
John W. Eaton <jwe@octave.org>
parents: 20003
diff changeset
58 printf ("libinterp/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
59 basename, cppflags[i]);
20537
0ce7d8303152 eliminate recursive make invocations in liboctave and libinterp directories
John W. Eaton <jwe@octave.org>
parents: 20003
diff changeset
60 printf ("libinterp_dldfcn_%s_la_CPPFLAGS = $(libinterp_liboctinterp_la_CPPFLAGS) %s\n",
13010
edc5ec6e949b maint: allow --enable-static --disable-dl to work again
John W. Eaton <jwe@octave.org>
parents: 12163
diff changeset
61 basename, cppflags[i]);
edc5ec6e949b maint: allow --enable-static --disable-dl to work again
John W. Eaton <jwe@octave.org>
parents: 12163
diff changeset
62 }
20537
0ce7d8303152 eliminate recursive make invocations in liboctave and libinterp directories
John W. Eaton <jwe@octave.org>
parents: 20003
diff changeset
63 printf ("libinterp_dldfcn_%s_la_CFLAGS = $(libinterp_liboctinterp_la_CFLAGS) %s\n",
0ce7d8303152 eliminate recursive make invocations in liboctave and libinterp directories
John W. Eaton <jwe@octave.org>
parents: 20003
diff changeset
64 basename, cppflags[i]);
0ce7d8303152 eliminate recursive make invocations in liboctave and libinterp directories
John W. Eaton <jwe@octave.org>
parents: 20003
diff changeset
65 printf ("libinterp_dldfcn_%s_la_CXXFLAGS = $(libinterp_liboctinterp_la_CXXFLAGS) %s\n",
0ce7d8303152 eliminate recursive make invocations in liboctave and libinterp directories
John W. Eaton <jwe@octave.org>
parents: 20003
diff changeset
66 basename, cppflags[i]);
0ce7d8303152 eliminate recursive make invocations in liboctave and libinterp directories
John W. Eaton <jwe@octave.org>
parents: 20003
diff changeset
67 printf ("libinterp_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
68 basename, ldflags[i]);
20537
0ce7d8303152 eliminate recursive make invocations in liboctave and libinterp directories
John W. Eaton <jwe@octave.org>
parents: 20003
diff changeset
69 printf ("libinterp_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
70 basename, libraries[i]);
9794
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
71 }
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
72 }