This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
One more patch for java/Makefile.in (will help SUN make get through in builddir != srcdir)
- To: egcs-patches at cygnus dot com
- Subject: One more patch for java/Makefile.in (will help SUN make get through in builddir != srcdir)
- From: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- Date: Tue, 22 Dec 1998 00:01:51 +0100
These patches are as much a corrections for missing stuff as
adjustments to get SUN make going, IMHO; so please don't refuse
them for political reasons (I humbly beg ;-)
This patch fixes the following:
- SUN make does not understand how to apply a suffix-rule (.c.o)
to a .c file that includes a path-name. The fix here is to
include an explicit rule for this. That is what is done in
cp/Makefile.in (which has constructs almost identical to the
PARSE_C stuff), so it should be TRT.
I just cut-n-pasted that solution, but another solution (such
as saying "parse.o: parse.c ..." instead of "parse.o:
$(PARSE_C) ...") may look better to the java hackers.
- Missing stuff in dependencies. I guess these are just misses,
but SUN make cannot apply a suffix rule unless it sees a
dependency on the .c-file from the .o-file. Concerns
jcf-dump.o and gjavah.o
- No dependency at all for jv-scan.o or parse-scan.o
It seems GNU make is smart enough without it, but surely the
.o-files should depend on some of the .h files?
Dependencies generated with gcc -MM, then adjusted.
With this patch and the others previously sent, the builddir !=
srcdir "make bootstrap check" on a sparc-sun-solaris2.5
continues to after the actual bootstrapping, up to just before
the end of that target, when libU77 builds. Patch you later.
The patch is edited to exclude my two earlier (also needed)
patches to java/Makefile.in.
gcc/java/ChangeLog:
Mon Dec 21 23:36:21 1998 Hans-Peter Nilsson <hp@axis.se>
* Makefile.in (parse.o): Provide explicit rule.
(parse-scan.o): Ditto.
(jcf-dump.o): Depend on jcf-dump.c too.
(gjavah.o): Depend on gjavah.c too.
(jv-scan.o): Added missing dependency.
Index: Makefile.in
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/java/Makefile.in,v
retrieving revision 1.20
diff -c -p -r1.20 Makefile.in
*** Makefile.in 1998/12/16 21:19:51 1.20
--- Makefile.in 1998/12/21 22:16:39
*************** $(PARSE_C): $(srcdir)/parse.y $(srcdir)
*** 236,247 ****
--- 236,258 ----
$(SET_BISON); \
cd $(PARSE_DIR) && $$bison -t -v $(BISONFLAGS) $(JAVABISONFLAGS) \
-o parse.c $(PARSE_RELDIR)/parse.y
+
+ parse.o: $(PARSE_C) jcf-reader.c
+ $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
+ `echo $(PARSE_C) | sed 's,^\./,,'`
+
$(PARSE_SCAN_C): $(srcdir)/parse-scan.y $(srcdir)/lex.c $(PARSE_H) \
$(srcdir)/lex.h
$(SET_BISON); \
cd $(PARSE_DIR) && $$bison -t -v $(BISONFLAGS) -o parse-scan.c \
$(PARSE_RELDIR)/parse-scan.y
+ parse-scan.o: $(PARSE_SCAN_C) $(CONFIG_H) \
+ $(srcdir)/../gansidecl.h $(srcdir)/../system.h \
+ $(srcdir)/lex.h $(PARSE_H) keyword.h
+ $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
+ `echo $(PARSE_SCAN_C) | sed 's,^\./,,'`
+
lex.c: keyword.h lex.h
lang.o: $(srcdir)/java-tree.def
*************** clean: mostlyclean
*** 273,281 ****
force:
! parse.o: $(PARSE_C) jcf-reader.c
! jcf-dump.o: jcf-reader.c jcf.h javaop.h javaop.def
! gjavah.o: jcf-reader.c jcf.h javaop.h
buffer.o : buffer.c $(CONFIG_H) buffer.h $(srcdir)/../gansidecl.h \
$(srcdir)/../system.h $(srcdir)/../toplev.h
class.o : class.c $(CONFIG_H) $(JAVA_TREE_H) $(RTL_H) jcf.h \
--- 284,292 ----
force:
! jcf-dump.o: jcf-dump.c jcf-reader.c jcf.h javaop.h javaop.def
! jv-scan.o: jv-scan.c $(srcdir)/../gansidecl.h $(PARSE_H) $(srcdir)/lex.h
! gjavah.o: gjavah.c jcf-reader.c jcf.h javaop.h
buffer.o : buffer.c $(CONFIG_H) buffer.h $(srcdir)/../gansidecl.h \
$(srcdir)/../system.h $(srcdir)/../toplev.h
class.o : class.c $(CONFIG_H) $(JAVA_TREE_H) $(RTL_H) jcf.h \
brgds, H-P