Makefile.in (BISON): Use bison from the build tree if it exists.
authorJeffrey A Law <law@cygnus.com>
Mon, 18 May 1998 00:23:16 +0000 (00:23 +0000)
committerJeff Law <law@gcc.gnu.org>
Mon, 18 May 1998 00:23:16 +0000 (18:23 -0600)
        * Makefile.in (BISON): Use bison from the build tree if it exists.
        (FLEX): Similarly.

From-SVN: r19825

gcc/ChangeLog
gcc/Makefile.in
gcc/cp/ChangeLog
gcc/cp/Makefile.in

index 831cd540031a8f1e073f320a65f98d1eb6067740..928622f1ad1c50125dae8d21e0ef6f6e7b22fb6c 100644 (file)
@@ -1,3 +1,8 @@
+Mon May 18 01:23:33 1998  Jeffrey A Law  (law@cygnus.com)
+
+       * Makefile.in (BISON): Use bison from the build tree if it exists.
+       (FLEX): Similarly.
+
 Mon May 18 00:08:19 1998  Nick Clifton  <nickc@cygnus.com>
 
        * gcc.c (SWITCH_CURTAILS_COMPILATION): Definition.
index e368cf47639fee14034c820f164599ae883207a4..88b0202aecd6fcae0541ef5d42fb852bb644aae1 100644 (file)
@@ -72,9 +72,15 @@ X_CPPFLAGS =
 T_CPPFLAGS =
 
 CC = @CC@
-BISON = bison
+# srcdir might be a relative pathname which won't be valid in a subdirectory,
+# so we must use objdir/srcdir instead to make it safe.  objdir is always
+# a full pathname.
+BISON = `if [ -f $(objdir)/../bison/bison ] ; then case $(srcdir) in \
+       /*) echo $(objdir)/../bison/bison -L $(srcdir)/../bison/ ;; \
+       *) echo $(objdir)/../bison/bison -L $(objdir)/$(srcdir)/../bison/ ;; \
+       esac else echo bison ; fi`
 BISONFLAGS =
-LEX = flex
+LEX = `if [ -f $(objdir)/../flex/flex ] ; then echo $(objdir)/../flex/flex ; else echo flex ; fi`
 LEXFLAGS =
 AR = ar
 AR_FLAGS = rc
index 5f87d3a5d5292f27392ad158a8784a4f2023d840..7c7c44fe435c4d5092a3e6d4aba4dbc93ee8abaf 100644 (file)
@@ -1,3 +1,8 @@
+Mon May 18 01:24:08 1998  Jeffrey A Law  (law@cygnus.com)
+
+       * Makefile.in (BISON): Use bison from the build tree if it exists.
+       (FLEX): Similarly.
+
 Sun May 17 14:52:08 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
 
        * typeck.c (type_unknown_p): Return true for TREE_LIST also.
index 61da1abcd82dfd6e918cae97836aa2ce005d5a16..6ce522722b20c419e832c9e55fd27301ec8ecf42 100644 (file)
@@ -55,9 +55,9 @@ X_CPPFLAGS =
 T_CPPFLAGS =
 
 CC = @CC@
-BISON = bison
+BBISON = `if [ -f ../../bison/bison ] ; then echo ../../bison/bison -L $(srcdir)/../../bison/ ;  else echo bison ; fi`
 BISONFLAGS =
-LEX = flex
+LEX = `if [ -f ../../flex/flex ] ; then echo ../../flex/flex ;  else echo flex ; fi`
 LEXFLAGS =
 AR = ar
 AR_FLAGS = rc