This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
java parser intentionally in builddir?
- To: egcs at cygnus dot com
- Subject: java parser intentionally in builddir?
- From: Robert Lipe <robertl at dgii dot com>
- Date: Fri, 16 Oct 1998 15:56:10 -0500
The gcc/java Makefile.in is different than all the other languages
in that a prebuilt parser isn't in the srcdir and it looks like it's
intentionally build in the builddir. This means that it gets run built
(with identical flags) for each target that gets built and it requires
BISON be on the build system. This is inconsistent with other languages
that require uncommon tools to build files. I would say that it's an
accident, but the code goes to some trouble to do this.
# CYGNUS LOCAL: we put these files into the build dir.
PARSE_C = parse.c
PARSE_SCAN_C = parse-scan.c
PARSE_H = $(srcdir)/parse.h
$(PARSE_C): $(srcdir)/parse.y $(srcdir)/lex.c $(PARSE_H) $(srcdir)/lex.h
$(BISON) -t -v $(BISONFLAGS) $(JAVABISONFLAGS) -o $(PARSE_C) \
$(srcdir)/parse.y
$(PARSE_SCAN_C): $(srcdir)/parse-scan.y $(srcdir)/lex.c $(PARSE_H) \
$(srcdir)/lex.h
$(BISON) -t -v $(BISONFLAGS) -o $(PARSE_SCAN_C) $(srcdir)/parse-scan.y
We have some combination of options:
1) Checkin prebuilt parse-scan.y and lex.c in gcc/java.
B) Document BISON as a requirement.
III) Modify Makefile.in fragment above to generate these in $(srcdir)/blah.
4) Leave it alone as this really is how it's intended to work.
E) Others.
If my understanding of things is correct (hardly a given) I suspect 1
and III are in order. It seems to be as simple as making
PARSE_C = $(srcdir)/parse.c
Also, I don't find anything depending upon PARSE_SCAN_C. Is it
vestigal?
Suggestions?
RJL