Makefile.am (src.zip): Update src.zip file search to look in classpath directory.
[gcc.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
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. Each entry is written individually
17 # to accomodate systems with severe command-line-length
18 # limitations.
19 # Parameters:
20 # $(1): variable containing entries to iterate over
21 # $(2): output file
22 write_entries_to_file = $(shell rm -f $(2) || :) $(shell touch $(2)) $(foreach object,$(1),$(shell echo $(object) >> $(2)))
23
24 ## ################################################################
25
26 # autoconf2.13's target_alias
27 target_noncanonical = @target_noncanonical@
28
29 ##
30 ## What gets installed, and where.
31 ##
32
33 toolexeclib_LTLIBRARIES = libgcj.la libgij.la
34 toolexecmainlib_DATA = libgcj.spec
35
36 if XLIB_AWT
37 toolexeclib_LTLIBRARIES += lib-gnu-awt-xlib.la
38 endif
39
40 if GTK_AWT
41 toolexeclib_LTLIBRARIES += lib-gnu-java-awt-peer-gtk.la libgcjawt.la
42 endif
43
44 if QT_AWT
45 toolexeclib_LTLIBRARIES += lib-gnu-java-awt-peer-qt.la
46 endif
47
48 pkgconfigdir = $(libdir)/pkgconfig
49 pkgconfig_DATA = libgcj.pc
50
51 jardir = $(datadir)/java
52 jar_DATA = libgcj-$(gcc_version).jar
53
54 if JAVA_HOME_SET
55 JAVA_HOME_DIR = $(JAVA_HOME)
56 BOOT_CLASS_PATH_DIR = $(JAVA_HOME)/lib/rt.jar
57 else
58 JAVA_HOME_DIR = $(prefix)
59 BOOT_CLASS_PATH_DIR = $(jardir)/$(jar_DATA)
60 endif
61
62 ## FIXME: Using libdir violates GNU coding standards.
63 secdir = $(libdir)/security
64 ## Where to install default logging property file.
65 propdir = $(libdir)
66
67 ## Name of the default .db.
68 db_name = classmap.db
69 ## Compiler specific component of the .db file
70 db_pathtail = gcj-$(gcc_version)/$(db_name)
71
72 ## For now, only on native systems. FIXME.
73 if NATIVE
74 bin_PROGRAMS = jv-convert gij grmic grmiregistry gcj-dbtool
75
76 ## It is convenient to actually build and install the default database
77 ## when gcj-dbtool is available.
78 dbexec_DATA = $(db_name)
79 endif
80
81 bin_SCRIPTS = addr2name.awk
82
83 ## ################################################################
84
85 ##
86 ## Compilers and compilation flags.
87 ##
88
89 GCJH = @GCJH@
90 ZIP = @ZIP@
91
92 ## The compiler with whatever flags we want for both -c and -C
93 ## compiles.
94 GCJ_WITH_FLAGS = $(GCJ) --encoding=UTF-8 -Wno-deprecated
95
96 extra_ldflags_libjava = @extra_ldflags_libjava@
97
98 GCJLINK = $(LIBTOOL) --tag=GCJ --mode=link $(GCJ) -L$(here) $(JC1FLAGS) \
99 $(LDFLAGS) -o $@
100 LIBLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXX) -L$(here) $(JC1FLAGS) \
101 $(LDFLAGS) $(extra_ldflags_libjava) -o $@
102
103 GCC_UNWIND_INCLUDE = @GCC_UNWIND_INCLUDE@
104
105 WARNINGS = -Wextra -Wall
106 ## Some systems don't allow `$' in identifiers by default, so we force
107 ## it with -fdollars-in-identifiers. -Wswitch-enum detects bugs in
108 ## the verifier implementation, and maybe other places. We need
109 ## _GNU_SOURCE defined for some Linux builds. It doesn't hurt to
110 ## always define it. Some systems, including Linux, need
111 ## -D_FILE_OFFSET_BITS=64 to enable > 2GB file support.
112 AM_CXXFLAGS = \
113 -fno-rtti \
114 -fnon-call-exceptions \
115 $(THREADCXXFLAGS) \
116 -fdollars-in-identifiers \
117 -Wswitch-enum \
118 -D_FILE_OFFSET_BITS=64 \
119 @LIBGCJ_CXXFLAGS@ \
120 @X_CFLAGS@ \
121 $(WARNINGS) \
122 -D_GNU_SOURCE \
123 -DPREFIX="\"$(prefix)\"" \
124 -DLIBDIR="\"$(libdir)\"" \
125 -DJAVA_HOME="\"$(JAVA_HOME_DIR)\"" \
126 -DBOOT_CLASS_PATH="\"$(BOOT_CLASS_PATH_DIR)\"" \
127 -DJAVA_EXT_DIRS="\"$(jardir)/ext\"" \
128 -DGCJ_ENDORSED_DIRS="\"$(jardir)/gcj-endorsed\"" \
129 -DLIBGCJ_DEFAULT_DATABASE="\"$(dbexecdir)/$(db_name)\"" \
130 -DLIBGCJ_DEFAULT_DATABASE_PATH_TAIL="\"$(db_pathtail)\"" \
131 -DTOOLEXECLIBDIR="\"$(toolexeclibdir)\""
132
133 AM_GCJFLAGS = \
134 @LIBGCJ_JAVAFLAGS@ \
135 -fclasspath= -fbootclasspath=$(BOOTCLASSPATH) \
136 --encoding=UTF-8 \
137 -Wno-deprecated -fbootstrap-classes
138
139 AM_CFLAGS = @LIBGCJ_CFLAGS@
140 if USING_GCC
141 AM_CFLAGS += $(WARNINGS)
142 endif
143
144 ## Extra CFLAGS used for JNI C sources shared with GNU Classpath.
145 PEDANTIC_CFLAGS = -ansi -pedantic -Wall -Wno-long-long
146
147 JCFLAGS = -g
148 JC1FLAGS = @LIBGCJ_JAVAFLAGS@ $(GCJFLAGS)
149
150 LIBFFIINCS = @LIBFFIINCS@
151
152 AM_CPPFLAGS = -I$(top_srcdir) \
153 -Iinclude -I$(top_srcdir)/include \
154 -I$(top_srcdir)/classpath/include \
155 -Iclasspath/include \
156 -I$(top_srcdir)/classpath/native/fdlibm \
157 $(GCINCS) $(THREADINCS) $(INCLTDL) \
158 $(GCC_UNWIND_INCLUDE) $(ZINCS) $(LIBFFIINCS)
159
160 BOOTCLASSPATH = $(here)/classpath/lib
161
162 ## ################################################################
163
164 all_property_files = $(property_files) \
165 java/util/logging/logging.properties
166
167 ##
168 ## How to build libgcj.a and libgcj.jar
169 ##
170
171 libgij_la_SOURCES = gij.cc
172 libgij_la_DEPENDENCIES = libgcj.la libgcj.spec
173 ## See jv_convert_LDADD.
174 libgij_la_LIBADD = -L$(here)/.libs libgcj.la
175 ## The mysterious backslash in the grep pattern is consumed by make.
176 libgij_la_LDFLAGS = -rpath $(toolexeclibdir) \
177 -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC)
178
179 libgcj_la_SOURCES = prims.cc jni.cc exception.cc stacktrace.cc \
180 link.cc defineclass.cc interpret.cc verify.cc \
181 java/lang/Class.java java/lang/Object.java \
182 $(nat_source_files)
183
184 if USING_BOEHMGC
185 libgcj_la_SOURCES += boehm.cc
186 endif
187
188 if USING_NOGC
189 libgcj_la_SOURCES += nogc.cc
190 endif
191
192 if USING_POSIX_PLATFORM
193 libgcj_la_SOURCES += posix.cc
194 endif
195
196 if USING_WIN32_PLATFORM
197 libgcj_la_SOURCES += win32.cc
198 endif
199
200 if USING_DARWIN_CRT
201 libgcj_la_SOURCES += darwin.cc
202 endif
203
204 if USING_POSIX_THREADS
205 libgcj_la_SOURCES += posix-threads.cc
206 endif
207
208 if USING_WIN32_THREADS
209 libgcj_la_SOURCES += win32-threads.cc
210 endif
211
212 if USING_NO_THREADS
213 libgcj_la_SOURCES += no-threads.cc
214 endif
215
216 ## Objects from C++ sources in subdirs.
217 nat_files = $(nat_source_files:.cc=.lo)
218 xlib_nat_files = $(xlib_nat_source_files:.cc=.lo)
219
220 # Include THREADLIBS here to ensure that the correct version of
221 # certain linuxthread functions get linked:
222 ## The mysterious backslash in the grep pattern is consumed by make.
223 libgcj_la_LDFLAGS = -rpath $(toolexeclibdir) $(THREADLDFLAGS) $(THREADLIBS) \
224 $(LIBLTDL) $(SYS_ZLIBS) \
225 -version-info `grep -v '^\#' $(srcdir)/libtool-version`
226 libgcj_la_LIBADD = \
227 classpath/native/fdlibm/libfdlibm.la \
228 $(all_packages_source_files:.list=.lo) \
229 $(bc_objects) \
230 $(propertyo_files) \
231 $(LIBFFI) $(ZLIBS) $(GCLIBS)
232 libgcj_la_DEPENDENCIES = libgcj-$(gcc_version).jar \
233 $(all_packages_source_files:.list=.lo) \
234 $(LIBLTDL) $(libgcj_la_LIBADD)
235 libgcj_la_LINK = $(LIBLINK)
236
237
238 ## The .db file. This rule is only used for native builds, so it is
239 ## safe to invoke gcj-dbtool.
240 $(db_name): gcj-dbtool$(EXEEXT)
241 ## In case it exists already.
242 @rm -f $(db_name)
243 ## We don't actually care if it fails -- if it does, just make an
244 ## empty file. This is simpler than trying to discover when mmap is
245 ## not available.
246 ./gcj-dbtool -n $(db_name) || touch $(db_name)
247
248 ## For the peer library, DEPENDENCIES need to come before OBJECTS so
249 ## that JNI headers are built before JNI C files.
250 $(lib_gnu_java_awt_peer_gtk_la_OBJECTS): $(lib_gnu_java_awt_peer_gtk_la_DEPENDENCIES)
251
252 lib_gnu_java_awt_peer_gtk_la_SOURCES =
253 lib_gnu_java_awt_peer_gtk_la_LIBADD = \
254 gnu-java-awt-peer-gtk.lo \
255 classpath/native/jni/gtk-peer/libgtkpeer.la \
256 $(GTK_LIBS) $(GLIB_LIBS) $(LIBART_LIBS) $(CAIRO_LIBS) $(PANGOFT2_LIBS)
257 lib_gnu_java_awt_peer_gtk_la_DEPENDENCIES = gnu-java-awt-peer-gtk.lo \
258 classpath/native/jni/gtk-peer/libgtkpeer.la \
259 libgcj-$(gcc_version).jar libgcj.la libgcj.spec
260 ## The mysterious backslash in the grep pattern is consumed by make.
261 lib_gnu_java_awt_peer_gtk_la_LDFLAGS = \
262 -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC) $(X_LIBS) -lXtst
263 lib_gnu_java_awt_peer_gtk_la_LINK = $(LIBLINK)
264
265 libgcjawt_la_SOURCES = classpath/native/jawt/jawt.c
266 libgcjawt_la_CFLAGS = -I$(srcdir)/classpath/native/jni/classpath \
267 $(PEDANTIC_CFLAGS) $(X_CFLAGS)
268 ## See jv_convert_LDADD.
269 libgcjawt_la_LIBADD = -L$(here)/.libs lib-gnu-java-awt-peer-gtk.la
270 libgcjawt_la_LDFLAGS = \
271 -version-info `grep -v '^\#' $(srcdir)/libtool-version` \
272 $(LIBGCJ_LD_SYMBOLIC)
273 libgcjawt_la_LINK = $(LIBLINK)
274
275 lib_gnu_java_awt_peer_qt_la_SOURCES =
276 lib_gnu_java_awt_peer_qt_la_LIBADD = \
277 gnu-java-awt-peer-qt.lo \
278 classpath/native/jni/qt-peer/libqtpeer.la
279 lib_gnu_java_awt_peer_qt_la_DEPENDENCIES = gnu-java-awt-peer-qt.lo \
280 classpath/native/jni/qt-peer/libqtpeer.la \
281 libgcj-$(gcc_version).jar libgcj.la libgcj.spec
282 ## The mysterious backslash in the grep pattern is consumed by make.
283 lib_gnu_java_awt_peer_qt_la_LDFLAGS = \
284 -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC) $(X_LIBS) -lXtst
285 lib_gnu_java_awt_peer_qt_la_LINK = $(LIBLINK)
286
287 lib_gnu_awt_xlib_la_SOURCES = $(xlib_nat_source_files)
288 lib_gnu_awt_xlib_la_LIBADD = gnu/awt/xlib.lo gnu/gcj/xlib.lo
289 lib_gnu_awt_xlib_la_DEPENDENCIES = libgcj-$(gcc_version).jar \
290 libgcj.la libgcj.spec \
291 $(lib_gnu_awt_xlib_la_LIBADD)
292 ## We require libstdc++-v3 to be in the same build tree.
293 lib_gnu_awt_xlib_la_CPPFLAGS = \
294 $(AM_CPPFLAGS) \
295 -I../libstdc++-v3/include \
296 -I../libstdc++-v3/include/$(target_noncanonical) \
297 -I$(srcdir)/../libstdc++-v3/libsupc++
298 ## The mysterious backslash in the grep pattern is consumed by make.
299 lib_gnu_awt_xlib_la_LDFLAGS = ../libstdc++-v3/src/libstdc++.la \
300 @X_PRE_LIBS@ @X_LIBS@ -lX11 @X_EXTRA_LIBS@ \
301 -rpath $(toolexeclibdir) \
302 -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC)
303 lib_gnu_awt_xlib_la_LINK = $(LIBLINK)
304
305 ## Build property files into the library.
306 property_files = \
307 classpath/resource/org/ietf/jgss/MessagesBundle.properties \
308 classpath/resource/java/util/iso4217.properties \
309 classpath/resource/gnu/java/awt/peer/gtk/font.properties \
310 classpath/resource/gnu/regexp/MessagesBundle_it.properties \
311 classpath/resource/gnu/regexp/MessagesBundle_fr.properties \
312 classpath/resource/gnu/regexp/MessagesBundle.properties \
313 classpath/resource/META-INF/services/org.xml.sax.driver \
314 classpath/resource/META-INF/services/javax.xml.parsers.SAXParserFactory \
315 classpath/resource/META-INF/services/javax.xml.parsers.DocumentBuilderFactory \
316 classpath/resource/META-INF/services/javax.xml.parsers.TransformerFactory
317
318 propertyo_files = $(patsubst classpath/resource/%,%,$(addsuffix .lo,$(property_files)))
319
320 $(propertyo_files): %.lo: classpath/resource/%
321 $(mkinstalldirs) `dirname $@`; \
322 $(LTGCJCOMPILE) -o $@ -c $< -Wc,--resource,$(@:.lo=)
323
324 libgcj-$(gcc_version).jar:
325 jardir=`dirname $(ZIP)`; \
326 jardir=`cd $$jardir && pwd`; \
327 jarname=`basename $(ZIP)`; \
328 cd classpath/lib; $$jardir/$$jarname -cfM \
329 ../../libgcj-$(gcc_version).jar gnu java javax org
330
331 CLEANFILES = libgcj-$(gcc_version).jar \
332 $(all_java_deps_files) $(all_java_filelist_files)
333 DISTCLEANFILES = native.dirs
334
335 mostlyclean-local:
336 ## Use libtool rm to remove each libtool object
337 find . -name '*.lo' -print | xargs $(LIBTOOL) rm -f
338
339 distclean-local:
340 ## Remove every .d file that was created.
341 find . -name '*.d' -print | xargs rm -f
342
343 # Just remove the objects from C++ sources, for testing the C++ compiler.
344 clean-nat:
345 rm -f $(nat_files) $(xlib_nat_files)
346
347 SUFFIXES = .class .java .h .properties .list
348
349 ## Pass the list of object files to libtool in a temporary file to
350 ## avoid tripping platform command line length limits.
351 lib-gnu-awt-xlib.la: $(lib_gnu_awt_xlib_la_OBJECTS) $(lib_gnu_awt_xlib_la_DEPENDENCIES)
352 @echo Creating list of files to link...
353 @: $(call write_entries_to_file,$(lib_gnu_awt_xlib_la_OBJECTS) $(lib_gnu_awt_xlib_la_LIBADD),lib_gnu_awt_xlib.objectlist)
354 $(lib_gnu_awt_xlib_la_LINK) -objectlist lib_gnu_awt_xlib.objectlist \
355 -rpath $(toolexeclibdir) $(lib_gnu_awt_xlib_la_LDFLAGS) $(LIBS)
356
357 ## ################################################################
358
359 ## Compiling a list of java sources to a single .o.
360
361 %.lo: %.list
362 $(LTGCJCOMPILE) -c -o $@ -MT $@ -MD -MP -MF $(basename $@).deps @$<
363
364 ## ################################################################
365
366 ## This pulls in a number of variable and target definitions.
367 include sources.am
368
369 ## ################################################################
370
371 ##
372 ## How to build header files.
373 ##
374
375 ## We have special rules for certain headers.
376 omitted_headers = java/lang/ClassLoader.h java/lang/Thread.h \
377 java/lang/String.h java/lang/reflect/Constructor.h \
378 java/lang/reflect/Field.h java/lang/reflect/Method.h \
379 java/lang/reflect/Proxy.h gnu/gcj/runtime/ExtensionClassLoader.h
380
381 generic_header_files = $(filter-out $(omitted_headers),$(ordinary_header_files) $(xlib_nat_headers)) \
382 gnu/gcj/tools/gcj_dbtool/Main.h
383
384 $(generic_header_files): %.h: classpath/lib/%.class
385 name=`echo $< | sed -e 's/\.class$$//' -e 's,classpath/lib/,,'`; \
386 $(mkinstalldirs) `dirname $$name`; \
387 $(GCJH) -d . -classpath '' -bootclasspath classpath/lib $$name
388
389 inner_nat_headers = java/io/ObjectOutputStream$$PutField.h \
390 java/io/ObjectInputStream$$GetField.h \
391 java/nio/DirectByteBufferImpl$$ReadWrite.h \
392 java/nio/channels/Pipe$$SinkChannel.h \
393 java/nio/channels/Pipe$$SourceChannel.h \
394 java/lang/reflect/Proxy$$ProxyData.h \
395 java/lang/reflect/Proxy$$ProxyType.h \
396 gnu/java/net/PlainSocketImpl$$SocketInputStream.h \
397 gnu/java/net/PlainSocketImpl$$SocketOutputStream.h \
398 gnu/java/nio/PipeImpl$$SinkChannelImpl.h \
399 gnu/java/nio/PipeImpl$$SourceChannelImpl.h \
400 $(PLATFORM_INNER_NAT_HDRS)
401
402 nat_headers = $(ordinary_header_files) $(inner_nat_headers) \
403 gnu/gcj/tools/gcj_dbtool/Main.h
404 nat_headers_install = $(ordinary_header_files)
405
406 xlib_nat_headers = $(gnu_awt_xlib_header_files) $(gnu_gcj_xlib_header_files)
407
408 java/lang/ClassLoader.h: classpath/lib/java/lang/ClassLoader.class
409 $(GCJH) -classpath '' -bootclasspath classpath/lib \
410 -prepend 'jclass _Jv_FindClass (_Jv_Utf8Const *name, java::lang::ClassLoader *loader);' \
411 -prepend 'void _Jv_RunMain (jclass klass, const char *name, int argc, const char **argv, bool is_jar);' \
412 -friend 'jclass (::_Jv_FindClass) (_Jv_Utf8Const *name, java::lang::ClassLoader *loader);' \
413 -friend 'void ::_Jv_RunMain (jclass klass, const char *name, int argc, const char **argv, bool is_jar);' \
414 java/lang/ClassLoader
415
416 java/lang/Thread.h: classpath/lib/java/lang/Thread.class
417 $(GCJH) -classpath '' -bootclasspath classpath/lib \
418 -prepend 'class _Jv_JNIEnv;' \
419 -prepend '#define _JV_NOT_OWNER 1' \
420 -prepend '#define _JV_INTERRUPTED 2' \
421 -prepend '_Jv_JNIEnv * _Jv_GetCurrentJNIEnv ();' \
422 -prepend 'void _Jv_SetCurrentJNIEnv (_Jv_JNIEnv *env);' \
423 -prepend 'void _Jv_ThreadRun (java::lang::Thread* thread);' \
424 -prepend 'jint _Jv_AttachCurrentThread(java::lang::Thread* thread);' \
425 -prepend 'java::lang::Thread* _Jv_AttachCurrentThread (jstring name, java::lang::ThreadGroup* group);' \
426 -prepend 'java::lang::Thread* _Jv_AttachCurrentThreadAsDaemon (jstring name, java::lang::ThreadGroup* group);' \
427 -prepend 'jint _Jv_DetachCurrentThread ();' \
428 -friend '_Jv_JNIEnv * ::_Jv_GetCurrentJNIEnv ();' \
429 -friend 'void ::_Jv_SetCurrentJNIEnv (_Jv_JNIEnv *env);' \
430 -friend 'void ::_Jv_ThreadRun (java::lang::Thread* thread);' \
431 -friend 'jint (::_Jv_AttachCurrentThread) (java::lang::Thread* thread);' \
432 -friend 'java::lang::Thread* ::_Jv_AttachCurrentThread (jstring name, java::lang::ThreadGroup* group);' \
433 -friend 'java::lang::Thread* ::_Jv_AttachCurrentThreadAsDaemon (jstring name, java::lang::ThreadGroup* group);' \
434 -friend 'jint (::_Jv_DetachCurrentThread) ();' \
435 java/lang/Thread
436
437 java/lang/String.h: classpath/lib/java/lang/String.class
438 $(GCJH) -classpath '' -bootclasspath classpath/lib \
439 -prepend 'jchar* _Jv_GetStringChars (jstring str);' \
440 -prepend 'jstring* _Jv_StringFindSlot (jchar*, jint, jint);' \
441 -prepend 'jstring* _Jv_StringGetSlot (jstring);' \
442 -prepend 'jstring _Jv_NewStringUtf8Const (_Jv_Utf8Const* str);' \
443 -prepend 'jstring _Jv_NewStringLatin1 (const char*, jsize);' \
444 -prepend 'jstring _Jv_AllocString (jsize);' \
445 -friend 'jchar* ::_Jv_GetStringChars (jstring str);' \
446 -friend 'jstring* ::_Jv_StringFindSlot (jchar*, jint, jint);' \
447 -friend 'jstring* ::_Jv_StringGetSlot (jstring);' \
448 -friend 'jstring (::_Jv_NewStringUtf8Const) (_Jv_Utf8Const* str);' \
449 -friend 'jstring (::_Jv_NewStringLatin1) (const char*, jsize);' \
450 -friend 'jstring (::_Jv_AllocString) (jsize);' \
451 java/lang/String
452
453 java/lang/reflect/Constructor.h: classpath/lib/java/lang/reflect/Constructor.class
454 $(GCJH) -classpath '' -bootclasspath classpath/lib \
455 -prepend 'jmethodID _Jv_FromReflectedConstructor (java::lang::reflect::Constructor *);' \
456 -prepend 'jobject _Jv_JNI_ToReflectedMethod (_Jv_JNIEnv *, jclass, jmethodID, jboolean);' \
457 -friend 'jmethodID (::_Jv_FromReflectedConstructor) (java::lang::reflect::Constructor *);' \
458 -friend 'jobject (::_Jv_JNI_ToReflectedMethod) (_Jv_JNIEnv *, jclass, jmethodID, jboolean);' \
459 -friend 'class java::lang::Class;' \
460 java/lang/reflect/Constructor
461
462 java/lang/reflect/Field.h: classpath/lib/java/lang/reflect/Field.class
463 $(GCJH) -classpath '' -bootclasspath classpath/lib \
464 -prepend 'jfieldID _Jv_FromReflectedField (java::lang::reflect::Field *);' \
465 -prepend 'jobject _Jv_JNI_ToReflectedField (_Jv_JNIEnv*, jclass, jfieldID, jboolean);' \
466 -friend 'jfieldID (::_Jv_FromReflectedField) (java::lang::reflect::Field *);' \
467 -friend 'jobject (::_Jv_JNI_ToReflectedField) (_Jv_JNIEnv*, jclass, jfieldID, jboolean);' \
468 -friend 'class java::lang::Class;' \
469 java/lang/reflect/Field
470
471 java/lang/reflect/Method.h: classpath/lib/java/lang/reflect/Method.class
472 $(GCJH) -classpath '' -bootclasspath classpath/lib \
473 -prepend 'jmethodID _Jv_FromReflectedMethod (java::lang::reflect::Method *);' \
474 -prepend 'jobject _Jv_JNI_ToReflectedMethod (_Jv_JNIEnv *, jclass, jmethodID, jboolean);' \
475 -friend 'jmethodID (::_Jv_FromReflectedMethod) (java::lang::reflect::Method *);' \
476 -friend 'jobject (::_Jv_JNI_ToReflectedMethod) (_Jv_JNIEnv *, jclass, jmethodID, jboolean);' \
477 -friend 'class java::lang::Class;' \
478 -friend 'class java::io::ObjectInputStream;' \
479 java/lang/reflect/Method
480
481 java/lang/reflect/Proxy.h: classpath/lib/java/lang/reflect/Proxy.class
482 $(GCJH) -classpath '' -bootclasspath classpath/lib \
483 java/lang/reflect/Proxy
484
485 java/lang/reflect/Proxy$$ProxyData.h: classpath/lib/java/lang/reflect/Proxy.class
486 $(GCJH) -classpath '' -bootclasspath classpath/lib \
487 'java/lang/reflect/Proxy$$ProxyData'
488
489 java/lang/reflect/Proxy$$ProxyType.h: classpath/lib/java/lang/reflect/Proxy.class
490 $(GCJH) -classpath '' -bootclasspath classpath/lib \
491 'java/lang/reflect/Proxy$$ProxyType'
492
493 gnu/gcj/runtime/ExtensionClassLoader.h: classpath/lib/gnu/gcj/runtime/ExtensionClassLoader.class
494 $(GCJH) -classpath '' -bootclasspath classpath/lib \
495 -friend 'class ::java::lang::ClassLoader;' \
496 gnu/gcj/runtime/ExtensionClassLoader
497
498 java/io/ObjectInputStream$$GetField.h: classpath/lib/java/io/ObjectInputStream.class
499 $(GCJH) -classpath '' -bootclasspath classpath/lib \
500 'java/io/ObjectInputStream$$GetField'
501
502 java/io/ObjectOutputStream$$PutField.h: classpath/lib/java/io/ObjectOutputStream.class
503 $(GCJH) -classpath '' -bootclasspath classpath/lib \
504 'java/io/ObjectOutputStream$$PutField'
505
506 java/nio/DirectByteBufferImpl$$ReadWrite.h: classpath/lib/java/nio/DirectByteBufferImpl.class
507 $(GCJH) -classpath '' -bootclasspath classpath/lib \
508 'java/nio/DirectByteBufferImpl$$ReadWrite'
509
510 java/nio/channels/Pipe$$SinkChannel.h: classpath/lib/java/nio/channels/Pipe.class
511 $(GCJH) -classpath '' -bootclasspath classpath/lib \
512 'java/nio/channels/Pipe$$SinkChannel'
513
514 java/nio/channels/Pipe$$SourceChannel.h: classpath/lib/java/nio/channels/Pipe.class
515 $(GCJH) -classpath '' -bootclasspath classpath/lib \
516 'java/nio/channels/Pipe$$SourceChannel'
517
518 gnu/java/net/PlainSocketImpl$$SocketInputStream.h: classpath/lib/gnu/java/net/PlainSocketImpl.class
519 $(GCJH) -classpath '' -bootclasspath classpath/lib \
520 'gnu/java/net/PlainSocketImpl$$SocketInputStream'
521
522 gnu/java/net/PlainSocketImpl$$SocketOutputStream.h: classpath/lib/gnu/java/net/PlainSocketImpl.class
523 $(GCJH) -classpath '' -bootclasspath classpath/lib \
524 'gnu/java/net/PlainSocketImpl$$SocketOutputStream'
525
526 gnu/java/nio/PipeImpl$$SinkChannelImpl.h: classpath/lib/gnu/java/nio/PipeImpl.class
527 $(GCJH) -classpath '' -bootclasspath classpath/lib \
528 'gnu/java/nio/PipeImpl$$SinkChannelImpl'
529
530 gnu/java/nio/PipeImpl$$SourceChannelImpl.h: classpath/lib/gnu/java/nio/PipeImpl.class
531 $(GCJH) -classpath '' -bootclasspath classpath/lib \
532 'gnu/java/nio/PipeImpl$$SourceChannelImpl'
533
534 ## Only used by PosixProcess.java
535 java/lang/ConcreteProcess$$ProcessManager.h: classpath/lib/java/lang/ConcreteProcess.class
536 $(GCJH) -classpath '' -bootclasspath classpath/lib \
537 'java/lang/ConcreteProcess$$ProcessManager'
538
539 ## Headers we maintain by hand and which we want to install.
540 extra_headers = java/lang/Object.h java/lang/Class.h
541
542 $(extra_headers) $(srcdir)/java/lang/Object.h $(srcdir)/java/lang/Class.h:
543 @:
544
545 ## Install the headers. It is fairly ugly that we have to do this by
546 ## hand.
547 install-data-local:
548 $(PRE_INSTALL)
549 ## We use a GNU make trick here so that we don't go over the command
550 ## length limit of some shells.
551 @echo Creating list of headers to install...
552 @: $(call write_entries_to_file,$(nat_headers_install) $(extra_headers),tmp-ilist)
553 @cat tmp-ilist | while read f; do \
554 d="`echo $$f | sed -e 's,/[^/]*$$,,'`"; \
555 $(mkinstalldirs) $(DESTDIR)$(gxx_include_dir)/$$d; \
556 if test -f $(srcdir)/$$f; then p=$(srcdir)/$$f; else p=$$f; fi; \
557 echo " $(INSTALL_DATA) $$p $(DESTDIR)$(gxx_include_dir)/$$f"; \
558 $(INSTALL_DATA) $$p $(DESTDIR)$(gxx_include_dir)/$$f; \
559 done
560 -@rm -f tmp-ilist
561 ## FIXME: the obvious approach using lib_DATA doesn't work with
562 ## automake 1.4.
563 $(mkinstalldirs) $(DESTDIR)$(secdir)
564 @for f in libgcj.security; do \
565 echo " $(INSTALL_DATA) $(srcdir)/java/security/$$f $(DESTDIR)$(secdir)/$$f"; \
566 $(INSTALL_DATA) $(srcdir)/java/security/$$f $(DESTDIR)$(secdir)/$$f; \
567 done
568 $(INSTALL_DATA) $(srcdir)/java/util/logging/logging.properties $(DESTDIR)$(propdir)/logging.properties
569 ## Install inner class headers.
570 $(INSTALL_DATA) 'java/io/ObjectOutputStream$$PutField.h' $(DESTDIR)$(gxx_include_dir)/java/io/
571 $(INSTALL_DATA) 'java/io/ObjectInputStream$$GetField.h' $(DESTDIR)$(gxx_include_dir)/java/io/
572 $(INSTALL_DATA) 'java/nio/channels/Pipe$$SinkChannel.h' $(DESTDIR)$(gxx_include_dir)/java/nio/channels/
573 $(INSTALL_DATA) 'java/nio/channels/Pipe$$SourceChannel.h' $(DESTDIR)$(gxx_include_dir)/java/nio/channels/
574 $(INSTALL_DATA) 'java/lang/reflect/Proxy$$ProxyData.h' $(DESTDIR)$(gxx_include_dir)/java/lang/reflect/
575 $(INSTALL_DATA) 'java/lang/reflect/Proxy$$ProxyType.h' $(DESTDIR)$(gxx_include_dir)/java/lang/reflect/
576 $(INSTALL_DATA) 'gnu/java/net/PlainSocketImpl$$SocketInputStream.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/net/
577 $(INSTALL_DATA) 'gnu/java/net/PlainSocketImpl$$SocketOutputStream.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/net/
578 $(INSTALL_DATA) 'gnu/java/nio/PipeImpl$$SinkChannelImpl.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/nio/
579 $(INSTALL_DATA) 'gnu/java/nio/PipeImpl$$SourceChannelImpl.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/nio/
580 ## Don't install java/nio/DirectByteBufferImpl$$ReadWrite.h here. It's for internal use only.
581
582
583 ## ################################################################
584
585 ##
586 ## Additional `check' targets for maintainer convenience.
587 ##
588
589 ## This is used for maintainer-check. FIXME: should set from
590 ## configure using AC_CHECK_TOOL.
591 NM = nm
592
593 ## Try to make sure our library doesn't stomp the namespace.
594 maintainer-check: libgcj.la
595 $(NM) .libs/libgcj.a | grep ' T ' \
596 ## Anything with `4java' is assumed to be from .java source.
597 | grep -v '4java' \
598 ## Anything with Jv is ok.
599 | grep -v 'Jv' \
600 ## `terminate' and `unexpected' are part of the runtime.
601 | grep -v 'terminate__Fv' | grep -v 'unexpected__Fv'
602
603 ## This rule can be used to see if the headers are more or less
604 ## correct.
605 header-check: libgcj-$(gcc_version).jar $(nat_headers)
606 rm -f htest.cc; \
607 for h in $(nat_headers); do \
608 echo "#include \"$$h\"" >> htest.cc; \
609 done; \
610 $(CXXCOMPILE) -fsyntax-only htest.cc
611
612 ## This rule can be used to see if all the .class files verify
613 ## correctly.
614 class-check: libgcj-$(gcc_version).jar
615 @ok=0; find . -name '*.class' -print | fgrep -v testsuite | \
616 while read f; do \
617 echo "$(GCJ_WITH_FLAGS) --syntax-only $$f"; \
618 if $(GCJ_WITH_FLAGS) --syntax-only $$f; then \
619 :; else ok=1; fi; \
620 done; exit $$ok
621
622 ## This rule checks whether write_entries_to_file works properly.
623 write-entries-to-file-check:
624 @echo Creating list of files to link...
625 @: $(call write_entries_to_file,$(libgcj_la_OBJECTS) $(libgcj_la_LIBADD),libgcj.objectlist)
626
627 ## ################################################################
628
629 ##
630 ## The `jv-convert' program and code to rebuild the converter header
631 ## files.
632 ##
633
634 ## it only makes sense to try to rebuild the JIS .h files on native
635 ## systems.
636 if NATIVE
637 if MAINTAINER_MODE
638 noinst_PROGRAMS = gen-from-JIS
639
640 gen_from_JIS_SOURCES = \
641 gnu/gcj/convert/gen-from-JIS.c \
642 gnu/gcj/convert/make-trie.c
643
644 gen_from_JIS_DEPENDENCIES = \
645 gnu/gcj/convert/JIS0201.h \
646 gnu/gcj/convert/JIS0208.h \
647 gnu/gcj/convert/JIS0212.h
648
649 $(srcdir)/gnu/gcj/convert/JIS0208_to_Unicode.cc: ./gen-from-JIS$(EXEEXT)
650 ./gen-from-JIS JIS0208 >$(srcdir)/gnu/gcj/convert/JIS0208_to_Unicode.cc
651
652 $(srcdir)/gnu/gcj/convert/JIS0212_to_Unicode.cc: ./gen-from-JIS$(EXEEXT)
653 ./gen-from-JIS JIS0212 >$(srcdir)/gnu/gcj/convert/JIS0212_to_Unicode.cc
654
655 $(srcdir)/gnu/gcj/convert/Unicode_to_JIS.cc: ./gen-from-JIS$(EXEEXT)
656 ./gen-from-JIS toJIS >$(srcdir)/gnu/gcj/convert/Unicode_to_JIS.cc
657
658 # The Unicode consortium does not permit re-distributing the file JIS0201.TXT.
659 # You can get it from
660 # ftp://ftp.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/
661
662 $(srcdir)/gnu/gcj/convert/JIS0201.h: # gnu/gcj/convert/JIS0201.TXT
663 echo '/* This file is automatically generated from Unicode tables */' > tmp-0201; \
664 tr -d '\r' <$(srcdir)/gnu/gcj/convert/JIS0201.TXT \
665 | sed -n -e 's|\(0x..\).*\(0x....\).*#\(.*\)$$|MAP(0x00, \1, \2) /*\3 */|p' \
666 >> tmp-0201; \
667 mv tmp-0201 $(srcdir)/gnu/gcj/convert/JIS0201.h
668
669 # The Unicode consortium does not permit re-distributing the file JIS0208.TXT.
670 # You can get it from
671 # ftp://ftp.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/
672
673 $(srcdir)/gnu/gcj/convert/JIS0208.h: # gnu/gcj/convert/JIS0208.TXT
674 echo '/* This file is automatically generated from Unicode tables */' > tmp-0208; \
675 tr -d '\r' <$(srcdir)/gnu/gcj/convert/JIS0208.TXT \
676 | sed -n -e 's|\(0x....\).*0x\(..\)\(..\).*\(0x....\).*#\(.*\)$$|MAP(0x\2, 0x\3, \4) /*\5 */|p' \
677 >> tmp-0208; \
678 mv tmp-0208 $(srcdir)/gnu/gcj/convert/JIS0208.h
679
680 # The Unicode consortium does not permit re-distributing the file JIS0212.TXT.
681 # You can get it from
682 # ftp://ftp.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/
683
684 $(srcdir)/gnu/gcj/convert/JIS0212.h: # gnu/gcj/convert/JIS0212.TXT
685 echo '/* This file is automatically generated from Unicode tables */' > tmp-0212; \
686 tr -d '\r' <$(srcdir)/gnu/gcj/convert/JIS0212.TXT \
687 | sed -n -e 's|0x\(..\)\(..\).*\(0x....\).*#\(.*\)$$|MAP(0x\1, 0x\2, \3) /*\4 */|p' \
688 >> tmp-0212; \
689 mv tmp-0212 $(srcdir)/gnu/gcj/convert/JIS0212.h
690
691 endif
692 endif
693
694
695 jv_convert_SOURCES =
696 ## We need -nodefaultlibs because we want to avoid gcj's `-lgcj'. We
697 ## need this because we are explicitly using libtool to link using the
698 ## `.la' file.
699 jv_convert_LDFLAGS = --main=gnu.gcj.convert.Convert \
700 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
701 jv_convert_LINK = $(GCJLINK)
702 ## We don't explicitly link in the libraries we need; libgcj.la brings
703 ## in all dependencies. We need the -L so that gcj can find libgcj
704 ## with `-lgcj', but it must come first, otherwise the -L flags
705 ## brought in from libgcj.la would cause the install directories to be
706 ## searched before the build-tree ones, and we'd get errors because of
707 ## different libraries with the same SONAME from picky linkers such as
708 ## Solaris'. FIXME: should be _libs on some systems.
709 jv_convert_LDADD = -L$(here)/.libs libgcj.la
710 ## Depend on the spec file to make sure it is up to date before
711 ## linking this program.
712 jv_convert_DEPENDENCIES = libgcj.la libgcj.spec
713
714 gcj_dbtool_SOURCES = \
715 gnu/gcj/tools/gcj_dbtool/Main.java \
716 gnu/gcj/tools/gcj_dbtool/natMain.cc
717
718 ## We need -nodefaultlibs because we want to avoid gcj's `-lgcj'. We
719 ## need this because we are explicitly using libtool to link using the
720 ## `.la' file.
721 gcj_dbtool_LDFLAGS = --main=gnu.gcj.tools.gcj_dbtool.Main \
722 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
723 gcj_dbtool_LINK = $(GCJLINK)
724 ## We don't explicitly link in the libraries we need; libgcj.la brings
725 ## in all dependencies. We need the -L so that gcj can find libgcj
726 ## with `-lgcj', but it must come first, otherwise the -L flags
727 ## brought in from libgcj.la would cause the install directories to be
728 ## searched before the build-tree ones, and we'd get errors because of
729 ## different libraries with the same SONAME from picky linkers such as
730 ## Solaris'. FIXME: should be _libs on some systems.
731 gcj_dbtool_LDADD = -L$(here)/.libs libgcj.la
732 ## Depend on the spec file to make sure it is up to date before
733 ## linking this program.
734 gcj_dbtool_DEPENDENCIES = libgcj.la libgcj.spec
735
736 gij_SOURCES =
737 ## We need -nodefaultlibs because we want to avoid gcj's `-lgcj'. We
738 ## need this because we are explicitly using libtool to link using the
739 ## `.la' file.
740 gij_LDFLAGS = -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
741 gij_LINK = $(GCJLINK)
742 ## See jv_convert_LDADD.
743 gij_LDADD = -L$(here)/.libs libgij.la
744 ## Depend on the spec file to make sure it is up to date before
745 ## linking this program.
746 gij_DEPENDENCIES = libgij.la
747
748 ## This is a dummy definition.
749 grmic_SOURCES =
750 grmic_LDFLAGS = --main=gnu.java.rmi.rmic.RMIC \
751 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
752 grmic_LINK = $(GCJLINK)
753 ## See jv_convert_LDADD.
754 grmic_LDADD = -L$(here)/.libs libgcj.la
755 ## Depend on the spec file to make sure it is up to date before
756 ## linking this program.
757 grmic_DEPENDENCIES = libgcj.la libgcj.spec
758
759 ## This is a dummy definition.
760 grmiregistry_SOURCES =
761 grmiregistry_LDFLAGS = --main=gnu.java.rmi.registry.RegistryImpl \
762 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
763 grmiregistry_LINK = $(GCJLINK)
764 ## See jv_convert_LDADD.
765 grmiregistry_LDADD = -L$(here)/.libs libgcj.la
766 ## Depend on the spec file to make sure it is up to date before
767 ## linking this program.
768 grmiregistry_DEPENDENCIES = libgcj.la libgcj.spec
769
770 ## ################################################################
771
772 ## This lists all the C++ source files in subdirectories.
773 nat_source_files = \
774 gnu/classpath/natSystemProperties.cc \
775 gnu/gcj/natCore.cc \
776 gnu/gcj/convert/JIS0208_to_Unicode.cc \
777 gnu/gcj/convert/JIS0212_to_Unicode.cc \
778 gnu/gcj/convert/Unicode_to_JIS.cc \
779 gnu/gcj/convert/natIconv.cc \
780 gnu/gcj/convert/natInput_EUCJIS.cc \
781 gnu/gcj/convert/natInput_SJIS.cc \
782 gnu/gcj/convert/natOutput_EUCJIS.cc \
783 gnu/gcj/convert/natOutput_SJIS.cc \
784 gnu/gcj/io/natSimpleSHSStream.cc \
785 gnu/gcj/io/shs.cc \
786 gnu/gcj/runtime/natFinalizerThread.cc \
787 gnu/gcj/runtime/natSharedLibLoader.cc \
788 gnu/gcj/runtime/natStringBuffer.cc \
789 gnu/gcj/util/natDebug.cc \
790 gnu/java/lang/natMainThread.cc \
791 gnu/java/net/natPlainDatagramSocketImpl.cc \
792 gnu/java/net/natPlainSocketImpl.cc \
793 gnu/java/net/protocol/core/natCoreInputStream.cc \
794 gnu/java/nio/natPipeImpl.cc \
795 gnu/java/nio/natSelectorImpl.cc \
796 gnu/java/nio/natNIOServerSocket.cc \
797 gnu/java/nio/channels/natFileChannelImpl.cc \
798 java/io/natFile.cc \
799 java/io/natObjectInputStream.cc \
800 java/io/natVMObjectStreamClass.cc \
801 java/lang/natCharacter.cc \
802 java/lang/natClass.cc \
803 java/lang/natClassLoader.cc \
804 java/lang/natConcreteProcess.cc \
805 java/lang/natDouble.cc \
806 java/lang/natFloat.cc \
807 java/lang/natMath.cc \
808 java/lang/natObject.cc \
809 java/lang/natRuntime.cc \
810 java/lang/natString.cc \
811 java/lang/natStringBuffer.cc \
812 java/lang/natStringBuilder.cc \
813 java/lang/natSystem.cc \
814 java/lang/natThread.cc \
815 java/lang/natVMClassLoader.cc \
816 java/lang/natVMSecurityManager.cc \
817 java/lang/natVMThrowable.cc \
818 java/lang/ref/natReference.cc \
819 java/lang/reflect/natArray.cc \
820 java/lang/reflect/natConstructor.cc \
821 java/lang/reflect/natField.cc \
822 java/lang/reflect/natMethod.cc \
823 java/net/natVMNetworkInterface.cc \
824 java/net/natInetAddress.cc \
825 java/nio/channels/natChannels.cc \
826 java/nio/natDirectByteBufferImpl.cc \
827 java/text/natCollator.cc \
828 java/util/natResourceBundle.cc \
829 java/util/natVMTimeZone.cc \
830 java/util/logging/natLogger.cc \
831 java/util/zip/natDeflater.cc \
832 java/util/zip/natInflater.cc
833
834 xlib_nat_source_files = \
835 gnu/gcj/xlib/natClip.cc \
836 gnu/gcj/xlib/natColormap.cc \
837 gnu/gcj/xlib/natDisplay.cc \
838 gnu/gcj/xlib/natDrawable.cc \
839 gnu/gcj/xlib/natFont.cc \
840 gnu/gcj/xlib/natGC.cc \
841 gnu/gcj/xlib/natPixmap.cc \
842 gnu/gcj/xlib/natScreen.cc \
843 gnu/gcj/xlib/natVisual.cc \
844 gnu/gcj/xlib/natWMSizeHints.cc \
845 gnu/gcj/xlib/natWindow.cc \
846 gnu/gcj/xlib/natWindowAttributes.cc \
847 gnu/gcj/xlib/natXAnyEvent.cc \
848 gnu/gcj/xlib/natXButtonEvent.cc \
849 gnu/gcj/xlib/natXColor.cc \
850 gnu/gcj/xlib/natXConfigureEvent.cc \
851 gnu/gcj/xlib/natXException.cc \
852 gnu/gcj/xlib/natXExposeEvent.cc \
853 gnu/gcj/xlib/natXImage.cc \
854 gnu/gcj/xlib/natXUnmapEvent.cc
855
856 ## ################################################################
857
858 ##
859 ## Creating and installing sources.zip
860 ##
861
862 ## Create a zip holding all the sources. This can be meaningfully
863 ## used in Eclipse.
864 src.zip:
865 -rm -f src.zip
866 here=`pwd`; \
867 ( \
868 ( cd $(srcdir)/classpath; \
869 find java gnu javax org -name '*.java' -print | \
870 while read file; do \
871 ## Ugly code to avoid "echo -C". Must separate each entry by a newline
872 ## Gross but easy.
873 echo "x-C" | sed -e 's/^.//'; \
874 echo $(srcdir)/classpath; \
875 echo $$file; \
876 done ); \
877 ## Now the build tree.
878 ( cd classpath; \
879 find gnu java -name '*.java' -print | \
880 while read file; do \
881 echo "x-C" | sed -e 's/^.//'; \
882 echo `pwd`; \
883 echo $$file; \
884 done ); \
885 ) | \
886 ## Many of the above circumlocutions are because ZIP will most likely
887 ## be a relative path to fastjar.
888 $(ZIP) -cfM@ $$here/src.zip
889 ## Override GNU Classpath sources with libgcj replacements.
890 here=`pwd`; \
891 ( \
892 ( cd $(srcdir); \
893 find gnu java -name '*.java' -print | \
894 while read file; do \
895 echo "x-C" | sed -e 's/^.//'; \
896 echo $(srcdir); \
897 echo $$file; \
898 done ); \
899 ) | \
900 $(ZIP) -ufM@ $$here/src.zip
901
902 ## We use a variable for this in case the user wants to override it.
903 sourcesdir = $(jardir)
904
905 install-src.zip: src.zip
906 $(INSTALL_DATA) src.zip $(DESTDIR)$(sourcesdir)/src-$(gcc_version).zip
907
908
909 ## ################################################################
910
911 ##
912 ## Dependency tracking madness.
913 ##
914
915 ## This is an evil hack to work around an automake limitation. We
916 ## need to ensure that all CNI headers are built, not just the ones
917 ## used internally by libgcj. We can't make the .o files depend on
918 ## nat_headers, because in that case we'll force a complete rebuild of
919 ## the C++ code whenever any .java file is touched. So instead we
920 ## have a dummy rule which is only used once, namely the first time a
921 ## build is done. On subsequent builds, the dependency tracking for
922 ## the .cc compilations will have picked up the .h files, and these
923 ## will be built directly as needed.
924
925 headers.stamp:
926 ## Note that we don't use a real dependency here, since we don't want
927 ## to rebuild all the headers here when the header list changes. If
928 ## we did rebuild here, then any addition of a .java file would cause
929 ## a large number of recompilations.
930 $(MAKE) create-headers
931 @echo > headers.stamp
932
933 headers_to_make = $(nat_headers)
934 if XLIB_AWT
935 headers_to_make += $(xlib_nat_headers)
936 endif
937
938 create-headers: $(headers_to_make)
939
940 .PHONY: create-headers
941
942 $(libgcj_la_OBJECTS) $(gcj_dbtool_OBJECTS) $(xlib_nat_files): headers.stamp
943 $(libgij_la_OBJECTS): headers.stamp
944
945 ## ################################################################
946
947 ##
948 ## This section is for make and multilib madness.
949 ##
950
951 # Work around what appears to be a GNU make bug handling MAKEFLAGS
952 # values defined in terms of make variables, as is the case for CC and
953 # friends when we are called from the top level Makefile.
954 AM_MAKEFLAGS = \
955 "AR_FLAGS=$(AR_FLAGS)" \
956 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
957 "CFLAGS=$(CFLAGS)" \
958 "CXXFLAGS=$(CXXFLAGS)" \
959 "CPPFLAGS=$(CPPFLAGS)" \
960 "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
961 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
962 "INSTALL=$(INSTALL)" \
963 "INSTALL_DATA=$(INSTALL_DATA)" \
964 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
965 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
966 "GCJFLAGS=$(GCJFLAGS)" \
967 "LDFLAGS=$(LDFLAGS)" \
968 "LIBCFLAGS=$(LIBCFLAGS)" \
969 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
970 "MAKE=$(MAKE)" \
971 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
972 "PICFLAG=$(PICFLAG)" \
973 "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
974 "SHELL=$(SHELL)" \
975 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
976 "exec_prefix=$(exec_prefix)" \
977 "infodir=$(infodir)" \
978 "libdir=$(libdir)" \
979 "prefix=$(prefix)" \
980 "gxx_include_dir=$(gxx_include_dir)" \
981 "AR=$(AR)" \
982 "AS=$(AS)" \
983 "LD=$(LD)" \
984 "LIBCFLAGS=$(LIBCFLAGS)" \
985 "NM=$(NM)" \
986 "PICFLAG=$(PICFLAG)" \
987 "RANLIB=$(RANLIB)" \
988 "DESTDIR=$(DESTDIR)"
989
990 # Subdir rules rely on $(FLAGS_TO_PASS)
991 FLAGS_TO_PASS = $(AM_MAKEFLAGS)
992
993 CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.host
994
995 MAKEOVERRIDES=
996
997 # Multilib support variables.
998 MULTISRCTOP =
999 MULTIBUILDTOP =
1000 MULTIDIRS =
1001 MULTISUBDIR =
1002 MULTIDO = true
1003 MULTICLEAN = true
1004
1005 # Multilib support.
1006 .PHONY: all-multi mostlyclean-multi clean-multi distclean-multi \
1007 maintainer-clean-multi
1008
1009 all-recursive: all-multi
1010 install-recursive: install-multi
1011 mostlyclean-recursive: mostlyclean-multi
1012 clean-recursive: clean-multi
1013 distclean-recursive: distclean-multi
1014 maintainer-clean-recursive: maintainer-clean-multi
1015
1016 all-multi:
1017 : $(MAKE) ; exec $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do
1018 install-multi:
1019 $(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do
1020 mostlyclean-multi:
1021 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=mostlyclean multi-clean
1022 clean-multi:
1023 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=clean multi-clean
1024 distclean-multi:
1025 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=distclean multi-clean
1026 maintainer-clean-multi:
1027 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=maintainer-clean multi-clean