OSDN Git Service

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