automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] {yacc-work} tests: don't define YACC and LEX in the Makefiles


From: Stefano Lattarini
Subject: [PATCH] {yacc-work} tests: don't define YACC and LEX in the Makefiles
Date: Sat, 29 Jan 2011 19:50:05 +0100
User-agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; )

We don't want YACC and LEX defined as make variables, otherwise
the values determined at configure time will override those from
the environment, even in the make-spawned testcases.  For example,
before this change, with the following usage:
  $ ./configure YACC=yacc
  $ export YACC='bison -y'
  $ make check
the testsuite would have ended up, very counterintuitively, with
YACC defined to 'yacc' in the testcases' environment.

* configure.ac: Call `AM_SUBST_NOTMAKE' on YACC and LEX.
---
 ChangeLog                      |   14 ++++++++++++++
 Makefile.in                    |    2 --
 configure                      |    5 +++++
 configure.ac                   |    5 +++++
 doc/Makefile.in                |    2 --
 lib/Automake/Makefile.in       |    2 --
 lib/Automake/tests/Makefile.in |    2 --
 lib/Makefile.in                |    2 --
 lib/am/Makefile.in             |    2 --
 m4/Makefile.in                 |    2 --
 tests/Makefile.in              |    2 --
 11 files changed, 24 insertions(+), 16 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index d2c2768..31208ff 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,19 @@
 2011-01-29  Stefano Lattarini  <address@hidden>
 
+       tests: don't define YACC and LEX in the Makefiles
+       We don't want YACC and LEX defined as make variables, otherwise
+       the values determined at configure time will override those from
+       the environment, even in the make-spawned testcases.  For example,
+       before this change, with the following usage:
+         $ ./configure YACC=yacc
+         $ export YACC='bison -y'
+         $ make check
+       the testsuite would have ended up, very counterintuitively, with
+       YACC defined to 'yacc' in the testcases' environment.
+       * configure.ac: Call `AM_SUBST_NOTMAKE' on YACC and LEX.
+
+2011-01-29  Stefano Lattarini  <address@hidden>
+
        tests: fix spurious failures in lflags*.test
        * tests/lflags.test: Remove 'LEX' from the environment, so
        that it won't be erroneously picked up by `make -e'.
diff --git a/Makefile.in b/Makefile.in
index 23ffa29..25d580d 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -166,7 +166,6 @@ INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LEX = @LEX@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LN = @LN@
@@ -189,7 +188,6 @@ SHELL = @SHELL@
 STRIP = @STRIP@
 TEX = @TEX@
 VERSION = @VERSION@
-YACC = @YACC@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
diff --git a/configure b/configure
index ffb4514..e0456ff 100755
--- a/configure
+++ b/configure
@@ -2503,6 +2503,11 @@ fi
 done
 test -n "$LEX" || LEX="false"
 
+# We don't want YACC and LEX defined as make variables, otherwise the
+# values determined at configure time will override those from the
+# environment, even in the make-spawned testcases.
+
+
 
 # Generate man pages.
 
diff --git a/configure.ac b/configure.ac
index ddd0af6..70b35f9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -107,6 +107,11 @@ AC_CHECK_PROG([TEX], [tex], [tex])
 #     configure help screen.
 AC_CHECK_PROGS([YACC], [yacc byacc 'bison -y'], [false])
 AC_CHECK_PROGS([LEX], [lex flex], [false])
+# We don't want YACC and LEX defined as make variables, otherwise the
+# values determined at configure time will override those from the
+# environment, even in the make-spawned testcases.
+AM_SUBST_NOTMAKE([YACC])
+AM_SUBST_NOTMAKE([LEX])
 
 # Generate man pages.
 AM_MISSING_PROG([HELP2MAN], [help2man])
diff --git a/doc/Makefile.in b/doc/Makefile.in
index 8eda666..c1739e5 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -133,7 +133,6 @@ INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LEX = @LEX@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LN = @LN@
@@ -156,7 +155,6 @@ SHELL = @SHELL@
 STRIP = @STRIP@
 TEX = @TEX@
 VERSION = @VERSION@
-YACC = @YACC@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
diff --git a/lib/Automake/Makefile.in b/lib/Automake/Makefile.in
index a86e899..5f051ed 100644
--- a/lib/Automake/Makefile.in
+++ b/lib/Automake/Makefile.in
@@ -153,7 +153,6 @@ INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LEX = @LEX@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LN = @LN@
@@ -176,7 +175,6 @@ SHELL = @SHELL@
 STRIP = @STRIP@
 TEX = @TEX@
 VERSION = @VERSION@
-YACC = @YACC@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
diff --git a/lib/Automake/tests/Makefile.in b/lib/Automake/tests/Makefile.in
index 9b2b38c..4b2c57f 100644
--- a/lib/Automake/tests/Makefile.in
+++ b/lib/Automake/tests/Makefile.in
@@ -198,7 +198,6 @@ INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LEX = @LEX@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LN = @LN@
@@ -221,7 +220,6 @@ SHELL = @SHELL@
 STRIP = @STRIP@
 TEX = @TEX@
 VERSION = @VERSION@
-YACC = @YACC@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
diff --git a/lib/Makefile.in b/lib/Makefile.in
index 4d5f77e..d9e41e2 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -155,7 +155,6 @@ INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LEX = @LEX@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LN = @LN@
@@ -178,7 +177,6 @@ SHELL = @SHELL@
 STRIP = @STRIP@
 TEX = @TEX@
 VERSION = @VERSION@
-YACC = @YACC@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
diff --git a/lib/am/Makefile.in b/lib/am/Makefile.in
index 225977f..352c64f 100644
--- a/lib/am/Makefile.in
+++ b/lib/am/Makefile.in
@@ -113,7 +113,6 @@ INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LEX = @LEX@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LN = @LN@
@@ -136,7 +135,6 @@ SHELL = @SHELL@
 STRIP = @STRIP@
 TEX = @TEX@
 VERSION = @VERSION@
-YACC = @YACC@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
diff --git a/m4/Makefile.in b/m4/Makefile.in
index caf019c..cd80415 100644
--- a/m4/Makefile.in
+++ b/m4/Makefile.in
@@ -113,7 +113,6 @@ INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LEX = @LEX@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LN = @LN@
@@ -136,7 +135,6 @@ SHELL = @SHELL@
 STRIP = @STRIP@
 TEX = @TEX@
 VERSION = @VERSION@
-YACC = @YACC@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
diff --git a/tests/Makefile.in b/tests/Makefile.in
index a1cd3e2..046c1c4 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -203,7 +203,6 @@ INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LEX = @LEX@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LN = @LN@
@@ -226,7 +225,6 @@ SHELL = @SHELL@
 STRIP = @STRIP@
 TEX = @TEX@
 VERSION = @VERSION@
-YACC = @YACC@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
-- 
1.7.2.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]