This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Makefile problems
- From: Bryce McKinlay <bryce at waitaki dot otago dot ac dot nz>
- To: java at gcc dot gnu dot org
- Date: Sun, 24 Feb 2002 22:34:46 +1300
- Subject: Makefile problems
The libgcj build is currently screwed up. There seem to be several
separate problems.
Firstly, dependencies are not working. This is partly caused by the
"--classpath" change, because one instance of "-fclasspath" in the
Makefile did not get changed. This resulted in dependencies on
libgcj.jar instead of the individual class files, fixed by this patch:
--- Makefile.am 2002/02/22 03:21:26 1.201
+++ Makefile.am 2002/02/24 08:43:33
@@ -69,7 +69,7 @@
## compiles.
GCJ_WITH_FLAGS = $(GCJ) --encoding=UTF-8
-GCJCOMPILE = $(LIBTOOL) --tag=GCJ --mode=compile $(GCJ_WITH_FLAGS)
-fassume-compiled -fclasspath=$(here) -L$(here) $(JC1FLAGS) -MD -MT $@
-MF $(@:.lo=.d) -c
+GCJCOMPILE = $(LIBTOOL) --tag=GCJ --mode=compile $(GCJ_WITH_FLAGS)
-fassume-compiled -fCLASSPATH=$(here) $(JC1FLAGS) -MD -MT $@ -MF
$(@:.lo=.d) -c
GCJLINK = $(LIBTOOL) --tag=GCJ --mode=link $(GCJ) -L$(here) $(JC1FLAGS)
$(LDFLAGS) -o $@
LIBLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXX) -L$(here) $(JC1FLAGS)
$(LDFLAGS) -o $@
However there is still a problem with native dependencies. The Makefile
seems to get three different rules for building the .cc files:
(1)
.cc.lo:
$(LTCXXCOMPILE) -c $<
(2)
%.lo: %.cc
@echo '$(LTCXXCOMPILE) -c $<'; \
$(LTCXXCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
@-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
(3)
$(nat_files) $(x_nat_files): %.lo: %.cc
@echo '$(LTCXXCOMPILE) -MD -MT $@ -MF $(@:.lo=.pp) -c -o $@ $<'; \
$(LTCXXCOMPILE) -MD -MT $@ -MF $(@:.lo=.pp) -c -o $@ $<
@-mv $(@:.lo=.pp) $(@:.lo=.d)
The 1st and second rules are put in by automake while the 3rd is our own
rule in Makefile.am. It used to be that the second rule got used, but
when the 3rd one was added it got used instead because it is more
specific. But now for some reason the first one is being used, and
proper dependencies dont get generated. Anyone know what caused this to
change?
Finally, "make install" is not working properly (this one at least seems
to have broken in the last few days). libgcj.so.2.0.0 simply does not
get installed unless I delete it from the installation directory first!
All the other libraries do get installed correctly. Ugh. I have no idea
what is going on here. libtool I guess ;-(
Bryce.