1 |
781 |
jeremybenn |
JAVA_DEPEND = java.dep
|
2 |
|
|
|
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)
|
7 |
|
|
|
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)
|
9 |
|
|
|
10 |
|
|
# handling source to bytecode compiler programs like gcj, jikes and kjc
|
11 |
|
|
if GCJ_JAVAC
|
12 |
|
|
## GCJ LOCAL: use srcdir
|
13 |
|
|
JCOMPILER = $(JAVAC) $(JAVACFLAGS) -fsource=1.5 -ftarget=1.5 --bootclasspath='' --classpath=$(compile_classpath) -d $(srcdir) @classes
|
14 |
|
|
else
|
15 |
|
|
JCOMPILER = $(JAVAC) $(JAVACFLAGS) $(JAVAC_MEM_OPT) -source 1.5 -target 1.5 -bootclasspath '' -classpath $(compile_classpath) -d . @classes
|
16 |
|
|
endif
|
17 |
|
|
|
18 |
|
|
if CREATE_COLLECTIONS
|
19 |
|
|
COLLECTIONS = collections.jar
|
20 |
|
|
|
21 |
|
|
if WITH_JAR
|
22 |
|
|
CREATE_COLLECTIONS_JAR=$(JAR) cf $@ $(COLLECTIONS_PREFIX)
|
23 |
|
|
else
|
24 |
|
|
CREATE_COLLECTIONS_JAR=$(ZIP) -r -D $@ $(COLLECTIONS_PREFIX) > /dev/null
|
25 |
|
|
endif
|
26 |
|
|
|
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
|
32 |
|
|
|
33 |
|
|
if INSTALL_GLIBJ_ZIP
|
34 |
|
|
|
35 |
|
|
## GCJ LOCAL: Comment this out so we don't make an empty
|
36 |
|
|
## '$(glibjdir)' in the install tree.
|
37 |
|
|
## glibj_DATA = glibj.zip
|
38 |
|
|
|
39 |
|
|
endif # INSTALL_GLIBJ_ZIP
|
40 |
|
|
|
41 |
|
|
if BUILD_CLASS_FILES
|
42 |
|
|
noinst_DATA = genclasses compile-classes resources
|
43 |
|
|
endif # BUILD_CLASS_FILES
|
44 |
|
|
|
45 |
|
|
if INSTALL_CLASS_FILES
|
46 |
|
|
|
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)
|
55 |
|
|
|
56 |
|
|
# FIXME - should mimic doc/api/Makefile.am instead...
|
57 |
|
|
uninstall-local:
|
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
|
64 |
|
|
|
65 |
|
|
endif # INSTALL_CLASS_FILES
|
66 |
|
|
|
67 |
|
|
.PHONY: genclasses
|
68 |
|
|
|
69 |
|
|
if USE_PREBUILT_GLIBJ_ZIP
|
70 |
|
|
|
71 |
|
|
glibj.zip:
|
72 |
|
|
cp $(PATH_TO_GLIBJ_ZIP) .
|
73 |
|
|
|
74 |
|
|
else
|
75 |
|
|
|
76 |
|
|
if WITH_JAR
|
77 |
|
|
CREATE_GLIBJ_ZIP=$(JAR) cf glibj.zip gnu java javax org sun META-INF
|
78 |
|
|
else
|
79 |
|
|
CREATE_GLIBJ_ZIP=$(ZIP) -r -D glibj.zip gnu java javax org sun META-INF > /dev/null
|
80 |
|
|
endif
|
81 |
|
|
|
82 |
|
|
glibj.zip: classes compile-classes resources
|
83 |
|
|
$(CREATE_GLIBJ_ZIP)
|
84 |
|
|
endif # USE_PREBUILT_GLIBJ_ZIP
|
85 |
|
|
|
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; \
|
91 |
|
|
done
|
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; \
|
96 |
|
|
done
|
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; \
|
102 |
|
|
done
|
103 |
|
|
touch resources
|
104 |
|
|
|
105 |
|
|
classes: genclasses
|
106 |
|
|
|
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
|
110 |
|
|
|
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
|
113 |
|
|
|
114 |
|
|
# Only rebuild parsers when explicitly asked to.
|
115 |
|
|
if REGEN_PARSERS
|
116 |
|
|
|
117 |
|
|
gen-xpath-parser: $(top_srcdir)/gnu/xml/xpath/XPathParser.java
|
118 |
|
|
|
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 )
|
122 |
|
|
else
|
123 |
|
|
|
124 |
|
|
gen-xpath-parser:
|
125 |
|
|
true
|
126 |
|
|
|
127 |
|
|
endif # REGEN_PARSER
|
128 |
|
|
|
129 |
|
|
$(JAVA_DEPEND): genclasses
|
130 |
|
|
|
131 |
|
|
# if FOUND_GCJ
|
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
|
135 |
|
|
# ## builds.
|
136 |
|
|
# compile-classes: classes $(JAVA_SRCS) Makefile
|
137 |
|
|
# $(MAKE) -f $(srcdir)/Makefile.gcj \
|
138 |
|
|
# GCJ='$(GCJ)' \
|
139 |
|
|
# compile_classpath='$(top_builddir):$(compile_classpath)' \
|
140 |
|
|
# top_srcdir=$(top_srcdir)
|
141 |
|
|
# touch compile-classes
|
142 |
|
|
# else
|
143 |
|
|
compile-classes: classes $(JAVA_SRCS) Makefile
|
144 |
|
|
if JAVA_MAINTAINER_MODE
|
145 |
|
|
$(JCOMPILER)
|
146 |
|
|
endif
|
147 |
|
|
touch compile-classes
|
148 |
|
|
# endif
|
149 |
|
|
|
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 \
|
154 |
|
|
$(JAVA_DEPEND)
|
155 |
|
|
DISTCLEANFILES = standard.omit
|
156 |
|
|
|
157 |
|
|
clean-local:
|
158 |
|
|
-rm -rf gnu
|
159 |
|
|
-rm -rf java
|
160 |
|
|
-rm -rf javax
|
161 |
|
|
-rm -rf org
|
162 |
|
|
-rm -rf com
|
163 |
|
|
-rm -rf sun
|
164 |
|
|
-rm -rf META-INF
|
165 |
|
|
-rm -rf lists
|
166 |
|
|
|
167 |
|
|
dist-hook:
|
168 |
|
|
@mkdir_p@ $(distdir)
|
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
|