On 02/14/2012 02:14 AM, Peter Rosin wrote:
>
> [SNIP]
>
> I don't get that, because the config.log from the top configure has
>
> LEX='false'
> YACC='false'
> 
> and config.status has
> 
> S["LEX"]="false"
> S["YACC"]="false"
> 
> Question is, when does those false values turn into the lex/yacc defaults?
> 
The attached patch should answer this question, and solve the problem.
OK for the 'yl-work-for-master' branch?

Thanks,
  Stefano
>From b42514b48a5104785737cb4459e177b98d023ed7 Mon Sep 17 00:00:00 2001
Message-Id: <b42514b48a5104785737cb4459e177b98d023ed7.1329210666.git.stefano.lattar...@gmail.com>
From: Stefano Lattarini <stefano.lattar...@gmail.com>
Date: Tue, 14 Feb 2012 10:11:02 +0100
Subject: [PATCH] tests: truly use Lex and Yacc selected by configure

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 |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index cb5c6e0..badf9bb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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])
-- 
1.7.7.3

Reply via email to