summaryrefslogtreecommitdiffstats
path: root/libjava/Makefile.am
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2000-10-20 21:21:37 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2000-10-20 21:21:37 +0000
commite5fd56dbc2bb8b6e836689c0926e9ebdbba0f051 (patch)
treed697abb67f0a5c9da5f1d5091614a0613269ca80 /libjava/Makefile.am
parentfecb951e63d3b75accbb4264d618f9f5db740377 (diff)
downloadppe42-gcc-e5fd56dbc2bb8b6e836689c0926e9ebdbba0f051.tar.gz
ppe42-gcc-e5fd56dbc2bb8b6e836689c0926e9ebdbba0f051.zip
* Makefile.in: Rebuilt.
* Makefile.am: Include deps.mk. (GCJCOMPILE): Added -MD, -MT, and -MF. ($(javao_files)): Don't depend on libgcj.zip. (all-recursive): New target. (%.lo:%.cc): Do dependency tracking. ($(nat_headers)): Don't depend on libgcj.zip. * configure: Rebuilt. * configure.in: Make .d files and deps.mk. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36982 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/Makefile.am')
-rw-r--r--libjava/Makefile.am41
1 files changed, 29 insertions, 12 deletions
diff --git a/libjava/Makefile.am b/libjava/Makefile.am
index 8cc666c0685..cf045fe6a63 100644
--- a/libjava/Makefile.am
+++ b/libjava/Makefile.am
@@ -65,7 +65,7 @@ GCJH = $(MULTIBUILDTOP)../$(COMPPATH)/gcc/gcjh$(EXEEXT)
ZIP = $(MULTIBUILDTOP)../$(COMPPATH)/zip/zip$(EXEEXT)
endif # CANADIAN
-GCJCOMPILE = $(LIBTOOL) --mode=compile $(GCJ) -fassume-compiled -fclasspath=$(here) -L$(here) $(JC1FLAGS) -c
+GCJCOMPILE = $(LIBTOOL) --mode=compile $(GCJ) -fassume-compiled -fclasspath=$(here) -L$(here) $(JC1FLAGS) -MD -MT $@ -MF $(@:.lo=.d) -c
GCJLINK = $(LIBTOOL) --mode=link $(GCJ) -L$(here) $(JC1FLAGS) $(LDFLAGS) -o $@
LIBLINK = $(LIBTOOL) --mode=link $(CC) -L$(here) $(JC1FLAGS) $(LDFLAGS) -o $@
@@ -117,12 +117,13 @@ javao_files = $(java_source_files:.java=.lo) \
libffi_files = `$(AR) t ../libffi/.libs/libffi.a 2>/dev/null | sed 's/\.o/\.lo/g' | sed 's/^/..\/libffi\//g'`
libgcj_la_SOURCES = prims.cc posix.cc jni.cc exception.cc \
- resolve.cc defineclass.cc interpret.cc name-finder.cc
+ resolve.cc defineclass.cc interpret.cc name-finder.cc \
+ $(nat_source_files)
EXTRA_libgcj_la_SOURCES = boehm.cc nogc.cc posix-threads.cc no-threads.cc \
$(c_source_files) $(java_source_files) $(built_java_source_files)
-libgcj_la_DEPENDENCIES = libgcj.zip $(javao_files) $(nat_files) \
+libgcj_la_DEPENDENCIES = libgcj.zip $(javao_files) \
$(c_files) $(GCOBJS) $(THREADOBJS) $(LIBLTDL)
-libgcj_la_LIBADD = $(javao_files) $(nat_files) $(c_files) $(GCOBJS) \
+libgcj_la_LIBADD = $(javao_files) $(c_files) $(GCOBJS) \
$(THREADOBJS) $(libffi_files) $(LIBLTDL)
libgcj_la_LDFLAGS = -lsupc++ -rpath $(toolexeclibdir) \
## The mysterious backslash is consumed by make.
@@ -192,10 +193,14 @@ SUFFIXES = .class .java .h
## is a bug in automake), and it also won't put the .o files into
## subdirs. FIXME.
$(nat_files): %.lo: %.cc
- $(LTCXXCOMPILE) -c -o $@ $<
-
-$(nat_files) $(GCOBJS) $(THREADOBJS) $(libgcj_la_OBJECTS) $(gij_OBJECTS): \
- include/config.h include/java-signal.h $(nat_headers)
+ @echo '$(LTCXXCOMPILE) -c -o $@ $<'; \
+ $(LTCXXCOMPILE) -Wp,-MD,.deps/$(*F).pp -c -o $@ $<
+ @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
+ < .deps/$(*F).pp > .deps/$(*F).P; \
+ tr ' ' '\012' < .deps/$(*F).pp \
+ | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
+ >> .deps/$(*F).P; \
+ rm -f .deps/$(*F).pp
## FIXME: GNU make.
$(c_files): %.lo: %.c
@@ -207,8 +212,6 @@ $(c_files): java/lang/fdlibm.h java/lang/ieeefp.h java/lang/mprec.h
$(javao_files): %.lo: %.java
$(GCJCOMPILE) -o $@ $<
-$(javao_files): libgcj.zip
-
## ################################################################
##
@@ -225,8 +228,6 @@ nat_headers = $(ordinary_java_source_files:.java=.h) \
java/io/ObjectOutputStream$$PutField.h \
java/io/ObjectInputStream$$GetField.h
-$(nat_headers): libgcj.zip
-
java/lang/ClassLoader.h: java/lang/ClassLoader.class libgcj.zip
$(GCJH) -classpath $(top_builddir) \
-friend 'jclass _Jv_FindClass (_Jv_Utf8Const *name, java::lang::ClassLoader *loader);' \
@@ -1170,6 +1171,22 @@ java/util/zip/natInflater.cc
## ################################################################
##
+## Dependency tracking madness.
+##
+
+## FIXME: depends on GNU make.
+-include deps.mk
+
+## This is an evil hack to work around an automake limitation. We
+## need to ensure that the built headers are built before we try to
+## compile the C++ sources, but we can't make the .o files depend on
+## the headers, because in that case we'll force a complete rebuild of
+## the C++ code whenever any .java file is touched.
+all-recursive: $(nat_headers)
+
+## ################################################################
+
+##
## This section is for make and multilib madness.
##
OpenPOWER on IntegriCloud