This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Build problems with CVS under Solaris 8/SPARC


gmake[2]: Entering directory `/opt/build/gcc-2.97/objdir/gcc'
cd cp && gmake ../../../gcc/cp/parse.c
gmake[3]: Entering directory `/opt/build/gcc-2.97/objdir/gcc/cp'
expect 33 shift/reduce conflicts and 58 reduce/reduce conflicts.
cd ../../../gcc/cp; bison  -d -o p$$.c parse.y ; \
grep '^#define[         ]*YYEMPTY' p$$.c >> p$$.h ; \
mv -f p$$.c ../../../gcc/cp/parse.c ; mv -f p$$.h ../../../gcc/cp/parse.h
parse.y contains 35 shift/reduce conflicts and 58 reduce/reduce conflicts.
mv: cannot rename p24233.c: No such file or directory
mv: cannot rename p24233.h: No such file or directory
gmake[3]: *** [../../../gcc/cp/parse.c] Error 2

It looks like there is one extra '..'. When this command is run, the
currect directory is '/opt/build/gcc-2.97/gcc/cp'. And, $(PARSE_C) is
../../../gcc/cp/parse.c. So, the mv is going to fail. So, a patch
below generates the p$$.[ch] files in a subshell then uses $(srcdir)
to specify the original location of the p$$.[ch] files for the mv.

-- 
albert chin (china@thewrittenword.com)

-- snip snip
--- gcc/cp/Makefile.in.orig	Fri Oct 13 15:43:05 2000
+++ gcc/cp/Makefile.in	Fri Oct 13 15:44:02 2000
@@ -225,9 +225,9 @@
 CONFLICTS = expect 33 shift/reduce conflicts and 58 reduce/reduce conflicts.
 $(PARSE_H) $(PARSE_C) : $(srcdir)/parse.y
 	@echo $(CONFLICTS)
-	cd $(srcdir); $(BISON) $(BISONFLAGS) -d -o p$$$$.c parse.y ; \
-	grep '^#define[ 	]*YYEMPTY' p$$$$.c >> p$$$$.h ; \
-	mv -f p$$$$.c $(PARSE_C) ; mv -f p$$$$.h $(PARSE_H)
+	(cd $(srcdir); $(BISON) $(BISONFLAGS) -d -o p$$$$.c parse.y ; \
+	grep '^#define[ 	]*YYEMPTY' p$$$$.c >> p$$$$.h) ; \
+	mv -f $(srcdir)/p$$$$.c $(PARSE_C); mv -f $(srcdir)/p$$$$.h $(PARSE_H)
 #$(PARSE_C) $(PARSE_H) : stamp-parse ; @true
 #stamp-parse: $(srcdir)/parse.y
 #	@echo $(CONFLICTS)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]