[multiple changes]

1998-10-22  Tom Tromey  <tromey@cygnus.com>
	* config-lang.in (stagestuff): Added jcf-dump and jv-scan.
Sun Oct 11 10:31:52 1998  Anthony Green  <green@cygnus.com>
	* Make-lang.in (java): Depend on jcf-dump and jv-scan.
	(JV_SCAN_SOURCES): New macro.
	(JCF_DUMP_SOURCES): Likewise.
	(jcf-dump$(exeext)): New target.
	(jv-scan$(exeext)): New target.
1998-10-22  Tom Tromey  <tromey@cygnus.com>
	* Makefile.in (LEX): Removed.
	(LEXFLAGS): Likewise.
	(SET_BISON): New macro.
	(BISON): Removed.
	($(PARSE_C)): Use SET_BISON.  Run bison from srcdir to avoid
	spurious diffs in parse.c.
	($(PARSE_SCAN_C)): Likewise.
	(PARSE_DIR): New macro.
	(PARSE_C): Use it.
	(PARSE_SCAN_C): Likewise.
	(PARSE_RELDIR): New macro.

From-SVN: r23220
This commit is contained in:
Tom Tromey 1998-10-22 13:06:56 +00:00
parent 8603f9c5b0
commit 257fafbbe3
7 changed files with 428 additions and 381 deletions

View File

@ -1,5 +1,31 @@
1998-10-22 Tom Tromey <tromey@cygnus.com>
* config-lang.in (stagestuff): Added jcf-dump and jv-scan.
Sun Oct 11 10:31:52 1998 Anthony Green <green@cygnus.com>
* Make-lang.in (java): Depend on jcf-dump and jv-scan.
(JV_SCAN_SOURCES): New macro.
(JCF_DUMP_SOURCES): Likewise.
(jcf-dump$(exeext)): New target.
(jv-scan$(exeext)): New target.
1998-10-22 Tom Tromey <tromey@cygnus.com>
* Makefile.in (LEX): Removed.
(LEXFLAGS): Likewise.
(SET_BISON): New macro.
(BISON): Removed.
($(PARSE_C)): Use SET_BISON. Run bison from srcdir to avoid
spurious diffs in parse.c.
($(PARSE_SCAN_C)): Likewise.
(PARSE_DIR): New macro.
(PARSE_C): Use it.
(PARSE_SCAN_C): Likewise.
(PARSE_RELDIR): New macro.
* jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
* jcf-io.c (find_class): Use saw_java_source to determine when to
look for `.java' file.
* jcf-parse.c (saw_java_source): New global.

View File

@ -57,7 +57,7 @@ JAVA_CROSS_NAME = `t='$(program_transform_cross_name)'; echo gcj | sed $$t`
GCJ = gcj
# Define the names for selecting java in LANGUAGES.
java: jc1$(exeext) $(GCJ)$(exeext) jvgenmain$(exeext) gcjh$(exeext)
java: jc1$(exeext) $(GCJ)$(exeext) jvgenmain$(exeext) gcjh$(exeext) jv-scan$(exeext) jcf-dump$(exeext)
# Define the name of target independant tools to be installed in $(bindir)
# Names are subject to changes
@ -125,6 +125,19 @@ GCJH_SOURCES = $(srcdir)/java/gjavah.c $(srcdir)/java/jcf-io.c \
gcjh$(exeext): $(GCJH_SOURCES)
cd java && $(MAKE) $(FLAGS_TO_PASS) $(JAVA_FLAGS_TO_PASS) ../gcjh$(exeext)
# 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
jv-scan$(exeext): $(JV_SCAN_SOURCES)
cd java && $(MAKE) $(FLAGS_TO_PASS) $(JAVA_FLAGS_TO_PASS) ../jv-scan$(exeext)
# This must be kept in sync with dependencies in Makefile.in.
JCF_DUMP_SOURCES = $(srcdir)/java/jcf-dump.c $(srcdir)/java/jcf-io.c \
$(srcdir)/java/zextract.c $(srcdir)/../libiberty/memmove.c
jcf-dump$(exeext): $(JCF_DUMP_SOURCES)
cd java && $(MAKE) $(FLAGS_TO_PASS) $(JAVA_FLAGS_TO_PASS) ../jcf-dump$(exeext)
# Build hooks:

View File

@ -59,11 +59,9 @@ X_CPPFLAGS =
T_CPPFLAGS =
CC = @CC@
BISON = `if [ -f ../../bison/bison ] ; then echo ../../bison/bison -L $(srcdir)/../../bison/ ; else echo bison ; fi`
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_
LEX = `if [ -f ../../flex/flex ] ; then echo ../../flex/flex ; else echo flex ; fi`
LEXFLAGS =
AR = ar
AR_FLAGS = rc
SHELL = /bin/sh
@ -229,16 +227,24 @@ RTL_H = $(srcdir)/../rtl.h $(srcdir)/../rtl.def \
$(srcdir)/../machmode.h $(srcdir)/../machmode.def
EXPR_H = $(srcdir)/../expr.h ../insn-codes.h
PARSE_C = $(srcdir)/parse.c
PARSE_SCAN_C = $(srcdir)/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.
PARSE_DIR = $(srcdir)
PARSE_RELDIR = .
PARSE_C = $(PARSE_DIR)/parse.c
PARSE_SCAN_C = $(PARSE_DIR)/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
$(SET_BISON); \
cd $(PARSE_DIR) && $$bison -t -v $(BISONFLAGS) $(JAVABISONFLAGS) \
-o parse.c $(PARSE_RELDIR)/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
$(SET_BISON); \
cd $(PARSE_DIR) && $$bison -t -v $(BISONFLAGS) -o parse-scan.c \
$(PARSE_RELDIR)/parse-scan.y
lex.c: keyword.h lex.h

View File

@ -35,6 +35,6 @@ language="java"
compilers="jc1\$(exeext) jvgenmain\$(exeext)"
stagestuff="jc1\$(exeext) gcj\$(exeext) jvgenmain\$(exeext) gcjh\$(exeext)"
stagestuff="jc1\$(exeext) gcj\$(exeext) jvgenmain\$(exeext) gcjh\$(exeext) jv-scan\$(exeext) jcf-dump\$(exeext)"
outputs=java/Makefile

View File

@ -29,6 +29,11 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include <sys/stat.h>
#include <sys/wait.h>
/* This is true if the user specified a `.java' file on the command
line. Otherwise it is 0. FIXME: this is temporary, until our
.java parser is fully working. */
int saw_java_source = 0;
/* DOS brain-damage */
#ifndef O_BINARY
#define O_BINARY 0 /* MS-DOS brain-damage */
@ -350,7 +355,6 @@ DEFUN(find_class, (classname, classname_length, jcf, do_class_file),
java_entry = jcf_path_next (java_entry))
{
int m, l;
extern int saw_java_source; /* FIXME: temporary. */
if (jcf_path_is_zipfile (java_entry))
continue;

View File

@ -61,11 +61,6 @@ tree current_class = NULL_TREE;
/* The class we started with. */
tree main_class = NULL_TREE;
/* This is true if the user specified a `.java' file on the command
line. Otherwise it is 0. FIXME: this is temporary, until our
.java parser is fully working. */
int saw_java_source = 0;
/* The FIELD_DECL for the current field. */
static tree current_field = NULL_TREE;
@ -721,8 +716,11 @@ yyparse ()
if (list[0])
{
char *value, len;
extern int saw_java_source; /* FIXME: temporary. */
len = strlen (list);
/* FIXME: this test is only needed until our .java parser is
fully capable. */
if (len > 5 && ! strcmp (&list[len - 5], ".java"))
saw_java_source = 1;

File diff suppressed because it is too large Load Diff