tests: truly use Lex and Yacc selected by configure
authorStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 14 Feb 2012 09:11:02 +0000 (10:11 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 14 Feb 2012 09:11:02 +0000 (10:11 +0100)
When 'yacc-work' was merged into 'yl-work-for-master' in commit
v1.11-1910-ge6c40d4 (12-02-2012), the values for $YACC and $LEX
stopped being substituted directly by config.status, and started
being substituted by a Makefile rule using the contents of the
$(YACC) and $(LEX) makefile variables.

Unfortunately, our configure.ac was calling AM_SUBST_NOTMAKE on
'YACC' and 'LEX' (see commit v1.11-284-g34ca92b of 29-01-2011,
"tests: don't define YACC and LEX in the Makefiles", for a
rationale), so that the $(YACC) and $(LEX) in the Makefile simply
hold the default make-provided values (that is, "yacc" and "lex"
respectively), independently of what yacc and lex programs were
defined at configure time.

Apart from reducing coverage and creating confusion, this behaviour
also caused spurious failures on systems lacking a yacc and/or lex
programs.

Problem reported by Peter Rosin.  References:
 <http://lists.gnu.org/archive/html/automake-patches/2012-02/msg00131.html>
 <http://lists.gnu.org/archive/html/automake-patches/2012-02/msg00132.html>

* configure.ac (AM_SUBST_NOTMAKE): Don't call anymore on 'YACC' nor
on 'LEX'.

configure.ac

index cb5c6e0..badf9bb 100644 (file)
@@ -125,11 +125,6 @@ AM_RUN_LOG([$TEX --version </dev/null])
 #     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])