3 ## silently try to include these, if it fails gnu make
4 ## will remake these 'makefiles' with the rules given in
5 ## this file and restart the make process again
6 sinclude $(JAVA_DEPEND)
8 propertydirs := $(shell cd $(top_srcdir)/resource && $(FIND) gnu java org META-INF -type d ! -name CVS -print)
9 propertyfiles := $(shell cd $(top_srcdir)/resource && $(FIND) gnu java org -name \*\.properties -print)
10 metafiles := $(shell cd $(top_srcdir)/resource && $(FIND) META-INF -name CVS -prune -o -type f -print)
11 iconfiles := $(shell cd $(top_srcdir) && $(FIND) gnu/javax/swing/plaf/gtk/icons -name *.png -type f -print)
13 compile_classpath = $(vm_classes):$(top_srcdir):$(top_srcdir)/external/w3c_dom:$(top_srcdir)/external/sax:$(top_srcdir)/external/relaxngDatatype:.:$(USER_CLASSLIB)
15 # handling source to bytecode compiler programs like gcj, jikes and kjc
17 ## This should never be used when gcj is the compiler.
18 ## See the compile-classes target.
22 JAVAC = $(JIKES) $(JIKESWARNINGS) +F $(JIKESENCODING) -bootclasspath '' -extdirs '' -sourcepath '' --classpath $(compile_classpath) -d . @classes
25 ## FIXME: from what I can tell, kjc does not support a -encoding option.
26 JAVAC = $(KJC) -classpath .:$(USER_CLASSLIB) -d . @classes
29 JAVAC = $(GCJX) -g -encoding UTF-8 -classpath .:$(USER_CLASSLIB) -d . @classes
32 JAVAC = $(ECJ) -source 1.4 -encoding UTF-8 -warn:-deprecation,serial,unused -proceedOnError -bootclasspath '' -classpath $(compile_classpath) -d . @classes
39 JAVAH = $(USER_JAVAH) -jni -classpath .:$(USER_CLASSLIB)
42 COLLECTIONS = collections.jar
44 collections.jar: mkcollections.pl
45 ./mkcollections.pl $(top_srcdir)
47 $(GCJ) -C `$(FIND) $(COLLECTIONS_PREFIX) -name '*' -type f -print`
49 $(JAVAC) `$(FIND) $(COLLECTIONS_PREFIX) -name '*' -type f -print`
51 if test "$(FASTJAR)" != ""; then \
52 $(FASTJAR) cf $@ $(COLLECTIONS_PREFIX); \
54 echo "fastjar not found" > collections.jar; \
56 endif # CREATE_COLLECTIONS
60 ## GCJ LOCAL: Comment this out so we don't make an empty
61 ## '$(glibjdir)' in the install tree.
62 ## glibj_DATA = glibj.zip
64 endif # INSTALL_GLIBJ_ZIP
67 noinst_DATA = genclasses compile-classes resources
68 endif # BUILD_CLASS_FILES
70 if INSTALL_CLASS_FILES
72 install-data-local: genclasses compile-classes
73 -$(top_srcdir)/mkinstalldirs $(DESTDIR)$(pkgdatadir)
74 cp -R gnu $(DESTDIR)$(pkgdatadir)
75 cp -R java $(DESTDIR)$(pkgdatadir)
76 cp -R javax $(DESTDIR)$(pkgdatadir)
77 cp -R org $(DESTDIR)$(pkgdatadir)
78 cp -R META-INF $(DESTDIR)$(pkgdatadir)
80 # FIXME - should mimic doc/api/Makefile.am instead...
82 rm -rf $(DESTDIR)$(pkgdatadir)/gnu
83 rm -rf $(DESTDIR)$(pkgdatadir)/java
84 rm -rf $(DESTDIR)$(pkgdatadir)/javax
85 rm -rf $(DESTDIR)$(pkgdatadir)/org
86 rm -rf $(DESTDIR)$(pkgdatadir)/META-INF
88 endif # INSTALL_CLASS_FILES
92 glibj.zip: classes compile-classes resources
93 if test "$(ZIP)" != ""; then $(ZIP) -r -D glibj.zip gnu java javax org META-INF > /dev/null; fi
94 if test "$(FASTJAR)" != ""; then $(FASTJAR) cf glibj.zip gnu java javax org META-INF; fi
96 resources: copy-vmresources.sh
97 if ! [ -e gnu ]; then mkdir gnu; fi
98 if ! [ -e gnu/java ]; then mkdir gnu/java; fi
99 if ! [ -e gnu/java/locale ]; then mkdir gnu/java/locale; fi
100 if ! [ -e gnu/javax/swing/plaf/gtk/icons ]; then mkdir -p gnu/javax/swing/plaf/gtk/icons; fi
101 list='$(propertydirs)'; for p in $$list; do \
102 if ! [ -e $$p ]; then mkdir $$p; fi; \
104 list='$(propertyfiles)'; for p in $$list; do \
105 cp -f $(top_srcdir)/resource/$$p $$p; \
107 list='$(metafiles)'; for p in $$list; do \
108 cp -f $(top_srcdir)/resource/$$p $$p; \
110 $(SHELL) ./copy-vmresources.sh
111 list='$(iconfiles)'; for p in $$list; do \
112 cp -f $(top_srcdir)/$$p $$p; \
118 $(top_builddir)/java/util/LocaleData.java: $(top_srcdir)/scripts/generate-locale-list.sh
119 mkdir -p $(top_builddir)/java/util
120 $(top_srcdir)/scripts/generate-locale-list.sh > $(top_builddir)/java/util/LocaleData.java
122 genclasses: gen-classlist.sh standard.omit $(top_builddir)/java/util/LocaleData.java gen-xpath-parser
123 top_builddir=$(top_builddir) top_srcdir=$(top_srcdir) $(SHELL) ./gen-classlist.sh standard
125 # Only rebuild parsers when explicitly asked to.
128 gen-xpath-parser: $(top_srcdir)/gnu/xml/xpath/XPathParser.java
130 $(top_srcdir)/gnu/xml/xpath/XPathParser.java: $(top_srcdir)/gnu/xml/xpath/XPathParser.y
131 ( cd $(top_srcdir)/gnu/xml/xpath; \
132 $(JAY) XPathParser.y < $(JAY_SKELETON) > XPathParser.java )
140 $(JAVA_DEPEND): genclasses
143 ## When building with gcj, we do a recursive make. We split this rule
144 ## out specially, rather than simply defining JAVAC, so that GNU make
145 ## will see the recursive make invocation and still allow parallel
147 compile-classes: classes $(JAVA_SRCS) Makefile
148 $(MAKE) -f $(srcdir)/Makefile.gcj \
150 compile_classpath='$(top_builddir):$(compile_classpath)' \
151 top_srcdir=$(top_srcdir)
153 compile-classes: classes $(JAVA_SRCS) Makefile
155 touch compile-classes
158 EXTRA_DIST = standard.omit mkcollections.pl.in Makefile.gcj split-for-gcj.sh
159 CLEANFILES = compile-classes resources classes \
160 glibj.zip classes.1 \
161 $(top_builddir)/java/util/LocaleData.java \
176 cp -pdfR $(top_srcdir)/gnu $(top_srcdir)/java $(top_srcdir)/javax $(top_srcdir)/org $(top_srcdir)/vm $(top_srcdir)/resource $(distdir)/..
177 # Delete not wanted files.
178 $(FIND) $(distdir)/../gnu $(distdir)/../java $(distdir)/../javax $(distdir)/../org $(distdir)/../vm $(distdir)/../resource -name CVS -print | xargs rm -fr
179 $(FIND) $(distdir)/../gnu $(distdir)/../java $(distdir)/../javax $(distdir)/../org $(distdir)/../vm $(distdir)/../resource -name .cvsignore -print | xargs rm -f
180 $(FIND) $(distdir)/../gnu $(distdir)/../java $(distdir)/../javax $(distdir)/../org $(distdir)/../vm -name class-dependencies.conf -print | xargs rm -f
181 rm -f $(distdir)/../gnu/classpath/Configuration.java
182 rm -f $(distdir)/../java/util/LocaleData.java