annotate libinterp/dldfcn/config-module.awk @ 15752:f96faf028d90

make java functions part of core octave_value classes * run-octave.in: Set OCTAVE_JAVA_DIR. * octave-value/ov-java.cc: Rename from dldfcn/__java__.cc. (get_module_path): Delete. (initial_java_dir): Don't set architecture dependent directory. Check environment or use Vfcn_file_dir to set default directory. (initial_class_path): Don't search load path for octave.jar. (initialize_jvm): Don't add -Doctave.java.path=DIR to vm_args. Use DEFUN, not DEFUN_DLD. (F__java__): Delete. * octave-value/ov-java.h: Rename from dldfcn/__java__.h. * dldfcn/module-files: Delete entry for __java__.cc. * libinterp/Makefile.am (octinclude_HEADERS): Delete $(DLDFCN_INC) from the list. * octave-value/module.mk (OCTAVE_VALUE_INC): Add ov-java.h to the list. (OCTAVE_VALUE_SRC) Add ov-java.cc to the list. (octave_value_liboctave_value_la_LIBADD): New variable. (octave_value_liboctave_value_la_CPPFLAGS): Add $(JAVA_CPPFLAGS) to the list. * dldfcn/config-module.awk: Don't print DLDFCN_INC variable. * Octave.java, OctaveReference.java: Don't grab a reference to __java__.oct.
author John W. Eaton <jwe@octave.org>
date Sat, 08 Dec 2012 00:23:13 -0500
parents a53ed884509f
children a230b996ae8a
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 "";
9794
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
41 for (i = 1; i <= nfiles; i++) {
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
42 basename = files[i];
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
43 sub (/\.cc$/, "", basename);
15076
000587f92082 rename src/DLD-FUNCTIONS directory to src/dldfcn
John W. Eaton <jwe@octave.org>
parents: 15039
diff changeset
44 printf ("dldfcn/$(am__leading_dot)%s.oct-stamp: dldfcn/%s.la\n", basename, basename);
12162
c9f42acd84e2 Use Makefile rules based on timestamp files for src/DLD-FUNCTIONS/*.oct
John W. Eaton <jwe@octave.org>
parents: 10869
diff changeset
45 print "\trm -f $(<:.la=.oct)";
c9f42acd84e2 Use Makefile rules based on timestamp files for src/DLD-FUNCTIONS/*.oct
John W. Eaton <jwe@octave.org>
parents: 10869
diff changeset
46 print "\tla=$(<F) && \\";
c9f42acd84e2 Use Makefile rules based on timestamp files for src/DLD-FUNCTIONS/*.oct
John W. Eaton <jwe@octave.org>
parents: 10869
diff changeset
47 print "\t of=$(<F:.la=.oct) && \\";
15076
000587f92082 rename src/DLD-FUNCTIONS directory to src/dldfcn
John W. Eaton <jwe@octave.org>
parents: 15039
diff changeset
48 print "\t cd dldfcn && \\";
12162
c9f42acd84e2 Use Makefile rules based on timestamp files for src/DLD-FUNCTIONS/*.oct
John W. Eaton <jwe@octave.org>
parents: 10869
diff changeset
49 print "\t $(LN_S) .libs/`$(SED) -n -e \"s/dlname='\\([^']*\\)'/\\1/p\" < $$la` $$of && \\";
c9f42acd84e2 Use Makefile rules based on timestamp files for src/DLD-FUNCTIONS/*.oct
John W. Eaton <jwe@octave.org>
parents: 10869
diff changeset
50 print "\t touch $(@F)";
c9f42acd84e2 Use Makefile rules based on timestamp files for src/DLD-FUNCTIONS/*.oct
John W. Eaton <jwe@octave.org>
parents: 10869
diff changeset
51 print "";
9794
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
52 }
13010
edc5ec6e949b maint: allow --enable-static --disable-dl to work again
John W. Eaton <jwe@octave.org>
parents: 12163
diff changeset
53 print "else";
edc5ec6e949b maint: allow --enable-static --disable-dl to work again
John W. Eaton <jwe@octave.org>
parents: 12163
diff changeset
54 print "";
15076
000587f92082 rename src/DLD-FUNCTIONS directory to src/dldfcn
John W. Eaton <jwe@octave.org>
parents: 15039
diff changeset
55 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
56 print "";
9794
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
57 print "endif";
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
58
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
59 for (i = 1; i <= nfiles; i++) {
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
60 basename = files[i];
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
61 sub (/\.cc$/, "", basename);
13010
edc5ec6e949b maint: allow --enable-static --disable-dl to work again
John W. Eaton <jwe@octave.org>
parents: 12163
diff changeset
62 print "";
15076
000587f92082 rename src/DLD-FUNCTIONS directory to src/dldfcn
John W. Eaton <jwe@octave.org>
parents: 15039
diff changeset
63 printf ("dldfcn_%s_la_SOURCES = dldfcn/%s\n",
9794
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
64 basename, files[i]);
13010
edc5ec6e949b maint: allow --enable-static --disable-dl to work again
John W. Eaton <jwe@octave.org>
parents: 12163
diff changeset
65 if (cppflags[i])
edc5ec6e949b maint: allow --enable-static --disable-dl to work again
John W. Eaton <jwe@octave.org>
parents: 12163
diff changeset
66 {
15076
000587f92082 rename src/DLD-FUNCTIONS directory to src/dldfcn
John W. Eaton <jwe@octave.org>
parents: 15039
diff changeset
67 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
68 basename, cppflags[i]);
15076
000587f92082 rename src/DLD-FUNCTIONS directory to src/dldfcn
John W. Eaton <jwe@octave.org>
parents: 15039
diff changeset
69 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
70 basename, 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_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
73 basename, ldflags[i]);
15271
648dabbb4c6b build: Refactor liboctave into multiple subdirectories. Move libcruft into liboctave.
Rik <rik@octave.org>
parents: 15195
diff changeset
74 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
75 basename, libraries[i]);
9794
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
76 }
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
77 }