OSDN Git Service

* Make-lang.in (PARSE_DIR): New macro.
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 5 Jul 2000 20:52:37 +0000 (20:52 +0000)
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 5 Jul 2000 20:52:37 +0000 (20:52 +0000)
(PARSE_RELDIR): Likewise.
(PARSE_C): Likewise.
(PARSE_SCAN_C): Likewise.
($(PARSE_C)): New target.
($(PARSE_SCAN_C)): Likewise.
(SET_BISON): New macro.
(BISONFLAGS): Likewise.
(JAVABISONFLAGS): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34876 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/java/ChangeLog
gcc/java/Make-lang.in
gcc/java/Makefile.in

index e7e2e0b..7c7c5d9 100644 (file)
@@ -1,3 +1,15 @@
+2000-07-05  Tom Tromey  <tromey@cygnus.com>
+
+       * Make-lang.in (PARSE_DIR): New macro.
+       (PARSE_RELDIR): Likewise.
+       (PARSE_C): Likewise.
+       (PARSE_SCAN_C): Likewise.
+       ($(PARSE_C)): New target.
+       ($(PARSE_SCAN_C)): Likewise.
+       (SET_BISON): New macro.
+       (BISONFLAGS): Likewise.
+       (JAVABISONFLAGS): Likewise.
+
 2000-07-02  Bryce McKinlay  <bryce@albatross.co.nz>
 
         * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
index 350398a..d6054eb 100644 (file)
@@ -112,6 +112,28 @@ gcjh$(exeext): $(GCJH_SOURCES) $(LIBDEPS) $(TREE_H)
 
 $(INTL_TARGETS): $(srcdir)/java/parse.c $(srcdir)/java/parse-scan.c
 
+# Separating PARSE_DIR from PARSE_RELDIR lets us easily change the
+# code to support building parse.c in the build directory, at some
+# expense in readability.
+# This code must be kept in sync with Makefile.in.
+PARSE_DIR = $(srcdir)/java
+PARSE_RELDIR = .
+PARSE_C = $(PARSE_DIR)/parse.c
+PARSE_SCAN_C = $(PARSE_DIR)/parse-scan.c
+
+SET_BISON = here=`pwd`; sdir=`cd $(srcdir) && pwd`; if test -f ../bison; then bison="$$here/../bison/bison -L $$sdir"; else bison=bison; fi
+BISONFLAGS =
+JAVABISONFLAGS = --name-prefix=java_
+
+$(PARSE_C):  $(srcdir)/java/parse.y
+       $(SET_BISON); \
+       cd $(PARSE_DIR) && $$bison -t $(BISONFLAGS) $(JAVABISONFLAGS) \
+           -o parse.c $(PARSE_RELDIR)/parse.y
+$(PARSE_SCAN_C):  $(srcdir)/java/parse-scan.y
+       $(SET_BISON); \
+       cd $(PARSE_DIR) && $$bison -t $(BISONFLAGS) -o parse-scan.c \
+           $(PARSE_RELDIR)/parse-scan.y
+
 # This must be kept in sync with dependencies in Makefile.in.
 JV_SCAN_SOURCES = $(srcdir)/java/parse-scan.y $(srcdir)/java/lex.c \
        $(srcdir)/java/parse.h $(srcdir)/java/lex.h $(srcdir)/java/jv-scan.c
index bbb42d2..8b40a5e 100644 (file)
@@ -218,6 +218,7 @@ EXPR_H = $(srcdir)/../expr.h ../insn-codes.h
 # Separating PARSE_DIR from PARSE_RELDIR lets us easily change the
 # code to support building parse.c in the build directory, at some
 # expense in readability.
+# This code must be kept in sync with Make-lang.in.
 PARSE_DIR = $(srcdir)
 PARSE_RELDIR = .
 PARSE_C = $(PARSE_DIR)/parse.c