OSDN Git Service

Cleanups after the update to Autoconf 2.64, Automake 1.11.
[pf3gnuchains/gcc-fork.git] / libjava / Makefile.am
1 ## Process this file with automake to produce Makefile.in.
2
3 AUTOMAKE_OPTIONS = foreign subdir-objects
4
5 ACLOCAL_AMFLAGS = -I . -I .. -I ../config -I libltdl
6
7 # May be used by various substitution variables.
8 gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
9
10 SUBDIRS = $(DIRLTDL) gcj include classpath
11 if TESTSUBDIR
12 SUBDIRS += testsuite
13 endif
14
15 # write_entries_to_file - writes each entry in a list
16 # to the specified file.  Entries are written in chunks of
17 # $(write_entries_to_file_split) to accomodate systems with
18 # severe command-line-length limitations.
19 # Parameters:
20 # $(1): variable containing entries to iterate over
21 # $(2): output file
22 write_entries_to_file_split = 50
23 write_entries_to_file = $(shell rm -f $(2) || :) $(shell touch $(2)) \
24         $(foreach range, \
25           $(shell i=1; while test $$i -le $(words $(1)); do \
26              echo $$i; i=`expr $$i + $(write_entries_to_file_split)`; done), \
27           $(shell echo $(wordlist $(range), \
28                           $(shell expr $(range) + $(write_entries_to_file_split) - 1), $(1)) \
29              | tr ' ' '\n' >> $(2)))
30
31 ## ################################################################
32
33 # autoconf2.13's target_alias
34 target_noncanonical = @target_noncanonical@
35
36 # This is required by TL_AC_GXX_INCLUDE_DIR.
37 libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)
38
39 libexecsubdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
40
41 ##
42 ## What gets installed, and where.
43 ##
44
45 toolexeclib_LTLIBRARIES = libgcj.la libgij.la libgcj-tools.la
46 toolexecmainlib_DATA = libgcj.spec
47
48 if USE_LIBGCJ_BC
49 toolexeclib_LTLIBRARIES += libgcj_bc.la
50 endif
51
52 if XLIB_AWT
53 toolexeclib_LTLIBRARIES += lib-gnu-awt-xlib.la
54 endif
55
56 dbexec_LTLIBRARIES = libjvm.la
57
58 pkgconfigdir = $(libdir)/pkgconfig
59
60 jardir = $(datadir)/java
61 jar_DATA = libgcj-$(gcc_version).jar libgcj-tools-$(gcc_version).jar
62 if INSTALL_ECJ_JAR
63 jar_DATA += $(ECJ_BUILD_JAR)
64 endif
65
66 if JAVA_HOME_SET
67 JAVA_HOME_DIR = $(JAVA_HOME)
68 BOOT_CLASS_PATH_DIR = $(JAVA_HOME)/lib/rt.jar
69 else
70 JAVA_HOME_DIR = $(prefix)
71 BOOT_CLASS_PATH_DIR = $(jardir)/libgcj-$(gcc_version).jar
72 endif
73
74 ## Name of the default .db.
75 db_name = classmap.db
76 ## Compiler specific component of the .db file
77 gcjsubdir = @gcjsubdir@
78 db_pathtail = $(gcjsubdir)/$(db_name)
79
80 ## For now, only on native systems.  FIXME.
81 if NATIVE
82 bin_programs = jv-convert gij grmic grmiregistry gcj-dbtool \
83         gappletviewer gjarsigner gkeytool gjar gcjh gjavah gnative2ascii \
84         gorbd grmid gserialver gtnameserv gc-analyze
85 if CREATE_GJDOC
86 bin_programs += gjdoc
87 endif
88
89 noinst_PROGRAMS =
90 if INSTALL_BINARIES
91 bin_PROGRAMS = $(bin_programs)
92 else
93 noinst_PROGRAMS += $(bin_programs)
94 endif
95
96 ## It is convenient to actually build and install the default database
97 ## when gcj-dbtool is available.
98 dbexec_DATA = $(db_name)
99 endif 
100
101 bin_SCRIPTS = contrib/rebuild-gcj-db contrib/aot-compile
102
103 if INSTALL_AOT_RPM
104 bin_SCRIPTS += contrib/aot-compile-rpm
105 endif
106
107 if BUILD_ECJ1
108 ## We build ecjx and not ecj1 because in one mode, ecjx will not work
109 ## until after 'make install', and we don't want it to be picked up in
110 ## the build tree by gcj via a -B option.
111 libexecsub_PROGRAMS = ecjx
112 endif
113
114 ## ################################################################
115
116 ##
117 ## Compilers and compilation flags.
118 ##
119
120 ## The compiler with whatever flags we want for both -c and -C
121 ## compiles.
122 GCJ_WITH_FLAGS = $(GCJ) --encoding=UTF-8 -Wno-deprecated
123
124 extra_ldflags_libjava = @extra_ldflags_libjava@
125 extra_ldflags = @extra_ldflags@
126
127 if ANONVERSCRIPT
128 extra_ldflags_libjava += -Wl,--version-script=$(srcdir)/libgcj.ver
129 endif
130
131 LTLDFLAGS = $(shell $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
132 GCJLINK = $(LIBTOOL) --tag=GCJ $(LIBTOOLFLAGS) --mode=link $(GCJ) -L$(here) \
133           $(JC1FLAGS) $(LTLDFLAGS) -o $@
134 GCJ_FOR_ECJX = @GCJ_FOR_ECJX@
135 GCJ_FOR_ECJX_LINK = $(GCJ_FOR_ECJX) -o $@
136 LIBLINK = $(LIBTOOL) --tag=CXX $(LIBTOOLFLAGS) --mode=link $(CXX) -L$(here) \
137           $(JC1FLAGS) $(LTLDFLAGS) $(extra_ldflags_libjava) $(extra_ldflags) -o $@
138 CXXLINK = $(LIBTOOL) --tag=CXX $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
139           $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LTLDFLAGS) -o $@
140
141 GCC_UNWIND_INCLUDE = @GCC_UNWIND_INCLUDE@
142
143 WARNINGS = -Wextra -Wall
144 ## Some systems don't allow `$' in identifiers by default, so we force
145 ## it with -fdollars-in-identifiers.  -Wswitch-enum detects bugs in
146 ## the verifier implementation, and maybe other places.  We need
147 ## _GNU_SOURCE defined for some Linux builds.  It doesn't hurt to
148 ## always define it.  Some systems, including Linux, need
149 ## -D_FILE_OFFSET_BITS=64 to enable > 2GB file support.
150 AM_CXXFLAGS = \
151         -fno-rtti \
152         -fnon-call-exceptions \
153         $(THREADCXXFLAGS) \
154         -fdollars-in-identifiers \
155         -Wswitch-enum \
156         -D_FILE_OFFSET_BITS=64 \
157         @LIBGCJ_CXXFLAGS@ \
158         $(WARNINGS) \
159         -D_GNU_SOURCE \
160         -DPREFIX="\"$(prefix)\"" \
161         -DTOOLEXECLIBDIR="\"$(toolexeclibdir)\"" \
162         -DJAVA_HOME="\"$(JAVA_HOME_DIR)\"" \
163         -DBOOT_CLASS_PATH="\"$(BOOT_CLASS_PATH_DIR)\"" \
164         -DJAVA_EXT_DIRS="\"$(jardir)/ext\"" \
165         -DGCJ_ENDORSED_DIRS="\"$(jardir)/gcj-endorsed\"" \
166         -DGCJ_VERSIONED_LIBDIR="\"$(dbexecdir)\"" \
167         -DPATH_SEPARATOR="\"$(CLASSPATH_SEPARATOR)\"" \
168         -DECJ_JAR_FILE="\"$(ECJ_JAR)\"" \
169         -DLIBGCJ_DEFAULT_DATABASE="\"$(dbexecdir)/$(db_name)\"" \
170         -DLIBGCJ_DEFAULT_DATABASE_PATH_TAIL="\"$(db_pathtail)\""
171
172 AM_GCJFLAGS = \
173         @LIBGCJ_JAVAFLAGS@ \
174         -fclasspath= -fbootclasspath=$(BOOTCLASSPATH) \
175         --encoding=UTF-8 \
176         -Wno-deprecated -fbootstrap-classes
177
178 AM_CFLAGS = @LIBGCJ_CFLAGS@
179 if USING_GCC
180 AM_CFLAGS += $(WARNINGS)
181 endif
182
183 if SUPPRESS_LIBGCJ_BC
184 LIBGCJ_BC_FLAGS =
185 else
186 LIBGCJ_BC_FLAGS = -findirect-dispatch -fno-indirect-classes
187 endif
188
189 if BUILD_LIBGCJ_REDUCED_REFLECTION
190 LIBGCJ_REDUCED_REFLECTION_FLAGS = -freduced-reflection
191 else
192 LIBGCJ_REDUCED_REFLECTION_FLAGS =
193 endif
194
195 ## Extra CFLAGS used for JNI C sources shared with GNU Classpath.
196 PEDANTIC_CFLAGS = -ansi -pedantic -Wall -Wno-long-long
197
198 JCFLAGS = -g
199 JC1FLAGS = @LIBGCJ_JAVAFLAGS@ $(GCJFLAGS)
200
201 LIBFFIINCS = @LIBFFIINCS@
202
203 AM_CPPFLAGS = -I$(top_srcdir) \
204         -Iinclude -I$(top_srcdir)/include \
205         -I$(top_srcdir)/classpath/include \
206         -Iclasspath/include \
207         -I$(top_srcdir)/classpath/native/fdlibm \
208         $(GCINCS) $(THREADINCS) $(INCLTDL) \
209         $(GCC_UNWIND_INCLUDE) $(ZINCS) $(LIBFFIINCS)
210
211 BOOTCLASSPATH = $(srcdir)/classpath/lib
212
213 ## ################################################################
214
215 ##
216 ## How to build libgcj.a and libgcj.jar
217 ##
218
219 libgij_la_SOURCES = gij.cc
220 libgij_la_DEPENDENCIES = libgcj.la libgcj.spec
221 ## See jv_convert_LDADD.
222 libgij_la_LIBADD = -L$(here)/.libs libgcj.la
223 ## The mysterious backslash in the grep pattern is consumed by make.
224 libgij_la_LDFLAGS = -rpath $(toolexeclibdir) \
225         -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC)
226
227 if INTERPRETER
228 libgcj_interpret_source_files = jvmti.cc interpret.cc
229 else
230 libgcj_interpret_source_files = 
231 endif
232
233 libgcj_la_SOURCES = prims.cc jni.cc exception.cc stacktrace.cc \
234         link.cc defineclass.cc verify.cc $(libgcj_interpret_source_files) \
235         $(nat_source_files)
236
237 ## We need to compile at least the interpreter this way.
238 interpret.lo:  AM_CXXFLAGS += -fwrapv
239
240 if USING_BOEHMGC
241 libgcj_la_SOURCES += boehm.cc
242 endif
243
244 if USING_NOGC
245 libgcj_la_SOURCES += nogc.cc
246 endif
247
248 if USING_POSIX_PLATFORM
249 libgcj_la_SOURCES += posix.cc
250 endif
251
252 if USING_WIN32_PLATFORM
253 libgcj_la_SOURCES += win32.cc
254 endif
255
256 if USING_DARWIN_CRT
257 libgcj_la_SOURCES += darwin.cc
258 endif
259
260 if USING_POSIX_THREADS
261 libgcj_la_SOURCES += posix-threads.cc
262 endif
263
264 if USING_WIN32_THREADS
265 libgcj_la_SOURCES += win32-threads.cc
266 endif
267
268 if USING_NO_THREADS
269 libgcj_la_SOURCES += no-threads.cc
270 endif
271
272 ## Objects from C++ sources in subdirs.
273 nat_files = $(nat_source_files:.cc=.lo)
274 xlib_nat_files = $(xlib_nat_source_files:.cc=.lo)
275
276 # Include THREADLIBS here to ensure that the correct version of
277 # certain linuxthread functions get linked:
278 ## The mysterious backslash in the grep pattern is consumed by make.
279 libgcj_la_LDFLAGS = -rpath $(toolexeclibdir) $(THREADLDFLAGS) $(extra_ldflags) $(THREADLIBS) \
280         $(LIBLTDL) $(SYS_ZLIBS) \
281         -version-info `grep -v '^\#' $(srcdir)/libtool-version` \
282         $(LIBGCJ_LD_SYMBOLIC_FUNCTIONS)
283 libgcj_la_LIBADD = \
284         classpath/native/fdlibm/libfdlibm.la \
285         java/lang/Object.lo \
286         java/lang/Class.lo \
287         java/process-$(PLATFORM).lo \
288         $(all_packages_source_files:.list=.lo) \
289         $(bc_objects) \
290         $(propertyo_files) \
291         $(LIBFFI) $(ZLIBS) $(GCLIBS)
292 libgcj_la_DEPENDENCIES = libgcj-$(gcc_version).jar \
293         java/lang/Object.lo \
294         java/lang/Class.lo \
295         java/process-$(PLATFORM).lo \
296         $(all_packages_source_files:.list=.lo) \
297         $(LIBLTDL) $(libgcj_la_LIBADD)
298 if ANONVERSCRIPT
299 libgcj_la_DEPENDENCIES += $(srcdir)/libgcj.ver
300 endif
301 libgcj_la_LINK = $(LIBLINK) $(libgcj_la_LDFLAGS)
302
303 ## A hack to make sure the various gcj-related macros, like
304 ## LTGCJCOMPILE, are defined by automake.  This is never actually
305 ## compiled.
306 EXTRA_libgcj_la_SOURCES = java/lang/Object.java
307
308 # We compile libgcj_tools with -findirect-dispatch so that they can
309 # depend on external classes: in particular, gjdoc uses antlr.  In
310 # addition, -fno-bootstrap-classes ensures that the tools are loaded
311 # by the system class loader rather than the bootstrap class loader:
312 # only core library classes should be loaded by the bootstrap loader.
313 libgcj_tools_la_SOURCES = classpath/tools/tools.zip
314 libgcj_tools_la_GCJFLAGS = $(AM_GCJFLAGS) -findirect-dispatch \
315  -fno-bootstrap-classes -fno-indirect-classes \
316  -fsource-filename=$(here)/classpath/tools/all-classes.lst
317 libgcj_tools_la_LDFLAGS = -rpath $(toolexeclibdir) \
318  -version-info `grep -v '^\#' $(srcdir)/libtool-version` \
319  $(LIBGCJ_LD_SYMBOLIC_FUNCTIONS)
320 libgcj_tools_la_DEPENDENCIES = libgcj.la libgcj.spec
321 libgcj_tools_la_LINK = $(LIBLINK) $(libgcj_tools_la_LDFLAGS)
322
323 ## libjvm.so
324 libjvm_la_SOURCES = jni-libjvm.cc
325 libjvm_la_DEPENDENCIES = libgcj.la libgcj.spec
326 ## See jv_convert_LDADD.
327 libjvm_la_LIBADD = -L$(here)/.libs libgcj.la
328 libjvm_la_LDFLAGS = -avoid-version $(LIBGCJ_LD_SYMBOLIC)
329
330 ## The .db file.  This rule is only used for native builds, so it is
331 ## safe to invoke gcj-dbtool.
332 $(db_name): gcj-dbtool$(EXEEXT)
333 ## In case it exists already.
334         @rm -f $(db_name)
335 ## We don't actually care if it fails -- if it does, just make an
336 ## empty file.  This is simpler than trying to discover when mmap is
337 ## not available.
338         ./gcj-dbtool -n $(db_name) || touch $(db_name)
339
340 lib_gnu_awt_xlib_la_SOURCES = $(xlib_nat_source_files)
341 lib_gnu_awt_xlib_la_LIBADD = gnu/awt/xlib.lo gnu/gcj/xlib.lo
342 lib_gnu_awt_xlib_la_DEPENDENCIES = libgcj-$(gcc_version).jar \
343         libgcj.la libgcj.spec \
344         $(lib_gnu_awt_xlib_la_LIBADD)
345 ## We require libstdc++-v3 to be in the same build tree.
346 lib_gnu_awt_xlib_la_CPPFLAGS = \
347         $(AM_CPPFLAGS) \
348         -I../libstdc++-v3/include \
349         -I../libstdc++-v3/include/$(target_noncanonical) \
350         -I$(srcdir)/../libstdc++-v3/libsupc++
351 ## The mysterious backslash in the grep pattern is consumed by make.
352 lib_gnu_awt_xlib_la_LDFLAGS = ../libstdc++-v3/src/libstdc++.la \
353         @X_PRE_LIBS@ @X_LIBS@ -lX11 @X_EXTRA_LIBS@ \
354         -rpath $(toolexeclibdir) \
355         -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC)
356 lib_gnu_awt_xlib_la_LINK = $(LIBLINK) $(lib_gnu_awt_xlib_la_LDFLAGS)
357
358 ## Support for libgcj_bc: dummy shared library.
359 ##
360 ## This lets us have one soname in BC objects and another in C++ ABI objects.
361 ## This library is not linked against libgcj.
362 libgcj_bc_la_SOURCES = libgcj_bc.c
363 libgcj_bc_la_LDFLAGS = -rpath $(toolexeclibdir) -no-static -version-info 1:0:0 \
364         $(LIBGCJ_LD_SYMBOLIC_FUNCTIONS)
365 libgcj_bc_la_DEPENDENCIES = libgcj.la
366 libgcj_bc_la_LINK = $(LIBLINK) $(libgcj_bc_la_LDFLAGS)
367 ## This is specific to Linux/{Free,Net,Open}BSD/Hurd and perhaps few others.
368 ## USE_LIBGCJ_BC shouldn't be set on other targets.
369 libgcj_bc_dummy_LINK = $(CC) -L$(here)/.libs $(CFLAGS) $(LDFLAGS) -shared \
370         -fPIC -nostdlib
371
372 ## This rule creates the libgcj_bc dummy library in the .libs directory, for use
373 ## when testing.
374 libgcj_bc.la: $(libgcj_bc_la_OBJECTS) $(libgcj_bc_la_DEPENDENCIES)
375         $(libgcj_bc_la_LINK) $(am_libgcj_bc_la_rpath) $(libgcj_bc_la_LDFLAGS) \
376         $(libgcj_bc_la_OBJECTS) $(libgcj_bc_la_LIBADD) $(LIBS) || exit; \
377         rm .libs/libgcj_bc.so; \
378         mv .libs/libgcj_bc.so.1.0.0 .libs/libgcj_bc.so; \
379         $(libgcj_bc_dummy_LINK) -xc /dev/null -Wl,-soname,libgcj_bc.so.1 \
380         -o .libs/libgcj_bc.so.1.0.0 -lgcj || exit; \
381         rm .libs/libgcj_bc.so.1; \
382         $(LN_S) libgcj_bc.so.1.0.0 .libs/libgcj_bc.so.1
383
384 ## Note that property_files is defined in sources.am.
385 propertyo_files = $(patsubst classpath/resource/%,%,$(addsuffix .lo,$(property_files)))
386
387 $(propertyo_files): %.lo: classpath/resource/%
388         $(mkinstalldirs) `dirname $@`; \
389         $(LTGCJCOMPILE) -o $@ -c $< -Wc,--resource,$(@:.lo=)
390
391 libgcj-$(gcc_version).jar: classpath/lib/compile-classes
392 ## Note that this now omits the property files.
393 ## It doesn't matter since we don't use the jar at runtime.
394         here=`pwd`; cd $(srcdir)/classpath/lib; \
395         find gnu java javax org sun -name .svn -prune -o -name '*.class' -print | \
396         $(JAR) -cfM@ $$here/libgcj-$(gcc_version).jar
397
398 libgcj-tools-$(gcc_version).jar: classpath/tools/tools.zip
399         cp $< $@
400
401 CLEANFILES = libgcj-$(gcc_version).jar libgcj-tools-$(gcc_version).jar
402 DISTCLEANFILES = native.dirs
403
404 mostlyclean-local:
405 ## Use libtool rm to remove each libtool object
406         find . -name '*.lo' -print | xargs $(LIBTOOL) --mode=clean rm -f
407
408 distclean-local:
409 ## Remove every .d file that was created.
410         find . -name '*.d' -print | xargs rm -f
411
412 # Just remove the objects from C++ sources, for testing the C++ compiler.
413 clean-nat:
414         rm -f $(nat_files) $(xlib_nat_files)
415
416 SUFFIXES = .class .java .h .properties .list
417
418 ## Pass the list of object files to libtool in a temporary file to
419 ## avoid tripping platform command line length limits.
420 lib-gnu-awt-xlib.la: $(lib_gnu_awt_xlib_la_OBJECTS) $(lib_gnu_awt_xlib_la_DEPENDENCIES)
421         @echo Creating list of files to link...
422         @: $(call write_entries_to_file,$(lib_gnu_awt_xlib_la_OBJECTS) $(lib_gnu_awt_xlib_la_LIBADD),lib_gnu_awt_xlib.objectlist)
423         $(lib_gnu_awt_xlib_la_LINK) -objectlist lib_gnu_awt_xlib.objectlist \
424         -rpath $(toolexeclibdir) $(lib_gnu_awt_xlib_la_LDFLAGS) $(LIBS)
425
426 ## ################################################################
427
428 ## Compiling a list of java sources to a single .o.
429
430 # Concurrent things use reflection internally.
431 java/util/concurrent.lo \
432 java/util/concurrent/atomic.lo \
433 java/util/concurrent/locks.lo: LIBGCJ_REDUCED_REFLECTION_FLAGS =
434
435 %.lo: %.list
436         $(LTGCJCOMPILE) $(LIBGCJ_REDUCED_REFLECTION_FLAGS) -c -o $@ -fsource-filename=$(here)/classpath/lib/classes -MT $@ -MD -MP -MF $(basename $@).deps @$<
437
438 java/lang/Object.lo: classpath/lib/java/lang/Object.class
439         $(LTGCJCOMPILE) -c -o $@ -fsource-filename=$(srcdir)/$(basename $@).java $<
440
441 java/lang/Class.lo: classpath/lib/java/lang/Class.class
442         $(LTGCJCOMPILE) -c -o $@  -fsource-filename=$(srcdir)/$(basename $@).java $<
443
444 ## ################################################################
445
446 ## This pulls in a number of variable and target definitions.
447 include sources.am
448
449 ## ################################################################
450
451 ##
452 ## How to build header files.
453 ##
454
455 ## We have special rules for certain headers.
456 omitted_headers = java/lang/ClassLoader.h java/lang/Thread.h \
457         java/lang/String.h java/lang/reflect/Constructor.h \
458         java/lang/reflect/Field.h java/lang/reflect/Method.h \
459         java/lang/reflect/Proxy.h gnu/gcj/runtime/ExtensionClassLoader.h
460
461 inner_nat_headers = java/io/ObjectOutputStream$$PutField.h \
462         java/io/ObjectInputStream$$GetField.h \
463         java/nio/DirectByteBufferImpl$$ReadWrite.h \
464         java/nio/channels/Pipe$$SinkChannel.h \
465         java/nio/channels/Pipe$$SourceChannel.h \
466         java/lang/VMProcess$ImmediateEOFInputStream.h \
467         java/lang/reflect/Proxy$$ProxyData.h \
468         java/lang/reflect/Proxy$$ProxyType.h \
469         gnu/java/net/PlainSocketImpl$$SocketInputStream.h \
470         gnu/java/net/PlainSocketImpl$$SocketOutputStream.h \
471         gnu/java/nio/PipeImpl$$SinkChannelImpl.h \
472         gnu/java/nio/PipeImpl$$SourceChannelImpl.h
473
474 generic_header_files = $(ordinary_header_files) $(inner_nat_headers) \
475         $(xlib_nat_headers)
476
477 MYGCJH = gjavah
478
479 $(generic_header_files): gcjh.stamp
480
481 gcjh.stamp: classpath/lib/compile-classes
482 if JAVA_MAINTAINER_MODE
483         $(MYGCJH) --cni --all $(srcdir)/classpath/lib \
484             --cmdfile=$(srcdir)/headers.txt -d $(srcdir) --force
485 endif
486         echo > gcjh.stamp
487
488 nat_headers = $(ordinary_header_files) $(inner_nat_headers)
489 nat_headers_install = $(ordinary_header_files)
490
491 xlib_nat_headers = $(gnu_awt_xlib_header_files) $(gnu_gcj_xlib_header_files)
492
493 ## Headers we maintain by hand and which we want to install.
494 extra_headers = java/lang/Object.h java/lang/Class.h
495
496 $(extra_headers) $(srcdir)/java/lang/Object.h $(srcdir)/java/lang/Class.h:
497         @:
498
499 install-exec-hook: install-binPROGRAMS install-toolexeclibLTLIBRARIES \
500         install-libexecsubPROGRAMS
501 ## Support for libgcj_bc: dummy shared library used only at link-time.
502 if USE_LIBGCJ_BC
503 ## Install libgcj_bc dummy lib in the target directory. We also need to delete
504 ## libtool's .la file, this prevents libtool resetting the lib again 
505 ## later.
506         @echo Installing dummy lib libgcj_bc.so.1.0.0; \
507         rm $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so; \
508         mv $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1.0.0 $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so; \
509         $(libgcj_bc_dummy_LINK) -xc /dev/null -Wl,-soname,libgcj_bc.so.1 \
510         -o $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1.0.0 -lgcj || exit; \
511         rm $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1; \
512         $(LN_S) libgcj_bc.so.1.0.0 $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1; \
513         rm $(DESTDIR)$(toolexeclibdir)/libgcj_bc.la;
514 endif
515 if BUILD_ECJ1
516 ## Undo any prepending of the target prefix and transform
517 ## to the actual host's executable suffix.
518         mv $(DESTDIR)$(libexecsubdir)/`echo ecjx | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` $(DESTDIR)$(libexecsubdir)/ecj1$(host_exeext)
519 endif BUILD_ECJ1
520
521 ## Install the headers.  It is fairly ugly that we have to do this by
522 ## hand.
523 install_data_local_split = 50
524 install-data-local:
525         $(PRE_INSTALL)
526 ## Install the .pc file.
527         @pc_version=`echo $(GCJVERSION) | sed -e 's/[.][^.]*$$//'`; \
528         file="libgcj-$${pc_version}.pc"; \
529         $(mkinstalldirs) $(DESTDIR)$(pkgconfigdir); \
530         echo "  $(INSTALL_DATA) libgcj.pc $(DESTDIR)$(pkgconfigdir)/$$file"; \
531         $(INSTALL_DATA) libgcj.pc $(DESTDIR)$(pkgconfigdir)/$$file
532 ## We use a GNU make trick here so that we don't go over the command
533 ## length limit of some shells.
534         @echo Creating list of headers to install...
535         @: $(call write_entries_to_file,$(nat_headers_install) $(extra_headers),tmp-ilist)
536         @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
537         while read file; do echo "$$file $$file"; done < tmp-ilist | \
538         sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
539         $(AWK) 'BEGIN { files["."] = "" } \
540           { files[$$2] = files[$$2] " " $$1; \
541             if (++n[$$2] == $(install_data_local_split)) { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
542              END { for (dir in files) print dir, files[dir] }' | \
543         while read dir files; do \
544           xfiles=; for file in $$files; do \
545             if test -f "$$file"; then xfiles="$$xfiles $$file"; \
546             else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \
547           test -z "$$xfiles" || { \
548             test "x$$dir" = x. || { \
549               echo "$(mkinstalldirs) $(DESTDIR)$(gxx_include_dir)/$$dir"; \
550               $(mkinstalldirs) $(DESTDIR)$(gxx_include_dir)/$$dir; }; \
551             echo " $(INSTALL_DATA) $$xfiles $(DESTDIR)$(gxx_include_dir)/$$dir"; \
552             $(INSTALL_DATA) $$xfiles $(DESTDIR)$(gxx_include_dir)/$$dir; }; \
553         done
554         -@rm -f tmp-ilist
555 ## Install inner class headers.
556         $(INSTALL_DATA) $(srcdir)/'java/io/ObjectOutputStream$$PutField.h' $(DESTDIR)$(gxx_include_dir)/java/io/
557         $(INSTALL_DATA) $(srcdir)/'java/io/ObjectInputStream$$GetField.h' $(DESTDIR)$(gxx_include_dir)/java/io/
558         $(INSTALL_DATA) $(srcdir)/'java/nio/channels/Pipe$$SinkChannel.h' $(DESTDIR)$(gxx_include_dir)/java/nio/channels/
559         $(INSTALL_DATA) $(srcdir)/'java/nio/channels/Pipe$$SourceChannel.h' $(DESTDIR)$(gxx_include_dir)/java/nio/channels/
560         $(INSTALL_DATA) $(srcdir)/'java/lang/reflect/Proxy$$ProxyData.h' $(DESTDIR)$(gxx_include_dir)/java/lang/reflect/
561         $(INSTALL_DATA) $(srcdir)/'java/lang/reflect/Proxy$$ProxyType.h' $(DESTDIR)$(gxx_include_dir)/java/lang/reflect/
562         $(INSTALL_DATA) $(srcdir)/'gnu/java/net/PlainSocketImpl$$SocketInputStream.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/net/
563         $(INSTALL_DATA) $(srcdir)/'gnu/java/net/PlainSocketImpl$$SocketOutputStream.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/net/
564         $(INSTALL_DATA) $(srcdir)/'gnu/java/nio/PipeImpl$$SinkChannelImpl.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/nio/
565         $(INSTALL_DATA) $(srcdir)/'gnu/java/nio/PipeImpl$$SourceChannelImpl.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/nio/
566 ## Don't install java/nio/DirectByteBufferImpl$$ReadWrite.h here. It's for internal use only.
567 ## Install Python modules for aot-compile.
568         $(mkinstalldirs) $(DESTDIR)$(python_mod_dir); \
569         $(INSTALL_DATA) $(srcdir)/contrib/classfile.py \
570           $(DESTDIR)$(python_mod_dir)/classfile.py; \
571         $(INSTALL_DATA) contrib/aotcompile.py \
572           $(DESTDIR)$(python_mod_dir)/aotcompile.py;
573 if CREATE_JAVA_HOME
574 ## Create sdk style directories
575         $(mkinstalldirs) $(DESTDIR)$(JRE_BIN_DIR)
576         $(mkinstalldirs) $(DESTDIR)$(SDK_BIN_DIR)
577         $(mkinstalldirs) $(DESTDIR)$(JRE_LIB_DIR)
578         $(mkinstalldirs) $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)
579         $(mkinstalldirs) $(DESTDIR)$(SDK_INCLUDE_DIR)
580         $(mkinstalldirs) $(DESTDIR)$(SDK_INCLUDE_DIR)/$(OS)
581         relative() { \
582           $(PERL) -e 'use File::Spec; \
583             print File::Spec->abs2rel($$ARGV[0], $$ARGV[1])' $$1 $$2; \
584         }; \
585         RELATIVE=$$(relative $(DESTDIR)$(bindir) $(DESTDIR)$(SDK_BIN_DIR)); \
586         ln -sf $$RELATIVE/`echo gij | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
587           $(DESTDIR)$(SDK_BIN_DIR)/java; \
588         ln -sf $$RELATIVE/`echo gjar | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
589           $(DESTDIR)$(SDK_BIN_DIR)/jar; \
590         ln -sf $$RELATIVE/`echo gjdoc | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
591           $(DESTDIR)$(SDK_BIN_DIR)/javadoc; \
592         ln -sf $$RELATIVE/`echo grmic | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
593           $(DESTDIR)$(SDK_BIN_DIR)/rmic; \
594         ln -sf $$RELATIVE/`echo gjavah | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
595           $(DESTDIR)$(SDK_BIN_DIR)/javah; \
596         ln -sf $$RELATIVE/`echo gappletviewer | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
597           $(DESTDIR)$(SDK_BIN_DIR)/appletviewer; \
598         ln -sf $$RELATIVE/`echo gjarsigner | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
599           $(DESTDIR)$(SDK_BIN_DIR)/jarsigner; \
600         ln -sf $$RELATIVE/`echo grmiregistry | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
601           $(DESTDIR)$(SDK_BIN_DIR)/rmiregistry; \
602         ln -sf $$RELATIVE/`echo gkeytool | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
603           $(DESTDIR)$(SDK_BIN_DIR)/keytool; \
604         ln -sf $$RELATIVE/`echo gorbd | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
605           $(DESTDIR)$(SDK_BIN_DIR)/orbd; \
606         ln -sf $$RELATIVE/`echo gnative2ascii | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
607           $(DESTDIR)$(SDK_BIN_DIR)/native2ascii; \
608         ln -sf $$RELATIVE/`echo grmid | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
609           $(DESTDIR)$(SDK_BIN_DIR)/rmid; \
610         ln -sf $$RELATIVE/`echo gtnameserv | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
611           $(DESTDIR)$(SDK_BIN_DIR)/tnameserv; \
612         ln -sf $$RELATIVE/`echo gserialver | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
613           $(DESTDIR)$(SDK_BIN_DIR)/serialver; \
614         RELATIVE=$$(relative $(DESTDIR)$(bindir) $(DESTDIR)$(JRE_BIN_DIR)); \
615         ln -sf $$RELATIVE/`echo grmiregistry | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
616           $(DESTDIR)$(JRE_BIN_DIR)/rmiregistry; \
617         ln -sf $$RELATIVE/`echo gkeytool | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
618           $(DESTDIR)$(JRE_BIN_DIR)/keytool; \
619         ln -sf $$RELATIVE/`echo gij | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
620           $(DESTDIR)$(JRE_BIN_DIR)/java; \
621         ln -sf $$RELATIVE/`echo gorbd | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
622           $(DESTDIR)$(JRE_BIN_DIR)/orbd; \
623         ln -sf $$RELATIVE/`echo grmid | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
624           $(DESTDIR)$(JRE_BIN_DIR)/rmid; \
625         ln -sf $$RELATIVE/`echo gtnameserv | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
626           $(DESTDIR)$(JRE_BIN_DIR)/tnameserv; \
627         $(mkinstalldirs) $(DESTDIR)$(JVM_JAR_DIR); \
628         version=$(JAVA_VERSION).$(BUILD_VERSION); \
629         working_dir=`pwd`; \
630         cd $(DESTDIR)$(JVM_JAR_DIR); \
631           RELATIVE=$$(relative $(DESTDIR)$(JRE_LIB_DIR) \
632             $(DESTDIR)$(JVM_JAR_DIR)); \
633           for jarname in jaas jce jdbc-stdext jndi jndi-cos jndi-dns \
634             jndi-ldap jndi-rmi jsse sasl; \
635           do \
636             ln -sf $$RELATIVE/rt.jar $$jarname-$$version.jar; \
637           done; \
638           RELATIVE=$$(relative $(DESTDIR)$(jardir) \
639             $(DESTDIR)$(JVM_JAR_DIR)); \
640           for jar in *-$$version.jar; \
641           do \
642             ln -sf $$jar $$(echo $$jar | sed "s|-$$version.jar|-$(JAVA_VERSION).jar|g"); \
643             ln -sf $$jar $$(echo $$jar | sed "s|-$$version.jar|.jar|g"); \
644           done; \
645         cd $$working_dir; \
646         $(mkinstalldirs) $(DESTDIR)$(JRE_LIB_DIR)/security; \
647         RELATIVE=$$(relative $(DESTDIR)$(toolexeclibdir)/security \
648           $(DESTDIR)$(JRE_LIB_DIR)/security); \
649         cd $(DESTDIR)$(JRE_LIB_DIR)/security; \
650           ln -sf $$RELATIVE/classpath.security java.security; \
651         cd $$working_dir; \
652         $(mkinstalldirs) $(DESTDIR)$(SDK_INCLUDE_DIR)/linux; \
653         $(mkinstalldirs) $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)/client; \
654         $(mkinstalldirs) $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)/server; \
655         $(mkinstalldirs) $(DESTDIR)$(SDK_LIB_DIR); \
656         RELATIVE=$$(relative $(DESTDIR)$(datadir)/java \
657           $(DESTDIR)$(JRE_LIB_DIR)); \
658         ln -sf $$RELATIVE/libgcj-$(gcc_version).jar \
659           $(DESTDIR)$(JRE_LIB_DIR)/rt.jar; \
660         RELATIVE=$$(relative $(DESTDIR)$(dbexecdir) \
661           $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)); \
662         ln -sf $$RELATIVE/libjawt.so \
663           $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)/libjawt.so; \
664         RELATIVE=$$(relative $(DESTDIR)$(dbexecdir) \
665           $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)/client); \
666         ln -sf $$RELATIVE/libjvm.so \
667           $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)/client/libjvm.so; \
668         RELATIVE=$$(relative $(DESTDIR)$(dbexecdir) \
669           $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)/server); \
670         ln -sf $$RELATIVE/libjvm.so \
671           $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)/server/libjvm.so;     \
672         RELATIVE=$$(relative $(DESTDIR)$(datadir)/java \
673           $(DESTDIR)$(SDK_LIB_DIR)); \
674         ln -sf $$RELATIVE/libgcj-tools-$(gcc_version).jar \
675           $(DESTDIR)$(SDK_LIB_DIR)/tools.jar; \
676         for headername in jawt jni; do \
677           DIRECTORY=$$(dirname $$($(DESTDIR)$(bindir)/`echo gcj | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
678             -print-file-name=include/$$headername.h)); \
679           RELATIVE=$$(relative $$DIRECTORY \
680             $(DESTDIR)$(SDK_INCLUDE_DIR)); \
681           ln -sf $$RELATIVE/$$headername.h \
682             $(DESTDIR)$(SDK_INCLUDE_DIR)/$$headername.h; \
683         done; \
684         for headername in jawt_md jni_md; do \
685           DIRECTORY=$$(dirname $$($(DESTDIR)$(bindir)/`echo gcj | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
686             -print-file-name=include/$$headername.h)); \
687           RELATIVE=$$(relative $$DIRECTORY \
688             $(DESTDIR)$(SDK_INCLUDE_DIR)/linux); \
689           ln -sf $$RELATIVE/$$headername.h \
690             $(DESTDIR)$(SDK_INCLUDE_DIR)/linux/$$headername.h; \
691         done; \
692         RELATIVE=$$(relative $(DESTDIR)$(datadir)/java \
693           $(DESTDIR)$(JVM_ROOT_DIR)/$(SDK_DIR)); 
694 endif
695
696 ## ################################################################
697
698 ##
699 ## Additional `check' targets for maintainer convenience.
700 ##
701
702 ## This is used for maintainer-check.  FIXME: should set from
703 ## configure using AC_CHECK_TOOL.
704 NM = nm
705
706 ## Try to make sure our library doesn't stomp the namespace.
707 maintainer-check: libgcj.la
708         $(NM) .libs/libgcj.a | grep ' T ' \
709 ## Anything with `4java' is assumed to be from .java source.
710           | grep -v '4java' \
711 ## Anything with Jv is ok.
712           | grep -v 'Jv' \
713 ## `terminate' and `unexpected' are part of the runtime.
714           | grep -v 'terminate__Fv' | grep -v 'unexpected__Fv'
715
716 ## This rule can be used to see if the headers are more or less
717 ## correct.
718 header-check: libgcj-$(gcc_version).jar $(nat_headers)
719         rm -f htest.cc; \
720         for h in $(nat_headers); do \
721           echo "#include \"$$h\"" >> htest.cc; \
722         done; \
723         $(CXXCOMPILE) -fsyntax-only htest.cc
724
725 ## This rule can be used to see if all the .class files verify
726 ## correctly.
727 class-check: libgcj-$(gcc_version).jar
728         @ok=0; find . -name '*.class' -print | fgrep -v testsuite | \
729         while read f; do \
730           echo "$(GCJ_WITH_FLAGS) --syntax-only $$f"; \
731           if $(GCJ_WITH_FLAGS) --syntax-only $$f; then \
732           :; else ok=1; fi; \
733         done; exit $$ok
734
735 ## This rule checks whether write_entries_to_file works properly.
736 write-entries-to-file-check:
737         @echo Creating list of files to link...
738         @: $(call write_entries_to_file,$(libgcj_la_OBJECTS) $(libgcj_la_LIBADD),libgcj.objectlist)
739
740 ## ################################################################
741
742 ##
743 ## The `jv-convert' program and code to rebuild the converter header
744 ## files.
745 ##
746
747 ## it only makes sense to try to rebuild the JIS .h files on native
748 ## systems.
749 if NATIVE
750 if MAINTAINER_MODE
751 noinst_PROGRAMS += gen-from-JIS
752
753 gen_from_JIS_SOURCES = \
754         gnu/gcj/convert/gen-from-JIS.c \
755         gnu/gcj/convert/make-trie.c \
756         gnu/gcj/convert/make-trie.h
757
758 gen_from_JIS_DEPENDENCIES = \
759         gnu/gcj/convert/JIS0201.h \
760         gnu/gcj/convert/JIS0208.h \
761         gnu/gcj/convert/JIS0212.h
762
763 $(srcdir)/gnu/gcj/convert/JIS0208_to_Unicode.cc: ./gen-from-JIS$(EXEEXT)
764          ./gen-from-JIS JIS0208 >$(srcdir)/gnu/gcj/convert/JIS0208_to_Unicode.cc
765
766 $(srcdir)/gnu/gcj/convert/JIS0212_to_Unicode.cc: ./gen-from-JIS$(EXEEXT)
767          ./gen-from-JIS JIS0212 >$(srcdir)/gnu/gcj/convert/JIS0212_to_Unicode.cc
768
769 $(srcdir)/gnu/gcj/convert/Unicode_to_JIS.cc: ./gen-from-JIS$(EXEEXT)
770          ./gen-from-JIS toJIS >$(srcdir)/gnu/gcj/convert/Unicode_to_JIS.cc
771
772 # The Unicode consortium does not permit re-distributing the file JIS0201.TXT.
773 # You can get it from
774 # ftp://ftp.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/
775
776 $(srcdir)/gnu/gcj/convert/JIS0201.h: # gnu/gcj/convert/JIS0201.TXT
777         echo '/* This file is automatically generated from Unicode tables */' > tmp-0201; \
778         tr  -d '\r' <$(srcdir)/gnu/gcj/convert/JIS0201.TXT \
779         | sed -n -e 's|\(0x..\).*\(0x....\).*#\(.*\)$$|MAP(0x00, \1, \2)  /*\3 */|p' \
780         >> tmp-0201; \
781         mv tmp-0201 $(srcdir)/gnu/gcj/convert/JIS0201.h
782
783 # The Unicode consortium does not permit re-distributing the file JIS0208.TXT.
784 # You can get it from
785 # ftp://ftp.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/
786
787 $(srcdir)/gnu/gcj/convert/JIS0208.h: # gnu/gcj/convert/JIS0208.TXT
788         echo '/* This file is automatically generated from Unicode tables */' > tmp-0208; \
789         tr  -d '\r' <$(srcdir)/gnu/gcj/convert/JIS0208.TXT \
790         | sed -n -e 's|\(0x....\).*0x\(..\)\(..\).*\(0x....\).*#\(.*\)$$|MAP(0x\2, 0x\3, \4)  /*\5 */|p' \
791         >> tmp-0208; \
792         mv tmp-0208 $(srcdir)/gnu/gcj/convert/JIS0208.h
793
794 # The Unicode consortium does not permit re-distributing the file JIS0212.TXT.
795 # You can get it from
796 # ftp://ftp.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/
797
798 $(srcdir)/gnu/gcj/convert/JIS0212.h: # gnu/gcj/convert/JIS0212.TXT
799         echo '/* This file is automatically generated from Unicode tables */' > tmp-0212; \
800         tr  -d '\r' <$(srcdir)/gnu/gcj/convert/JIS0212.TXT \
801         | sed -n -e 's|0x\(..\)\(..\).*\(0x....\).*#\(.*\)$$|MAP(0x\1, 0x\2, \3)  /*\4 */|p' \
802         >> tmp-0212; \
803         mv tmp-0212 $(srcdir)/gnu/gcj/convert/JIS0212.h
804
805 endif
806 endif 
807
808
809 jv_convert_SOURCES =
810 ## We need -nodefaultlibs because we want to avoid gcj's `-lgcj'.  We
811 ## need this because we are explicitly using libtool to link using the
812 ## `.la' file.
813 jv_convert_LDFLAGS = --main=gnu.gcj.convert.Convert \
814         -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
815 jv_convert_LINK = $(GCJLINK) $(jv_convert_LDFLAGS)
816 ## We don't explicitly link in the libraries we need; libgcj.la brings
817 ## in all dependencies.  We need the -L so that gcj can find libgcj
818 ## with `-lgcj', but it must come first, otherwise the -L flags
819 ## brought in from libgcj.la would cause the install directories to be
820 ## searched before the build-tree ones, and we'd get errors because of
821 ## different libraries with the same SONAME from picky linkers such as
822 ## Solaris'.  FIXME: should be _libs on some systems.
823 jv_convert_LDADD = -L$(here)/.libs libgcj.la
824 ## Depend on the spec file to make sure it is up to date before
825 ## linking this program.
826 jv_convert_DEPENDENCIES = libgcj.la libgcj.spec
827
828 gcj_dbtool_SOURCES = \
829 gnu/gcj/tools/gcj_dbtool/natMain.cc
830
831 ## We need -nodefaultlibs because we want to avoid gcj's `-lgcj'.  We
832 ## need this because we are explicitly using libtool to link using the
833 ## `.la' file.
834 gcj_dbtool_LDFLAGS = --main=gnu.gcj.tools.gcj_dbtool.Main \
835         -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
836 gcj_dbtool_LINK = $(GCJLINK) $(gcj_dbtool_LDFLAGS)
837 ## We don't explicitly link in the libraries we need; libgcj.la brings
838 ## in all dependencies.  We need the -L so that gcj can find libgcj
839 ## with `-lgcj', but it must come first, otherwise the -L flags
840 ## brought in from libgcj.la would cause the install directories to be
841 ## searched before the build-tree ones, and we'd get errors because of
842 ## different libraries with the same SONAME from picky linkers such as
843 ## Solaris'.  FIXME: should be _libs on some systems.
844 gcj_dbtool_LDADD = gnu/gcj/tools/gcj_dbtool.lo -L$(here)/.libs libgcj.la
845 ## Depend on the spec file to make sure it is up to date before
846 ## linking this program.
847 gcj_dbtool_DEPENDENCIES = gnu/gcj/tools/gcj_dbtool.lo libgcj.la libgcj.spec
848
849 gc_analyze_SOURCES =
850
851 ## We need -nodefaultlibs because we want to avoid gcj's `-lgcj'.  We
852 ## need this because we are explicitly using libtool to link using the
853 ## `.la' file.
854 gc_analyze_LDFLAGS = --main=gnu.gcj.tools.gc_analyze.MemoryAnalyze \
855         -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
856 gc_analyze_LINK = $(GCJLINK) $(gc_analyze_LDFLAGS)
857 ## See jv_convert_LDADD.
858 gc_analyze_LDADD = -L$(here)/.libs libgcj-tools.la libgcj.la
859 ## Depend on the spec file to make sure it is up to date before
860 ## linking this program.
861 gc_analyze_DEPENDENCIES = libgcj-tools.la libgcj.la libgcj.spec
862
863 gij_SOURCES = 
864 ## We need -nodefaultlibs because we want to avoid gcj's `-lgcj'.  We
865 ## need this because we are explicitly using libtool to link using the
866 ## `.la' file.
867 gij_LDFLAGS = -rpath $(dbexecdir) -rpath $(toolexeclibdir) \
868         -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags) \
869         $(extra_gij_ldflags) 
870 gij_LINK = $(GCJLINK) $(gij_LDFLAGS)
871 ## See jv_convert_LDADD.
872 gij_LDADD = -L$(here)/.libs libgij.la
873 ## Depend on the spec file to make sure it is up to date before
874 ## linking this program.
875 gij_DEPENDENCIES = libgij.la
876
877 ## Build an ecjx from a .jar.
878 ecjx_SOURCES = ecjx.cc
879 ## We use the BC ABI here so that we don't need to compile ecj.jar.
880 ## Hopefully the user has compiled it into his system .db.
881 ## However, even if not it will run reasonably quickly.
882
883 ECJX_BASE_FLAGS = -findirect-dispatch \
884         --main=org.eclipse.jdt.internal.compiler.batch.GCCMain
885
886 if NATIVE
887
888 ecjx_LINK = $(GCJLINK) $(ecjx_LDFLAGS)
889
890 if ENABLE_SHARED
891 ## Use ecj.jar at runtime.
892 ecjx_LDFLAGS = $(ECJX_BASE_FLAGS) -Djava.class.path=$(ECJ_JAR)
893 else !ENABLE_SHARED
894 ## Use ecj.jar at compile time.
895 ecjx_LDFLAGS = $(ECJX_BASE_FLAGS) $(ECJ_BUILD_JAR) -fbootclasspath=$(BOOTCLASSPATH)
896 endif !ENABLE_SHARED
897
898 ecjx_LDADD = -L$(here)/.libs $(extra_ldflags)
899 ecjx_DEPENDENCIES = libgcj.la libgcj.spec
900 if USE_LIBGCJ_BC
901 ecjx_DEPENDENCIES += libgcj_bc.la
902 else
903 ecjx_LDADD += libgcj.la
904 endif
905
906 else !NATIVE
907
908 ecjx_LINK = $(GCJ_FOR_ECJX_LINK) $(ecjx_LDFLAGS)
909 ecjx_LDFLAGS = $(ECJX_BASE_FLAGS) $(ECJ_BUILD_JAR)
910 ecjx_LDADD = 
911 ecjx_DEPENDENCIES = 
912
913 endif !NATIVE
914
915 ## This is a dummy definition.
916 gappletviewer_SOURCES =
917 gappletviewer_LDFLAGS = --main=gnu.classpath.tools.appletviewer.Main \
918         -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
919 gappletviewer_LINK = $(GCJLINK) $(gappletviewer_LDFLAGS)
920 ## See jv_convert_LDADD.
921 gappletviewer_LDADD = -L$(here)/.libs libgcj-tools.la
922 gappletviewer_DEPENDENCIES = libgcj-tools.la
923
924 ## This is a dummy definition.
925 gjarsigner_SOURCES =
926 gjarsigner_LDFLAGS = --main=gnu.classpath.tools.jarsigner.Main \
927         -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
928 gjarsigner_LINK = $(GCJLINK) $(gjarsigner_LDFLAGS)
929 ## See jv_convert_LDADD.
930 gjarsigner_LDADD = -L$(here)/.libs libgcj-tools.la
931 gjarsigner_DEPENDENCIES = libgcj-tools.la
932
933 ## This is a dummy definition.
934 gkeytool_SOURCES =
935 gkeytool_LDFLAGS = --main=gnu.classpath.tools.keytool.Main \
936         -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
937 gkeytool_LINK = $(GCJLINK) $(gkeytool_LDFLAGS)
938 ## See jv_convert_LDADD.
939 gkeytool_LDADD = -L$(here)/.libs libgcj-tools.la
940 gkeytool_DEPENDENCIES = libgcj-tools.la
941
942 ## This is a dummy definition.
943 gjar_SOURCES =
944 gjar_LDFLAGS = --main=gnu.classpath.tools.jar.Main \
945         -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
946 gjar_LINK = $(GCJLINK) $(gjar_LDFLAGS)
947 ## See jv_convert_LDADD.
948 gjar_LDADD = -L$(here)/.libs libgcj-tools.la
949 gjar_DEPENDENCIES = libgcj-tools.la
950
951 ## This is a dummy definition.
952 gjavah_SOURCES =
953 gjavah_LDFLAGS = --main=gnu.classpath.tools.javah.Main \
954         -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
955 gjavah_LINK = $(GCJLINK) $(gjavah_LDFLAGS)
956 ## See jv_convert_LDADD.
957 gjavah_LDADD = -L$(here)/.libs libgcj-tools.la
958 gjavah_DEPENDENCIES = libgcj-tools.la
959
960 ## This is a dummy definition.
961 gcjh_SOURCES =
962 gcjh_LDFLAGS = --main=gnu.classpath.tools.javah.GcjhMain \
963         -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
964 gcjh_LINK = $(GCJLINK) $(gcjh_LDFLAGS)
965 ## See jv_convert_LDADD.
966 gcjh_LDADD = -L$(here)/.libs libgcj-tools.la
967 gcjh_DEPENDENCIES = libgcj-tools.la
968
969 ## This is a dummy definition.
970 gnative2ascii_SOURCES =
971 gnative2ascii_LDFLAGS = --main=gnu.classpath.tools.native2ascii.Native2ASCII \
972         -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
973 gnative2ascii_LINK = $(GCJLINK) $(gnative2ascii_LDFLAGS)
974 ## See jv_convert_LDADD.
975 gnative2ascii_LDADD = -L$(here)/.libs libgcj-tools.la
976 gnative2ascii_DEPENDENCIES = libgcj-tools.la
977
978 ## This is a dummy definition.
979 gorbd_SOURCES =
980 gorbd_LDFLAGS = --main=gnu.classpath.tools.orbd.Main \
981         -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
982 gorbd_LINK = $(GCJLINK) $(gorbd_LDFLAGS)
983 ## See jv_convert_LDADD.
984 gorbd_LDADD = -L$(here)/.libs libgcj-tools.la
985 gorbd_DEPENDENCIES = libgcj-tools.la
986
987 ## This is a dummy definition.
988 grmid_SOURCES =
989 grmid_LDFLAGS = --main=gnu.classpath.tools.rmid.Main \
990         -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
991 grmid_LINK = $(GCJLINK) $(grmid_LDFLAGS)
992 ## See jv_convert_LDADD.
993 grmid_LDADD = -L$(here)/.libs libgcj-tools.la
994 grmid_DEPENDENCIES = libgcj-tools.la
995
996 ## This is a dummy definition.
997 gserialver_SOURCES =
998 gserialver_LDFLAGS = --main=gnu.classpath.tools.serialver.SerialVer \
999         -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
1000 gserialver_LINK = $(GCJLINK) $(gserialver_LDFLAGS)
1001 ## See jv_convert_LDADD.
1002 gserialver_LDADD = -L$(here)/.libs libgcj-tools.la
1003 gserialver_DEPENDENCIES = libgcj-tools.la
1004
1005 ## This is a dummy definition.
1006 gtnameserv_SOURCES =
1007 gtnameserv_LDFLAGS = --main=gnu.classpath.tools.tnameserv.Main \
1008         -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
1009 gtnameserv_LINK = $(GCJLINK) $(gtnameserv_LDFLAGS)
1010 ## See jv_convert_LDADD.
1011 gtnameserv_LDADD = -L$(here)/.libs libgcj-tools.la
1012 gtnameserv_DEPENDENCIES = libgcj-tools.la
1013
1014 ## This is a dummy definition.
1015 grmic_SOURCES =
1016 grmic_LDFLAGS = --main=gnu.classpath.tools.rmic.Main \
1017         -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
1018 grmic_LINK = $(GCJLINK) $(grmic_LDFLAGS)
1019 ## See jv_convert_LDADD.
1020 grmic_LDADD = -L$(here)/.libs libgcj-tools.la
1021 grmic_DEPENDENCIES = libgcj-tools.la
1022
1023 ## This is a dummy definition.
1024 grmiregistry_SOURCES =
1025 grmiregistry_LDFLAGS = --main=gnu.classpath.tools.rmiregistry.Main \
1026         -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
1027 grmiregistry_LINK = $(GCJLINK) $(grmiregistry_LDFLAGS)
1028 ## See jv_convert_LDADD.
1029 grmiregistry_LDADD = -L$(here)/.libs libgcj-tools.la
1030 grmiregistry_DEPENDENCIES = libgcj-tools.la
1031
1032 ## This is a dummy definition.
1033 gjdoc_SOURCES =
1034 gjdoc_LDFLAGS = --main=gnu.classpath.tools.gjdoc.Main \
1035         -Djava.class.path=$(ANTLR_JAR) \
1036         -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
1037 gjdoc_LINK = $(GCJLINK) $(gjdoc_LDFLAGS)
1038 ## See jv_convert_LDADD.
1039 gjdoc_LDADD = -L$(here)/.libs libgcj-tools.la
1040 gjdoc_DEPENDENCIES = libgcj-tools.la
1041
1042 ## ################################################################
1043 if INTERPRETER
1044 nat_jdwp_source_files = \
1045 gnu/classpath/jdwp/natVMFrame.cc \
1046 gnu/classpath/jdwp/natVMMethod.cc \
1047 gnu/classpath/jdwp/natVMVirtualMachine.cc
1048
1049 nat_jvmti_source_files = \
1050 gnu/gcj/jvmti/natBreakpoint.cc \
1051 gnu/gcj/jvmti/natNormalBreakpoint.cc
1052 else
1053 nat_jdwp_source_files = 
1054 nat_jvmti_source_files =
1055 endif
1056 ## This lists all the C++ source files in subdirectories.
1057 nat_source_files = \
1058 $(nat_jdwp_source_files) \
1059 gnu/classpath/natConfiguration.cc \
1060 gnu/classpath/natSystemProperties.cc \
1061 gnu/classpath/natVMStackWalker.cc \
1062 gnu/gcj/natCore.cc \
1063 gnu/gcj/convert/JIS0208_to_Unicode.cc \
1064 gnu/gcj/convert/JIS0212_to_Unicode.cc \
1065 gnu/gcj/convert/Unicode_to_JIS.cc \
1066 gnu/gcj/convert/natIconv.cc \
1067 gnu/gcj/convert/natInput_EUCJIS.cc \
1068 gnu/gcj/convert/natInput_SJIS.cc \
1069 gnu/gcj/convert/natOutput_EUCJIS.cc \
1070 gnu/gcj/convert/natOutput_SJIS.cc \
1071 gnu/gcj/io/natSimpleSHSStream.cc \
1072 gnu/gcj/io/shs.cc \
1073 $(nat_jvmti_source_files) \
1074 gnu/gcj/runtime/natFinalizerThread.cc \
1075 gnu/gcj/runtime/natSharedLibLoader.cc \
1076 gnu/gcj/runtime/natSystemClassLoader.cc \
1077 gnu/gcj/runtime/natStringBuffer.cc \
1078 gnu/gcj/util/natDebug.cc \
1079 gnu/gcj/util/natGCInfo.cc \
1080 gnu/java/lang/natMainThread.cc \
1081 gnu/java/lang/management/natVMClassLoadingMXBeanImpl.cc \
1082 gnu/java/lang/management/natVMCompilationMXBeanImpl.cc \
1083 gnu/java/lang/management/natVMGarbageCollectorMXBeanImpl.cc \
1084 gnu/java/lang/management/natVMMemoryMXBeanImpl.cc \
1085 gnu/java/lang/management/natVMMemoryManagerMXBeanImpl.cc \
1086 gnu/java/lang/management/natVMMemoryPoolMXBeanImpl.cc \
1087 gnu/java/lang/management/natVMOperatingSystemMXBeanImpl.cc \
1088 gnu/java/lang/management/natVMRuntimeMXBeanImpl.cc \
1089 gnu/java/lang/management/natVMThreadMXBeanImpl.cc \
1090 gnu/java/net/natPlainDatagramSocketImpl.cc \
1091 gnu/java/net/natPlainSocketImpl.cc \
1092 gnu/java/net/protocol/core/natCoreInputStream.cc \
1093 gnu/java/nio/natVMPipe.cc \
1094 gnu/java/nio/natVMSelector.cc \
1095 gnu/java/nio/natNIOServerSocket.cc \
1096 gnu/java/nio/natVMChannel.cc \
1097 gnu/java/nio/channels/natFileChannelImpl.cc \
1098 gnu/java/security/jce/prng/natVMSecureRandom.cc \
1099 java/io/natFile.cc \
1100 java/io/natVMObjectInputStream.cc \
1101 java/io/natVMObjectStreamClass.cc \
1102 java/lang/natCharacter.cc \
1103 java/lang/natClass.cc \
1104 java/lang/natClassLoader.cc \
1105 java/lang/natConcreteProcess.cc \
1106 java/lang/natVMDouble.cc \
1107 java/lang/natVMFloat.cc \
1108 java/lang/natMath.cc \
1109 java/lang/natObject.cc \
1110 java/lang/natRuntime.cc \
1111 java/lang/natString.cc \
1112 java/lang/natAbstractStringBuffer.cc \
1113 java/lang/natSystem.cc \
1114 java/lang/natThread.cc \
1115 java/lang/natThreadLocal.cc \
1116 java/lang/natVMClassLoader.cc \
1117 java/lang/natVMProcess.cc \
1118 java/lang/natVMThrowable.cc \
1119 java/lang/ref/natReference.cc \
1120 java/lang/reflect/natArray.cc \
1121 java/lang/reflect/natConstructor.cc \
1122 java/lang/reflect/natField.cc \
1123 java/lang/reflect/natMethod.cc \
1124 java/lang/reflect/natVMProxy.cc \
1125 java/net/natVMInetAddress.cc \
1126 java/net/natVMNetworkInterface.cc \
1127 java/net/natVMURLConnection.cc \
1128 java/nio/channels/natVMChannels.cc \
1129 java/nio/natVMDirectByteBufferImpl.cc \
1130 java/security/natVMAccessController.cc \
1131 java/security/natVMAccessControlState.cc \
1132 java/text/natCollator.cc \
1133 java/util/natVMTimeZone.cc \
1134 java/util/concurrent/atomic/natAtomicLong.cc \
1135 java/util/logging/natLogger.cc \
1136 java/util/zip/natDeflater.cc \
1137 java/util/zip/natInflater.cc \
1138 sun/misc/natUnsafe.cc
1139
1140 xlib_nat_source_files = \
1141 gnu/gcj/xlib/natClip.cc \
1142 gnu/gcj/xlib/natColormap.cc \
1143 gnu/gcj/xlib/natDisplay.cc \
1144 gnu/gcj/xlib/natDrawable.cc \
1145 gnu/gcj/xlib/natFont.cc \
1146 gnu/gcj/xlib/natGC.cc \
1147 gnu/gcj/xlib/natPixmap.cc \
1148 gnu/gcj/xlib/natScreen.cc \
1149 gnu/gcj/xlib/natVisual.cc \
1150 gnu/gcj/xlib/natWMSizeHints.cc \
1151 gnu/gcj/xlib/natWindow.cc \
1152 gnu/gcj/xlib/natWindowAttributes.cc \
1153 gnu/gcj/xlib/natXAnyEvent.cc \
1154 gnu/gcj/xlib/natXButtonEvent.cc \
1155 gnu/gcj/xlib/natXColor.cc \
1156 gnu/gcj/xlib/natXConfigureEvent.cc \
1157 gnu/gcj/xlib/natXException.cc \
1158 gnu/gcj/xlib/natXExposeEvent.cc \
1159 gnu/gcj/xlib/natXImage.cc \
1160 gnu/gcj/xlib/natXUnmapEvent.cc
1161
1162 ## ################################################################
1163
1164 ##
1165 ## Creating and installing sources.zip
1166 ##
1167
1168 ## Create a zip holding all the sources.  This can be meaningfully
1169 ## used in Eclipse.
1170 src.zip:
1171         -rm -f src.zip
1172         here=`pwd`; \
1173         ( \
1174           ( cd $(srcdir)/classpath; \
1175           find java gnu javax org sun -name '*.java' -print | \
1176           while read file; do \
1177 ## Ugly code to avoid "echo -C".  Must separate each entry by a newline
1178 ## Gross but easy.
1179             echo "x-C" | sed -e 's/^.//'; \
1180             echo $(srcdir)/classpath; \
1181             echo $$file; \
1182           done ); \
1183           ( cd $(srcdir)/classpath/external/sax; \
1184           find org -name '*.java' -print | \
1185           while read file; do \
1186             echo "x-C" | sed -e 's/^.//'; \
1187             echo $(srcdir)/classpath/external/sax; \
1188             echo $$file; \
1189           done ); \
1190           ( cd $(srcdir)/classpath/external/relaxngDatatype; \
1191           find org -name '*.java' -print | \
1192           while read file; do \
1193             echo "x-C" | sed -e 's/^.//'; \
1194             echo $(srcdir)/classpath/external/relaxngDatatype; \
1195             echo $$file; \
1196           done ); \
1197           ( cd $(srcdir)/classpath/external/w3c_dom; \
1198           find org -name '*.java' -print | \
1199           while read file; do \
1200             echo "x-C" | sed -e 's/^.//'; \
1201             echo $(srcdir)/classpath/external/w3c_dom; \
1202             echo $$file; \
1203           done ); \
1204 ## Now the build tree.
1205           ( cd classpath; \
1206             find gnu java -name '*.java' -print | \
1207             while read file; do \
1208             echo "x-C" | sed -e 's/^.//'; \
1209             echo `pwd`; \
1210             echo $$file; \
1211           done ); \
1212         ) | \
1213 ## Many of the above circumlocutions were because ZIP used to be a
1214 ## relative path to fastjar.  It didn't seem worthwhile to change the
1215 ## code when we moved to an external jar.
1216         $(JAR) -cfM@ $$here/src.zip
1217 ## Override GNU Classpath sources with libgcj replacements.
1218         here=`pwd`; \
1219         ( \
1220           ( cd $(srcdir); \
1221           find gnu java -name '*.java' -print | \
1222           while read file; do \
1223             echo "x-C" | sed -e 's/^.//'; \
1224             echo $(srcdir); \
1225             echo $$file; \
1226           done ); \
1227         ) | \
1228         $(JAR) -ufM@ $$here/src.zip
1229
1230 ## We use a variable for this in case the user wants to override it.
1231 sourcesdir = $(jardir)
1232
1233 install-src.zip: src.zip
1234         $(INSTALL_DATA) src.zip $(DESTDIR)$(sourcesdir)/src-$(gcc_version).zip
1235
1236
1237 ## ################################################################
1238
1239 ##
1240 ## Dependency tracking madness.
1241 ##
1242
1243 ## This is an evil hack to work around an automake limitation.  We
1244 ## need to ensure that all CNI headers are built, not just the ones
1245 ## used internally by libgcj. We can't make the .o files depend on
1246 ## nat_headers, because in that case we'll force a complete rebuild of
1247 ## the C++ code whenever any .java file is touched.  So instead we
1248 ## have a dummy rule which is only used once, namely the first time a
1249 ## build is done.  On subsequent builds, the dependency tracking for
1250 ## the .cc compilations will have picked up the .h files, and these
1251 ## will be built directly as needed.
1252
1253 headers.stamp:
1254 ## Note that we don't use a real dependency here, since we don't want
1255 ## to rebuild all the headers here when the header list changes.  If
1256 ## we did rebuild here, then any addition of a .java file would cause
1257 ## a large number of recompilations.
1258         $(MAKE) create-headers
1259         @echo > headers.stamp
1260
1261 headers_to_make = $(nat_headers)
1262 if XLIB_AWT
1263 headers_to_make += $(xlib_nat_headers)
1264 endif
1265
1266 create-headers: $(headers_to_make)
1267
1268 .PHONY: create-headers
1269
1270 $(libgcj_la_OBJECTS) $(gcj_dbtool_OBJECTS) $(xlib_nat_files): headers.stamp
1271 $(libgij_la_OBJECTS): headers.stamp
1272 $(libjvm_la_OBJECTS): headers.stamp
1273
1274 ## ################################################################
1275
1276 ##
1277 ## This section is for make and multilib madness.
1278 ##
1279
1280 # Work around what appears to be a GNU make bug handling MAKEFLAGS
1281 # values defined in terms of make variables, as is the case for CC and
1282 # friends when we are called from the top level Makefile.
1283 AM_MAKEFLAGS = \
1284         "AR_FLAGS=$(AR_FLAGS)" \
1285         "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
1286         "CFLAGS=$(CFLAGS)" \
1287         "CXXFLAGS=$(CXXFLAGS)" \
1288         "CPPFLAGS=$(CPPFLAGS)" \
1289         "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
1290         "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
1291         "INSTALL=$(INSTALL)" \
1292         "INSTALL_DATA=$(INSTALL_DATA)" \
1293         "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
1294         "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
1295         "GCJFLAGS=$(GCJFLAGS)" \
1296         "LDFLAGS=$(LDFLAGS)" \
1297         "LIBCFLAGS=$(LIBCFLAGS)" \
1298         "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
1299         "MAKE=$(MAKE)" \
1300         "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
1301         "PICFLAG=$(PICFLAG)" \
1302         "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
1303         "SHELL=$(SHELL)" \
1304         "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
1305         "exec_prefix=$(exec_prefix)" \
1306         "datadir=$(datadir)" \
1307         "infodir=$(infodir)" \
1308         "libdir=$(libdir)" \
1309         "mandir=$(mandir)" \
1310         "prefix=$(prefix)" \
1311         "gxx_include_dir=$(gxx_include_dir)" \
1312         "AR=$(AR)" \
1313         "AS=$(AS)" \
1314         "LD=$(LD)" \
1315         "LIBCFLAGS=$(LIBCFLAGS)" \
1316         "NM=$(NM)" \
1317         "PICFLAG=$(PICFLAG)" \
1318         "RANLIB=$(RANLIB)" \
1319         "DESTDIR=$(DESTDIR)" \
1320         "JAR=$(JAR)"
1321
1322 # Subdir rules rely on $(FLAGS_TO_PASS)
1323 FLAGS_TO_PASS = $(AM_MAKEFLAGS)
1324
1325 CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.host
1326
1327 MAKEOVERRIDES=
1328
1329 # Multilib support variables.
1330 MULTISRCTOP =
1331 MULTIBUILDTOP =
1332 MULTIDIRS =
1333 MULTISUBDIR =
1334 MULTIDO = true
1335 MULTICLEAN = true
1336
1337 # Multilib support.
1338 .PHONY: all-multi mostlyclean-multi clean-multi distclean-multi \
1339         maintainer-clean-multi
1340
1341 all-recursive: all-multi
1342 install-recursive: install-multi
1343 mostlyclean-recursive: mostlyclean-multi
1344 clean-recursive: clean-multi
1345 distclean-recursive: distclean-multi
1346 maintainer-clean-recursive: maintainer-clean-multi
1347
1348 all-multi:
1349         : $(MAKE) ; exec $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do
1350 install-multi:
1351         $(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do
1352 mostlyclean-multi:
1353         $(MULTICLEAN) $(AM_MAKEFLAGS) DO=mostlyclean multi-clean
1354 clean-multi:
1355         $(MULTICLEAN) $(AM_MAKEFLAGS) DO=clean multi-clean
1356 distclean-multi:
1357         $(MULTICLEAN) $(AM_MAKEFLAGS) DO=distclean multi-clean
1358 maintainer-clean-multi:
1359         $(MULTICLEAN) $(AM_MAKEFLAGS) DO=maintainer-clean multi-clean