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:.:$(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) +Pno-shadow +Pno-switchcheck +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) -encoding UTF-8 -classpath .:$(USER_CLASSLIB) -d . @classes
32 JAVAC = $(ECJ) -source 1.4 -encoding UTF-8 -warn:-deprecation,serial,typeHiding,unchecked,unused,varargsCast -proceedOnError -bootclasspath '' -classpath $(compile_classpath) -d . @classes
39 JAVAH = $(USER_JAVAH) -jni -classpath .:$(USER_CLASSLIB)
43 glibj_DATA = glibj.zip
45 endif # INSTALL_GLIBJ_ZIP
48 noinst_DATA = genclasses compile-classes resources
49 endif # BUILD_CLASS_FILES
51 if INSTALL_CLASS_FILES
53 install-data-local: genclasses compile-classes
54 -$(top_srcdir)/mkinstalldirs $(DESTDIR)$(pkgdatadir)
55 cp -R gnu $(DESTDIR)$(pkgdatadir)
56 cp -R java $(DESTDIR)$(pkgdatadir)
57 cp -R javax $(DESTDIR)$(pkgdatadir)
58 cp -R org $(DESTDIR)$(pkgdatadir)
59 cp -R META-INF $(DESTDIR)$(pkgdatadir)
61 # FIXME - should mimic doc/api/Makefile.am instead...
63 rm -rf $(DESTDIR)$(pkgdatadir)/gnu
64 rm -rf $(DESTDIR)$(pkgdatadir)/java
65 rm -rf $(DESTDIR)$(pkgdatadir)/javax
66 rm -rf $(DESTDIR)$(pkgdatadir)/org
67 rm -rf $(DESTDIR)$(pkgdatadir)/META-INF
69 endif # INSTALL_CLASS_FILES
73 glibj.zip: classes compile-classes resources
74 if test "$(ZIP)" != ""; then $(ZIP) -r -D glibj.zip gnu java javax org META-INF > /dev/null; fi
76 resources: copy-vmresources.sh
77 if ! [ -e gnu ]; then mkdir gnu; fi
78 if ! [ -e gnu/java ]; then mkdir gnu/java; fi
79 if ! [ -e gnu/java/locale ]; then mkdir gnu/java/locale; fi
80 if ! [ -e gnu/javax/swing/plaf/gtk/icons ]; then mkdir -p gnu/javax/swing/plaf/gtk/icons; fi
81 @list='$(propertydirs)'; for p in $$list; do \
82 if ! [ -e $$p ]; then mkdir $$p; fi; \
84 @list='$(propertyfiles)'; for p in $$list; do \
85 cp $(top_srcdir)/resource/$$p $$p; \
87 @list='$(metafiles)'; for p in $$list; do \
88 cp $(top_srcdir)/resource/$$p $$p; \
90 @$(SHELL) ./copy-vmresources.sh
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
123 ## When building with gcj, we do a recursive make. We split this rule
124 ## out specially, rather than simply defining JAVAC, so that GNU make
125 ## will see the recursive make invocation and still allow parallel
127 compile-classes: classes $(JAVA_SRCS) Makefile
128 $(MAKE) -f $(srcdir)/Makefile.gcj \
130 compile_classpath='$(top_builddir):$(compile_classpath)' \
131 top_srcdir=$(top_srcdir)
133 compile-classes: classes $(JAVA_SRCS) Makefile
135 touch compile-classes
138 EXTRA_DIST = standard.omit mkcollections.pl.in Makefile.gcj split-for-gcj.sh
139 CLEANFILES = compile-classes resources classes \
140 glibj.zip classes.1 \
141 $(top_builddir)/java/util/LocaleData.java \
156 cp -dfR $(top_srcdir)/gnu $(top_srcdir)/java $(top_srcdir)/javax $(top_srcdir)/org $(top_srcdir)/vm $(top_srcdir)/resource $(top_distdir)
157 # Delete not wanted files.
158 $(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
159 $(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
160 $(FIND) $(top_distdir)/gnu $(top_distdir)/java $(top_distdir)/javax $(top_distdir)/org $(top_distdir)/vm -name class-dependencies.conf -print | xargs rm -f
161 rm -f $(top_distdir)/gnu/classpath/Configuration.java
162 rm -f $(top_distdir)/java/util/LocaleData.java