This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: Remove generated YACC stuff
- To: gcc-patches at gcc dot gnu dot org
- Subject: PATCH: Remove generated YACC stuff
- From: Mark Mitchell <mark at codesourcery dot com>
- Date: Wed, 12 Jul 2000 00:16:01 -0700
- Organization: CodeSourcery, LLC
We've been bitten by the forgot-to-regenerate-the-.c-file bug, and the
timestamps-are-whacked-so-some-things-get-rebuilt bug, both of which
lead to hard to track problems, for the last time.
This patch removes the generated YACC .c/.h files from the repository.
That means CVS users will need yacc/bison installed. If we don't want
to force that on snapshot users, we need to have the snapshot script
generate these things. Even there we should be careful though; you
can get bit by untarring the tar file in such a way that exactly one
of your C or Objective-C .c's looks older than the corresponding .y.
In that case, your local bison will automatically rebuild only one of
the files, and you'll likely end up with bison version skew. Ugh.
The only fixes are to either make sure that we don't put these things
in snapshots, have the Makefile in a snapshot not rebuild these things
(maintainer mode support?), or somehow rework things so as to have
just one c-parse.y, rather than c-parse.y and objc-parse.y.
Here are the "interesting" bits of the patch; the rest is just removal
of generated code.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com
2000-07-12 Mark Mitchell <mark@codesourcery.com>
* gcc_update (files_and_dependencies): Remove generated YACC files.
2000-07-12 Mark Mitchell <mark@codesourcery.com>
* c-parse.c: Remove.
* c-parse.h: Likewise.
* c-parse.y: Likewise.
* objc/objc-parse.c: Likewise.
* objc/objc-pasre.y: Likewise.
2000-07-12 Mark Mitchell <mark@codesourcery.com>
* Makefile.in ($(PARSE_H)): Depend directly on parse.y.
* parse.c: Remove.
* parse.h: Likewise.
2000-07-12 Mark Mitchell <mark@codesourcery.com>
* parse-scan.c: Remove.
Index: contrib/gcc_update
===================================================================
RCS file: /cvs/gcc/egcs/contrib/gcc_update,v
retrieving revision 1.10
diff -c -p -r1.10 gcc_update
*** gcc_update 2000/07/11 01:36:39 1.10
--- gcc_update 2000/07/12 07:04:20
*************** texinfo/util/Makefile.in: texinfo/util/M
*** 65,84 ****
gcc/configure: gcc/configure.in
gcc/cstamp-h.in: gcc/configure.in gcc/acconfig.h
gcc/config.in: gcc/cstamp-h.in
- gcc/c-parse.y: gcc/c-parse.in
- gcc/c-parse.c: gcc/c-parse.y
- gcc/c-parse.h: gcc/c-parse.c
gcc/c-gperf.h: gcc/c-parse.gperf
gcc/fixinc/fixincl.x: gcc/fixinc/fixincl.tpl gcc/fixinc/inclhack.def
gcc/tradcif.c: gcc/tradcif.y
# And then, language-specific files
- gcc/cp/parse.c: gcc/cp/parse.y
- gcc/cp/parse.h: gcc/cp/parse.c
- gcc/objc/objc-parse.y: gcc/c-parse.in
- gcc/objc/objc-parse.c: gcc/objc/objc-parse.y
gcc/java/parse.h: gcc/java/parse.y
gcc/java/parse.c: gcc/java/parse.y gcc/java/lex.c gcc/java/parse.h gcc/java/lex.h
- gcc/java/parse-scan.c: gcc/java/parse-scan.y gcc/java/lex.c gcc/java/parse.h gcc/java/lex.h
# And libraries, at last
libchill/configure: libchill/configure.in
libf2c/configure: libf2c/configure.in
--- 65,76 ----
Index: gcc/cp/Makefile.in
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/Makefile.in,v
retrieving revision 1.93
diff -c -p -r1.93 Makefile.in
*** Makefile.in 2000/07/02 05:22:59 1.93
--- Makefile.in 2000/07/12 07:04:45
*************** parse.o : $(PARSE_C) $(CXX_TREE_H) $(src
*** 220,227 ****
`echo $(PARSE_C) | sed 's,^\./,,'`
CONFLICTS = expect 33 shift/reduce conflicts and 58 reduce/reduce conflicts.
! $(PARSE_H) : $(PARSE_C)
! $(PARSE_C) : $(srcdir)/parse.y
@echo $(CONFLICTS)
cd $(srcdir); $(BISON) $(BISONFLAGS) -d -o parse.c parse.y
cd $(srcdir); grep '^#define[ ]*YYEMPTY' parse.c >>parse.h
--- 220,226 ----
`echo $(PARSE_C) | sed 's,^\./,,'`
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 parse.c parse.y
cd $(srcdir); grep '^#define[ ]*YYEMPTY' parse.c >>parse.h