From 34ca92b99405c5d0361a64a2eb9a70d0f6f0c3cd Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Sat, 29 Jan 2011 19:47:46 +0100 Subject: [PATCH] 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. --- 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 d2c276888..31208ff39 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2011-01-29 Stefano Lattarini + + 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 tests: fix spurious failures in lflags*.test diff --git a/Makefile.in b/Makefile.in index 23ffa2968..25d580d60 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 ffb451474..e0456ffca 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 ddd0af6cc..70b35f9e6 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 8eda666fa..c1739e546 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 a86e8997b..5f051ed57 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 9b2b38cde..4b2c57f22 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 4d5f77efa..d9e41e2d8 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 225977f2a..352c64f41 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 caf019cde..cd80415fb 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 a1cd3e2d4..046c1c422 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@ -- 2.47.2