summaryrefslogtreecommitdiff
path: root/gcc/java/Make-lang.in
blob: b9741e23f41d9c5211511468e3d052d74eb62da1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
# Top level -*- makefile -*- fragment for the GNU compiler for the Java(TM)
# language.
#   Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
#   2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.

#This file is part of GCC.

#GCC is free software; you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation; either version 3, or (at your option)
#any later version.

#GCC is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#GNU General Public License for more details.

#You should have received a copy of the GNU General Public License
#along with GCC; see the file COPYING3.  If not see
#<http://www.gnu.org/licenses/>.

#Java and all Java-based marks are trademarks or registered trademarks
#of Sun Microsystems, Inc. in the United States and other countries.
#The Free Software Foundation is independent of Sun Microsystems, Inc.

# This file provides the language dependent support in the main Makefile.
# Each language makefile fragment must provide the following targets:
#
# foo.all.cross, foo.start.encap, foo.rest.encap,
# foo.install-common, foo.install-man, foo.install-info, foo.install-pdf,
# foo.install-html, foo.info, foo.dvi, foo.pdf, foo.html, foo.uninstall,
# foo.mostlyclean, foo.clean, foo.distclean,
# foo.maintainer-clean, foo.stage1, foo.stage2, foo.stage3, foo.stage4
#
# where `foo' is the name of the language.
#
# It should also provide rules for:
#
# - making any compiler driver (eg: g++)
# - the compiler proper (eg: jc1)
# - define the names for selecting the language in LANGUAGES.

# Actual names to use when installing a native compiler.
JAVA_INSTALL_NAME := $(shell echo gcj|sed '$(program_transform_name)')
JAVA_TARGET_INSTALL_NAME := $(target_noncanonical)-$(shell echo gcj|sed '$(program_transform_name)')

XGCJ = gcj

# Define the names for selecting java in LANGUAGES.
java: jc1$(exeext) $(XGCJ)$(exeext) jvgenmain$(exeext) jcf-dump$(exeext)

# Define the name of target independent tools to be installed in $(bindir)
# Names are subject to changes
JAVA_TARGET_INDEPENDENT_BIN_TOOLS = jcf-dump

# Tell GNU make to ignore these if they exist.
.PHONY: java

jvspec.o: $(srcdir)/java/jvspec.c $(SYSTEM_H) coretypes.h $(TM_H) \
  $(GCC_H) $(CONFIG_H) java/jcf.h java/javaop.h $(OPTS_H)
	(SHLIB_LINK='$(SHLIB_LINK)'; \
	$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(DRIVER_DEFINES) \
		$(INCLUDES) $(srcdir)/java/jvspec.c $(OUTPUT_OPTION))

# Create the compiler driver for $(XGCJ).
$(XGCJ)$(exeext): $(GCC_OBJS) jvspec.o java/jcf-path.o version.o \
	   prefix.o intl.o $(LIBDEPS) $(EXTRA_GCC_OBJS)
	+$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ $(GCC_OBJS) \
	  jvspec.o java/jcf-path.o prefix.o intl.o \
	  version.o $(EXTRA_GCC_OBJS) $(LIBS)

# Create a version of the $(XGCJ) driver which calls the cross-compiler.
$(XGCJ)-cross$(exeext): $(XGCJ)$(exeext)
	-rm -f $(XGCJ)-cross$(exeext)
	cp $(XGCJ)$(exeext) $(XGCJ)-cross$(exeext)

java.srcextra:

# Executables built by this Makefile:
JAVA_OBJS = java/class.o java/decl.o java/expr.o \
  java/constants.o java/lang.o java/typeck.o java/except.o \
  java/verify-glue.o java/verify-impl.o \
  java/zextract.o java/jcf-io.o java/win32-host.o java/jcf-parse.o java/mangle.o \
  java/mangle_name.o java/builtins.o java/resource.o \
  java/jcf-depend.o \
  java/jcf-path.o java/boehm.o java/java-gimplify.o

JCFDUMP_OBJS = java/jcf-dump.o java/jcf-io.o java/jcf-depend.o java/jcf-path.o \
		java/win32-host.o java/zextract.o errors.o version.o ggc-none.o intl.o

JVGENMAIN_OBJS = java/jvgenmain.o java/mangle_name.o errors.o intl.o

java_OBJS = $(sort $(JAVA_OBJS) $(JCFDUMP_OBJS) $(JVGENMAIN_OBJS)) jvspec.o

# Use strict warnings for this front end.
java-warn = $(STRICT_WARN)

# String length warnings
jvspec.o-warn = -Wno-error

jc1$(exeext): $(JAVA_OBJS) $(BACKEND) $(LIBDEPS) attribs.o
	rm -f $@
	+$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \
		$(JAVA_OBJS) $(BACKEND) $(ZLIB) $(LIBICONV) $(LIBS) attribs.o $(BACKENDLIBS)

jcf-dump$(exeext): $(JCFDUMP_OBJS) $(LIBDEPS)
	rm -f $@
	+$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ $(JCFDUMP_OBJS) \
		$(CPPLIBS) $(ZLIB) $(LDEXP_LIB) $(LIBS)

jvgenmain$(exeext): $(JVGENMAIN_OBJS) $(LIBDEPS)
	rm -f $@
	+$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ $(JVGENMAIN_OBJS) \
		$(LIBS)

#
# Build hooks:

java.all.cross: $(XGCJ)-cross$(exeext)
java.start.encap: $(XGCJ)$(exeext)
java.rest.encap:


java.tags: force
	cd $(srcdir)/java; etags -o TAGS.sub *.c *.h --language=none \
	  --regex='/DEFTREECODE [(]\([A-Z_]+\)/\1/' java-tree.def; \
	etags --include TAGS.sub --include ../TAGS.sub


java.info: doc/gcj.info

java.srcinfo: doc/gcj.info
	-cp -p $^ $(srcdir)/doc

java.dvi: doc/gcj.dvi

JAVA_PDFFILES = doc/gcj.pdf

java.pdf: $(JAVA_PDFFILES)

JAVA_HTMLFILES = $(build_htmldir)/java

java.html: $(JAVA_HTMLFILES)/index.html

JAVA_MANFILES = doc/gcj.1 doc/jcf-dump.1 doc/gij.1 \
                doc/jv-convert.1 doc/grmic.1 \
                doc/gcj-dbtool.1 doc/gc-analyze.1 doc/aot-compile.1 \
                doc/rebuild-gcj-db.1

java.man: $(JAVA_MANFILES)

java.srcman: $(JAVA_MANFILES)
	-cp -p $^ $(srcdir)/doc

check-java :
check-java-subtargets :

# Install hooks:
# jc1, gcj, and jvgenmain are installed elsewhere as part
# of $(COMPILERS).

# Install gcj as well as the target-independent tools.
java.install-common: installdirs
	-if [ -f $(XGCJ)$(exeext) ]; then \
	  rm -f $(DESTDIR)$(bindir)/$(JAVA_INSTALL_NAME)$(exeext); \
	  $(INSTALL_PROGRAM) $(XGCJ)$(exeext) $(DESTDIR)$(bindir)/$(JAVA_INSTALL_NAME)$(exeext); \
	  chmod a+x $(DESTDIR)$(bindir)/$(JAVA_INSTALL_NAME)$(exeext); \
	  if [ -f $(XGCJ)-cross$(exeext) ]; then \
	    true; \
	  else \
	    rm -f $(DESTDIR)$(bindir)/$(JAVA_TARGET_INSTALL_NAME)$(exeext); \
	    ( cd $(DESTDIR)$(bindir) && \
	      $(LN) $(JAVA_INSTALL_NAME)$(exeext) $(JAVA_TARGET_INSTALL_NAME)$(exeext) ); \
	  fi ; \
	fi ; \
        for tool in $(JAVA_TARGET_INDEPENDENT_BIN_TOOLS); do \
	  tool_transformed_name=`echo $$tool|sed '$(program_transform_name)'`; \
          if [ -f $$tool$(exeext) ]; then \
	    rm -f $(DESTDIR)$(bindir)/$$tool_transformed_name$(exeext); \
	    $(INSTALL_PROGRAM) $$tool$(exeext) $(DESTDIR)$(bindir)/$$tool_transformed_name$(exeext); \
	    chmod a+x $(DESTDIR)$(bindir)/$$tool_transformed_name$(exeext); \
          fi ; \
       done

java.install-plugin:
java.install-man:

java.uninstall:
	-rm -rf $(DESTDIR)$(bindir)/$(JAVA_INSTALL_NAME)$(exeext)
	-rm -rf $(DESTDIR)$(man1dir)/$(JAVA_INSTALL_NAME)$(man1ext)
	-rm -rf $(DESTDIR)$(man1dir)/jcf-dump$(man1ext)
	-rm -rf $(DESTDIR)$(man1dir)/gij$(man1ext)
	-rm -rf $(DESTDIR)$(man1dir)/jv-convert$(man1ext)
	-rm -rf $(DESTDIR)$(man1dir)/gcj-dbtool$(man1ext)
	-rm -rf $(DESTDIR)$(man1dir)/aot-compile$(man1ext)
	-rm -rf $(DESTDIR)$(man1dir)/rebuild-gcj-db$(man1ext)

java.install-info: $(DESTDIR)$(infodir)/gcj.info

java.install-pdf: $(JAVA_PDFFILES)
	@$(NORMAL_INSTALL)
	test -z "$(pdfdir)" || $(mkinstalldirs) "$(DESTDIR)$(pdfdir)/gcc"
	@list='$(JAVA_PDFFILES)'; for p in $$list; do \
	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
	  f=$(pdf__strip_dir) \
	  echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(pdfdir)/gcc/$$f'"; \
	  $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/gcc/$$f"; \
	done

java.install-html: $(JAVA_HTMLFILES)
	@$(NORMAL_INSTALL)
	test -z "$(htmldir)" || $(mkinstalldirs) "$(DESTDIR)$(htmldir)"
	@list='$(JAVA_HTMLFILES)'; for p in $$list; do \
	  if test -f "$$p" || test -d "$$p"; then d=""; else d="$(srcdir)/"; fi; \
	  f=$(html__strip_dir) \
	  if test -d "$$d$$p"; then \
	    echo " $(mkinstalldirs) '$(DESTDIR)$(htmldir)/$$f'"; \
	    $(mkinstalldirs) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
	    echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
	    $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \
	  else \
	    echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \
	    $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \
	  fi; \
	done
#
# Clean hooks:
# A lot of the ancillary files are deleted by the main makefile.
# We just have to delete files specific to us.

java.mostlyclean:
	-rm -f java/*$(objext) $(DEMANGLER_PROG)
	-rm -f java/*$(coverageexts)
	-rm -f jc1$(exeext) $(XGCJ)$(exeext) jvgenmain$(exeext) \
          jcf-dump$(exeext) s-java
java.clean:
java.distclean:
	-rm -f java/config.status java/Makefile
java.maintainer-clean:
	-rm -f $(docobjdir)/gcj.1
	-rm -f $(docobjdir)/jcf-dump.1
	-rm -f $(docobjdir)/gij.1
	-rm -f $(docobjdir)/jv-convert.1
	-rm -f $(docobjdir)/grmic.1
	-rm -f $(docobjdir)/gcj-dbtool.1
	-rm -f $(docobjdir)/gc-analyze.1
	-rm -f $(docobjdir)/aot-compile.1
	-rm -f $(docobjdir)/rebuild-gcj-db.1
#
# Stage hooks:
# The main makefile has already created stage?/java.

java.stage1: stage1-start
	-mv java/*$(objext) stage1/java
java.stage2: stage2-start
	-mv java/*$(objext) stage2/java
java.stage3: stage3-start
	-mv java/*$(objext) stage3/java
java.stage4: stage4-start
	-mv java/*$(objext) stage4/java
java.stageprofile: stageprofile-start
	-mv java/*$(objext) stageprofile/java
java.stagefeedback: stageprofile-start
	-mv java/*$(objext) stagefeedback/java

#
# .o:.h dependencies.
JAVA_TREE_H = $(TREE_H) $(HASHTAB_H) java/java-tree.h

java/jcf-dump.o: $(CONFIG_H) $(SYSTEM_H) coretypes.h $(JAVA_TREE_H) \
  java/jcf-dump.c java/jcf-reader.c java/jcf.h java/javaop.h java/javaop.def \
  version.h $(GGC_H) intl.h java/zipfile.h
java/boehm.o: java/boehm.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
  $(TREE_H) $(JAVA_TREE_H) java/parse.h toplev.h
java/builtins.o: java/builtins.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
  $(JAVA_TREE_H) $(GGC_H) $(FLAGS_H) $(OPTABS_H) $(EXPR_H) langhooks.h \
  gt-java-builtins.h
java/class.o: java/class.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
  $(JAVA_TREE_H) java/jcf.h java/parse.h toplev.h output.h $(GGC_H) \
  $(FUNCTION_H) gt-java-class.h
java/constants.o: java/constants.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h \
  toplev.h $(SYSTEM_H) coretypes.h $(TM_H) $(GGC_H) gt-java-constants.h
java/decl.o: java/decl.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h \
  toplev.h $(FLAGS_H) $(SYSTEM_H) coretypes.h $(TM_H) \
  libfuncs.h java/java-except.h $(GGC_H) $(REAL_H) gt-java-decl.h \
  $(TARGET_H) $(CGRAPH_H) langhooks.h
java/except.o: java/except.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h $(REAL_H) \
  java/javaop.h java/java-opcodes.h java/java-except.h \
  toplev.h $(SYSTEM_H) coretypes.h
java/expr.o: java/expr.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h $(REAL_H) \
  java/javaop.h java/java-opcodes.h \
  java/java-except.h java/java-except.h java/parse.h \
  $(SYSTEM_H) coretypes.h $(TM_H) $(GGC_H) gt-java-expr.h $(TARGET_H) \
  tree-iterator.h
java/jcf-depend.o: java/jcf-depend.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
  java/jcf.h
java/jcf-parse.o: java/jcf-parse.c $(CONFIG_H) $(JAVA_TREE_H) $(FLAGS_H) \
  input.h java/java-except.h $(SYSTEM_H) coretypes.h toplev.h \
  java/parse.h $(GGC_H) debug.h $(REAL_H) gt-java-jcf-parse.h \
  java/jcf-reader.c java/zipfile.h java/jcf.h $(BITMAP_H)
java/jvgenmain.o: java/jvgenmain.c $(CONFIG_H) $(JAVA_TREE_H) $(SYSTEM_H) \
  coretypes.h $(TM_H) intl.h
java/lang.o: java/lang.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h input.h \
  $(SYSTEM_H) coretypes.h $(TM_H) $(DIAGNOSTIC_H) \
  langhooks.h $(LANGHOOKS_DEF_H) gt-java-lang.h $(OPTS_H) $(OPTIONS_H) \
  $(TARGET_H)
java/mangle.o: java/mangle.c $(CONFIG_H) java/jcf.h $(JAVA_TREE_H) $(SYSTEM_H) \
  coretypes.h $(TM_H) $(GGC_H) gt-java-mangle.h $(LANGHOOKS_DEF_H)
java/mangle_name.o: java/mangle_name.c $(CONFIG_H) java/jcf.h $(JAVA_TREE_H) \
  $(SYSTEM_H) coretypes.h $(GGC_H)
java/resource.o: java/resource.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
  $(JAVA_TREE_H) java/jcf.h java/parse.h toplev.h output.h $(GGC_H) \
  $(TARGET_H) $(FUNCTION_H) gt-java-resource.h
java/typeck.o: java/typeck.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h \
  $(SYSTEM_H) coretypes.h $(GGC_H) $(REAL_H)
java/win32-host.o: java/win32-host.c $(CONFIG_H) $(SYSTEM_H) coretypes.h java/jcf.h
java/verify-glue.o: java/verify-glue.c $(CONFIG_H) $(SYSTEM_H) $(JAVA_TREE_H) \
  coretypes.h java/verify.h
java/verify-impl.o: java/verify-impl.c $(CONFIG_H) java/verify.h $(SYSTEM_H) \
  coretypes.h  java/jcf.h $(JAVA_TREE_H)
java/zextract.o: java/zextract.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
  java/zipfile.h
java/java-gimplify.o: java/java-gimplify.c $(CONFIG_H) $(SYSTEM_H) \
  coretypes.h $(JAVA_TREE_H) $(GIMPLE_H)

# jcf-io.o needs $(ZLIBINC) added to cflags.
java/jcf-io.o: java/jcf-io.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
  $(JAVA_TREE_H) java/zipfile.h
	$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
		$(ZLIBINC) $(srcdir)/java/jcf-io.c $(OUTPUT_OPTION)

# jcf-path.o needs a -D.
java/jcf-path.o: java/jcf-path.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
  java/jcf.h
	$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
	  -DLIBGCJ_ZIP_FILE='"$(datadir)/java/libgcj-$(version).jar"' \
	  -DDEFAULT_TARGET_VERSION=\"$(version)\" \
	  $(srcdir)/java/jcf-path.c $(OUTPUT_OPTION)

TEXI_JAVA_FILES = java/gcj.texi $(gcc_docdir)/include/fdl.texi		\
	 $(gcc_docdir)/include/gpl_v3.texi $(gcc_docdir)/include/gcc-common.texi   \
	 gcc-vers.texi

# Documentation
doc/gcj.info: $(TEXI_JAVA_FILES)
	if test "x$(BUILD_INFO)" = xinfo; then \
	  rm -f doc/gcj.info*; \
	  $(MAKEINFO) $(MAKEINFOFLAGS) -I $(gcc_docdir) \
		-I $(gcc_docdir)/include -o $@ $<; \
	else true; fi

doc/gcj.dvi: $(TEXI_JAVA_FILES)
	$(TEXI2DVI) -I $(abs_docdir) -I $(abs_docdir)/include -o $@ $<

doc/gcj.pdf: $(TEXI_JAVA_FILES)
	$(TEXI2PDF) -I $(abs_docdir) -I $(abs_docdir)/include -o $@ $<

$(build_htmldir)/java/index.html: $(TEXI_JAVA_FILES)
	$(mkinstalldirs) $(@D)
	rm -f $(@D)/*
	$(TEXI2HTML) -I $(gcc_docdir) -I $(gcc_docdir)/include \
		-I $(srcdir)/java -o $(@D) $<

.INTERMEDIATE: gcj.pod jcf-dump.pod gij.pod \
  jv-convert.pod grmic.pod gcj-dbtool.pod gc-analyze.pod

gcj.pod: java/gcj.texi
	-$(TEXI2POD) -D gcj < $< > $@
jcf-dump.pod: java/gcj.texi
	-$(TEXI2POD) -D jcf-dump < $< > $@
gij.pod: java/gcj.texi
	-$(TEXI2POD) -D gij < $< > $@
jv-convert.pod: java/gcj.texi
	-$(TEXI2POD) -D jv-convert < $< > $@
grmic.pod: java/gcj.texi
	-$(TEXI2POD) -D grmic < $< > $@
gcj-dbtool.pod: java/gcj.texi
	-$(TEXI2POD) -D gcj-dbtool < $< > $@
gc-analyze.pod: java/gcj.texi
	-$(TEXI2POD) -D gc-analyze < $< > $@
aot-compile.pod: java/gcj.texi
	-$(TEXI2POD) -D aot-compile < $< > $@
rebuild-gcj-db.pod: java/gcj.texi
	-$(TEXI2POD) -D rebuild-gcj-db < $< > $@

# Install the man pages.
java.install-man: installdirs \
                  $(DESTDIR)$(man1dir)/$(JAVA_INSTALL_NAME)$(man1ext) \
		  $(JAVA_TARGET_INDEPENDENT_BIN_TOOLS:%=doc/%.1) \
		  doc/gij.1 doc/jv-convert.1 doc/grmic.1 \
		  doc/gcj-dbtool.1 doc/gc-analyze.1 \
		  doc/aot-compile.1 doc/rebuild-gcj-db.1
	for tool in $(JAVA_TARGET_INDEPENDENT_BIN_TOOLS) \
		gij jv-convert grmic gcj-dbtool gc-analyze aot-compile \
		rebuild-gcj-db; do \
	  tool_transformed_name=`echo $$tool|sed '$(program_transform_name)'`; \
	  man_name=$(DESTDIR)$(man1dir)/$${tool_transformed_name}$(man1ext); \
	  rm -f $$man_name ; \
	  for source_name in doc/$${tool}.1 $(srcdir)/doc/$${tool}.1 ; do \
	    if test -f $$source_name; then \
	      $(INSTALL_DATA) $$source_name $$man_name; \
	      break; \
	      else : ; \
	    fi; \
	  done ; \
	  chmod a-x $$man_name ; \
	done

$(DESTDIR)$(man1dir)/$(JAVA_INSTALL_NAME)$(man1ext): doc/gcj.1 installdirs
	-rm -f $@
	-$(INSTALL_DATA) $< $@
	-chmod a-x $@