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) $(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)
43 ## GCJ LOCAL: Comment this out so we don't make an empty
44 ## '$(glibjdir)' in the install tree.
45 ## glibj_DATA = glibj.zip
47 endif # INSTALL_GLIBJ_ZIP
50 noinst_DATA = genclasses compile-classes resources
51 endif # BUILD_CLASS_FILES
53 if INSTALL_CLASS_FILES
55 install-data-local: genclasses compile-classes
56 -$(top_srcdir)/mkinstalldirs $(DESTDIR)$(pkgdatadir)
57 cp -R gnu $(DESTDIR)$(pkgdatadir)
58 cp -R java $(DESTDIR)$(pkgdatadir)
59 cp -R javax $(DESTDIR)$(pkgdatadir)
60 cp -R org $(DESTDIR)$(pkgdatadir)
61 cp -R META-INF $(DESTDIR)$(pkgdatadir)
63 # FIXME - should mimic doc/api/Makefile.am instead...
65 rm -rf $(DESTDIR)$(pkgdatadir)/gnu
66 rm -rf $(DESTDIR)$(pkgdatadir)/java
67 rm -rf $(DESTDIR)$(pkgdatadir)/javax
68 rm -rf $(DESTDIR)$(pkgdatadir)/org
69 rm -rf $(DESTDIR)$(pkgdatadir)/META-INF
71 endif # INSTALL_CLASS_FILES
75 glibj.zip: classes compile-classes resources
76 if test "$(ZIP)" != ""; then $(ZIP) -r -D glibj.zip gnu java javax org META-INF > /dev/null; fi
78 resources: copy-vmresources.sh
79 if ! [ -e gnu ]; then mkdir gnu; fi
80 if ! [ -e gnu/java ]; then mkdir gnu/java; fi
81 if ! [ -e gnu/java/locale ]; then mkdir gnu/java/locale; fi
82 if ! [ -e gnu/javax/swing/plaf/gtk/icons ]; then mkdir -p gnu/javax/swing/plaf/gtk/icons; fi
83 list='$(propertydirs)'; for p in $$list; do \
84 if ! [ -e $$p ]; then mkdir $$p; fi; \
86 list='$(propertyfiles)'; for p in $$list; do \
87 cp -f $(top_srcdir)/resource/$$p $$p; \
89 list='$(metafiles)'; for p in $$list; do \
90 cp -f $(top_srcdir)/resource/$$p $$p; \
92 $(SHELL) ./copy-vmresources.sh
93 list='$(iconfiles)'; for p in $$list; do \
94 cp -f $(top_srcdir)/$$p $$p; \
100 $(top_builddir)/java/util/LocaleData.java: $(top_srcdir)/scripts/generate-locale-list.sh
101 mkdir -p $(top_builddir)/java/util
102 $(top_srcdir)/scripts/generate-locale-list.sh > $(top_builddir)/java/util/LocaleData.java
104 genclasses: gen-classlist.sh standard.omit $(top_builddir)/java/util/LocaleData.java gen-xpath-parser
105 top_builddir=$(top_builddir) top_srcdir=$(top_srcdir) $(SHELL) ./gen-classlist.sh standard
107 # Only rebuild parsers when explicitly asked to.
110 gen-xpath-parser: $(top_srcdir)/gnu/xml/xpath/XPathParser.java
112 $(top_srcdir)/gnu/xml/xpath/XPathParser.java: $(top_srcdir)/gnu/xml/xpath/XPathParser.y
113 ( cd $(top_srcdir)/gnu/xml/xpath; \
114 $(JAY) XPathParser.y < $(JAY_SKELETON) > XPathParser.java )
122 $(JAVA_DEPEND): genclasses
125 ## When building with gcj, we do a recursive make. We split this rule
126 ## out specially, rather than simply defining JAVAC, so that GNU make
127 ## will see the recursive make invocation and still allow parallel
129 compile-classes: classes $(JAVA_SRCS) Makefile
130 $(MAKE) -f $(srcdir)/Makefile.gcj \
132 compile_classpath='$(top_builddir):$(compile_classpath)' \
133 top_srcdir=$(top_srcdir)
135 compile-classes: classes $(JAVA_SRCS) Makefile
137 touch compile-classes
140 EXTRA_DIST = standard.omit mkcollections.pl.in Makefile.gcj split-for-gcj.sh
141 CLEANFILES = compile-classes resources classes \
142 glibj.zip classes.1 \
143 $(top_builddir)/java/util/LocaleData.java \
158 cp -pdfR $(top_srcdir)/gnu $(top_srcdir)/java $(top_srcdir)/javax $(top_srcdir)/org $(top_srcdir)/vm $(top_srcdir)/resource $(distdir)/..
159 # Delete not wanted files.
160 $(FIND) $(distdir)/../gnu $(distdir)/../java $(distdir)/../javax $(distdir)/../org $(distdir)/../vm $(distdir)/../resource -name CVS -print | xargs rm -fr
161 $(FIND) $(distdir)/../gnu $(distdir)/../java $(distdir)/../javax $(distdir)/../org $(distdir)/../vm $(distdir)/../resource -name .cvsignore -print | xargs rm -f
162 $(FIND) $(distdir)/../gnu $(distdir)/../java $(distdir)/../javax $(distdir)/../org $(distdir)/../vm -name class-dependencies.conf -print | xargs rm -f
163 rm -f $(distdir)/../gnu/classpath/Configuration.java
164 rm -f $(distdir)/../java/util/LocaleData.java