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 compile_classpath = $(vm_classes):$(top_srcdir):$(top_srcdir)/external/w3c_dom:$(top_srcdir)/external/sax:$(top_srcdir)/external/relaxngDatatype:$(top_srcdir)/external/jsr166:.:$(PATH_TO_GLIBJ_ZIP):$(PATH_TO_ESCHER)
10 # handling source to bytecode compiler programs like gcj, jikes and kjc
12 ## GCJ LOCAL: use srcdir
13 JCOMPILER = $(JAVAC) $(JAVACFLAGS) -fsource=1.5 -ftarget=1.5 --bootclasspath='' --classpath=$(compile_classpath) -d $(srcdir) @classes
15 JCOMPILER = $(JAVAC) $(JAVACFLAGS) $(JAVAC_MEM_OPT) -source 1.5 -target 1.5 -bootclasspath '' -classpath $(compile_classpath) -d . @classes
19 COLLECTIONS = collections.jar
22 CREATE_COLLECTIONS_JAR=$(JAR) cf $@ $(COLLECTIONS_PREFIX)
24 CREATE_COLLECTIONS_JAR=$(ZIP) -r -D $@ $(COLLECTIONS_PREFIX) > /dev/null
27 collections.jar: mkcollections.pl
28 ./mkcollections.pl $(top_srcdir)
29 $(JCOMPILER) `$(FIND) $(COLLECTIONS_PREFIX) -name '*.java' -type f -print`
30 $(CREATE_COLLECTIONS_JAR)
31 endif # CREATE_COLLECTIONS
35 ## GCJ LOCAL: Comment this out so we don't make an empty
36 ## '$(glibjdir)' in the install tree.
37 ## glibj_DATA = glibj.zip
39 endif # INSTALL_GLIBJ_ZIP
42 noinst_DATA = genclasses compile-classes resources
43 endif # BUILD_CLASS_FILES
45 if INSTALL_CLASS_FILES
47 install-data-local: genclasses compile-classes
48 $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
49 cp -R gnu $(DESTDIR)$(pkgdatadir)
50 cp -R java $(DESTDIR)$(pkgdatadir)
51 cp -R javax $(DESTDIR)$(pkgdatadir)
52 cp -R org $(DESTDIR)$(pkgdatadir)
53 cp -R sun $(DESTDIR)$(pkgdatadir)
54 cp -R META-INF $(DESTDIR)$(pkgdatadir)
56 # FIXME - should mimic doc/api/Makefile.am instead...
58 rm -rf $(DESTDIR)$(pkgdatadir)/gnu
59 rm -rf $(DESTDIR)$(pkgdatadir)/java
60 rm -rf $(DESTDIR)$(pkgdatadir)/javax
61 rm -rf $(DESTDIR)$(pkgdatadir)/org
62 rm -rf $(DESTDIR)$(pkgdatadir)/sun
63 rm -rf $(DESTDIR)$(pkgdatadir)/META-INF
65 endif # INSTALL_CLASS_FILES
69 if USE_PREBUILT_GLIBJ_ZIP
72 cp $(PATH_TO_GLIBJ_ZIP) .
77 CREATE_GLIBJ_ZIP=$(JAR) cf glibj.zip gnu java javax org sun META-INF && $(JAR) i glibj.zip
79 CREATE_GLIBJ_ZIP=$(ZIP) -r -D glibj.zip gnu java javax org sun META-INF > /dev/null
82 glibj.zip: classes compile-classes resources
84 endif # USE_PREBUILT_GLIBJ_ZIP
86 resources: copy-vmresources.sh
87 @list=`cd $(top_srcdir)/resource && $(FIND) gnu java javax org -name \*\.properties -print -o -name \*\.css -print`; for p in $$list; do \
88 dirname=`dirname $$p`; \
89 if ! test -d "$$dirname"; then @mkdir_p@ "$$dirname"; fi; \
90 cp $(top_srcdir)/resource/$$p $$p; \
92 @list=`cd $(top_srcdir)/resource && $(FIND) META-INF -name CVS -prune -o -name .svn -prune -o -name \*\.in -prune -o -type f -print`; for p in $$list; do \
93 dirname=`dirname $$p`; \
94 if ! test -d "$$dirname"; then @mkdir_p@ "$$dirname"; fi; \
95 cp $(top_srcdir)/resource/$$p $$p; \
97 @$(SHELL) ./copy-vmresources.sh
98 @list=`cd $(top_srcdir) && $(FIND) gnu/javax/swing/plaf/gtk/icons -name *.png -type f -print`; for p in $$list; do \
99 dirname=`dirname $$p`; \
100 if ! test -d "$$dirname"; then @mkdir_p@ "$$dirname"; fi; \
101 cp $(top_srcdir)/$$p $$p; \
107 $(top_builddir)/gnu/java/locale/LocaleData.java: $(top_srcdir)/scripts/generate-locale-list.sh
108 @mkdir_p@ $(top_builddir)/gnu/java/locale
109 $(top_srcdir)/scripts/generate-locale-list.sh > $(top_builddir)/gnu/java/locale/LocaleData.java
111 genclasses: gen-classlist.sh standard.omit $(top_builddir)/gnu/java/locale/LocaleData.java gen-xpath-parser
112 top_builddir=$(top_builddir) top_srcdir=$(top_srcdir) $(SHELL) ./gen-classlist.sh standard
114 # Only rebuild parsers when explicitly asked to.
117 gen-xpath-parser: $(top_srcdir)/gnu/xml/xpath/XPathParser.java
119 $(top_srcdir)/gnu/xml/xpath/XPathParser.java: $(top_srcdir)/gnu/xml/xpath/XPathParser.y
120 ( cd $(top_srcdir)/gnu/xml/xpath; \
121 $(JAY) XPathParser.y < $(JAY_SKELETON) > XPathParser.java )
129 $(JAVA_DEPEND): genclasses
132 # ## When building with gcj, we do a recursive make. We split this rule
133 # ## out specially, rather than simply defining JCOMPILER, so that GNU make
134 # ## will see the recursive make invocation and still allow parallel
136 # compile-classes: classes $(JAVA_SRCS) Makefile
137 # $(MAKE) -f $(srcdir)/Makefile.gcj \
139 # compile_classpath='$(top_builddir):$(compile_classpath)' \
140 # top_srcdir=$(top_srcdir)
141 # touch compile-classes
143 compile-classes: classes $(JAVA_SRCS) Makefile
144 if JAVA_MAINTAINER_MODE
147 touch compile-classes
150 EXTRA_DIST = standard.omit.in mkcollections.pl.in Makefile.gcj split-for-gcj.sh glibj.zip
151 CLEANFILES = compile-classes resources classes \
152 glibj.zip classes.1 classes.2 Makefile.deps \
153 $(top_builddir)/gnu/java/locale/LocaleData.java \
155 DISTCLEANFILES = standard.omit
169 cp -pdfR $(top_srcdir)/gnu $(top_srcdir)/java $(top_srcdir)/javax $(top_srcdir)/org $(top_srcdir)/sun $(top_srcdir)/vm $(top_srcdir)/resource $(distdir)/..
170 # Delete not wanted files.
171 $(FIND) $(distdir)/../gnu $(distdir)/../java $(distdir)/../javax $(distdir)/../org $(distdir)/../sun $(distdir)/../vm $(distdir)/../resource -name CVS -print | xargs rm -fr
172 $(FIND) $(distdir)/../gnu $(distdir)/../java $(distdir)/../javax $(distdir)/../org $(distdir)/../sun $(distdir)/../vm $(distdir)/../resource -name .cvsignore -print | xargs rm -f
173 $(FIND) $(distdir)/../gnu $(distdir)/../java $(distdir)/../javax $(distdir)/../org $(distdir)/../sun $(distdir)/../vm -name class-dependencies.conf -print | xargs rm -f
174 rm -f $(distdir)/../gnu/classpath/Configuration.java
175 rm -f $(distdir)/../gnu/java/security/Configuration.java
176 rm -f $(distdir)/../gnu/java/locale/LocaleData.java
177 rm -f $(distdir)/glibj.zip