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 -path \*/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:.:$(USER_CLASSLIB)
15 # handling source to bytecode compiler programs like gcj, jikes and kjc
17 # Since we don't feed all classes at once gcj needs to know where to find
18 # the generated classes (in top_builddir).
19 JAVAC = $(srcdir)/split-for-gcj.sh && $(MAKE) -f $(srcdir)/Makefile.gcj \
20 GCJ='$(GCJ)' compile_classpath='$(top_builddir):$(compile_classpath)'
23 JAVAC = $(JIKES) +Pno-shadow +Pno-switchcheck +F $(JIKESENCODING) -bootclasspath '' -extdirs '' -sourcepath '' --classpath $(compile_classpath) -d . @classes
26 ## FIXME: from what I can tell, kjc does not support a -encoding option.
27 JAVAC = $(KJC) -classpath .:$(USER_CLASSLIB) -d . @classes
30 JAVAC = $(GCJX) -encoding UTF-8 -classpath .:$(USER_CLASSLIB) -d . @classes
33 JAVAC = $(ECJ) -encoding UTF-8 -warn:-deprecation,serial -proceedOnError -bootclasspath '' -classpath $(compile_classpath) -d . @classes
40 JAVAH = $(USER_JAVAH) -jni -classpath .:$(USER_CLASSLIB)
44 pkgdata_DATA = glibj.zip
46 endif # INSTALL_GLIBJ_ZIP
49 noinst_DATA = genclasses compile-classes resources
50 endif # BUILD_CLASS_FILES
52 if INSTALL_CLASS_FILES
54 install-data-local: genclasses compile-classes
55 -$(top_srcdir)/mkinstalldirs $(DESTDIR)$(pkgdatadir)
56 cp -R gnu $(DESTDIR)$(pkgdatadir)
57 cp -R java $(DESTDIR)$(pkgdatadir)
58 cp -R javax $(DESTDIR)$(pkgdatadir)
59 cp -R org $(DESTDIR)$(pkgdatadir)
60 cp -R META-INF $(DESTDIR)$(pkgdatadir)
62 # FIXME - should mimic doc/api/Makefile.am instead...
64 rm -rf $(DESTDIR)$(pkgdatadir)/gnu
65 rm -rf $(DESTDIR)$(pkgdatadir)/java
66 rm -rf $(DESTDIR)$(pkgdatadir)/javax
67 rm -rf $(DESTDIR)$(pkgdatadir)/org
68 rm -rf $(DESTDIR)$(pkgdatadir)/META-INF
70 endif # INSTALL_CLASS_FILES
74 glibj.zip: classes compile-classes resources
75 if test "$(ZIP)" != ""; then $(ZIP) -r -D glibj.zip gnu java javax org META-INF > /dev/null; fi
78 if ! [ -e gnu ]; then mkdir gnu; fi
79 if ! [ -e gnu/java ]; then mkdir gnu/java; fi
80 if ! [ -e gnu/java/locale ]; then mkdir gnu/java/locale; fi
81 if ! [ -e gnu/javax/swing/plaf/gtk/icons ]; then mkdir -p gnu/javax/swing/plaf/gtk/icons; fi
82 @list='$(propertydirs)'; for p in $$list; do \
83 if ! [ -e $$p ]; then mkdir $$p; fi; \
85 @list='$(propertyfiles)'; for p in $$list; do \
86 cp $(top_srcdir)/resource/$$p $$p; \
88 @list='$(metafiles)'; for p in $$list; do \
89 cp $(top_srcdir)/resource/$$p $$p; \
91 @list='$(iconfiles)'; for p in $$list; do \
92 cp $(top_srcdir)/$$p $$p; \
98 $(top_builddir)/java/util/LocaleData.java: $(top_srcdir)/scripts/generate-locale-list.sh
99 mkdir -p $(top_builddir)/java/util
100 $(top_srcdir)/scripts/generate-locale-list.sh > $(top_builddir)/java/util/LocaleData.java
102 genclasses: gen-classlist.sh standard.omit $(top_builddir)/java/util/LocaleData.java gen-xpath-parser
103 top_builddir=$(top_builddir) top_srcdir=$(top_srcdir) $(SHELL) ./gen-classlist.sh standard
105 # Only rebuild parsers when explicitly asked to.
108 gen-xpath-parser: $(top_srcdir)/gnu/xml/xpath/XPathParser.java
110 $(top_srcdir)/gnu/xml/xpath/XPathParser.java: $(top_srcdir)/gnu/xml/xpath/XPathParser.y
111 ( cd $(top_srcdir)/gnu/xml/xpath; \
112 $(JAY) XPathParser.y < $(JAY_SKELETON) > XPathParser.java )
120 $(JAVA_DEPEND): genclasses
122 compile-classes: classes $(JAVA_SRCS) Makefile
124 touch compile-classes
126 EXTRA_DIST = standard.omit mkcollections.pl.in Makefile.gcj split-for-gcj.sh
127 CLEANFILES = compile-classes resources classes \
128 classes.standard classes.awt classes.standardx classes.xml \
129 glibj.zip classes.1 \
130 $(top_builddir)/java/util/LocaleData.java \
144 cp -dfR $(top_srcdir)/gnu $(top_srcdir)/java $(top_srcdir)/javax $(top_srcdir)/org $(top_srcdir)/vm $(top_srcdir)/resource $(top_distdir)
145 # Delete not wanted files.
146 $(FIND) $(top_distdir)/gnu $(top_distdir)/java $(top_distdir)/javax $(top_distdir)/org $(top_distdir)/vm $(top_distdir)/resource -name CVS -print | xargs rm -fr
147 $(FIND) $(top_distdir)/gnu $(top_distdir)/java $(top_distdir)/javax $(top_distdir)/org $(top_distdir)/vm $(top_distdir)/resource -name .cvsignore -print | xargs rm -f
148 $(FIND) $(top_distdir)/gnu $(top_distdir)/java $(top_distdir)/javax $(top_distdir)/org $(top_distdir)/vm -name class-dependencies.conf -print | xargs rm -f
149 rm -f $(top_distdir)/gnu/classpath/Configuration.java
150 rm -f $(top_distdir)/java/util/LocaleData.java
151 # Omit files listed in standard.omit.
152 ( cd $(top_distdir)/lib ; cat $(top_builddir)/lib/standard.omit | sed -e 's/\$$//' | sed -e 's/\/\.\*//' | xargs rm -fr )