automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, yacc-work, updated. v1.11-2


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, yacc-work, updated. v1.11-277-gd86a273
Date: Sun, 23 Jan 2011 11:37:04 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".

http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=d86a273998952c09a569121c252512556b00d985

The branch, yacc-work has been updated
       via  d86a273998952c09a569121c252512556b00d985 (commit)
      from  0283a956cd5f0a4522e2c3f1fa7155944464348e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit d86a273998952c09a569121c252512556b00d985
Author: Stefano Lattarini <address@hidden>
Date:   Sat Jan 22 21:11:06 2011 +0100

    configure: look for a yacc program to be used by the testsuite
    
    Instead of forcing the user to manually export 'YACC' in the
    testsuite to use a non-bison yacc, we now look for a yacc program
    at configure time, and use that as the default in the testsuite.
    
    * configure.ac: Look for a yacc program, using AC_CHECK_PROGS.
    * tests/defs.in: Updated to use the value of $YACC precomputed by
    configure, unless the user overrides that in the environment.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                      |   10 +++++++
 Makefile.in                    |    1 +
 configure                      |   52 ++++++++++++++++++++++++++++++++++++++++
 configure.ac                   |   12 ++++++++-
 doc/Makefile.in                |    1 +
 lib/Automake/Makefile.in       |    1 +
 lib/Automake/tests/Makefile.in |    1 +
 lib/Makefile.in                |    1 +
 lib/am/Makefile.in             |    1 +
 m4/Makefile.in                 |    1 +
 tests/Makefile.in              |    1 +
 tests/defs.in                  |   18 +++++--------
 12 files changed, 88 insertions(+), 12 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 331246c..4470c28 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 2011-01-22   Stefano Lattarini  <address@hidden>
 
+       configure: look for a yacc program to be used by the testsuite
+       Instead of forcing the user to manually export 'YACC' in the
+       testsuite to use a non-bison yacc, we now look for a yacc program
+       at configure time, and use that as the default in the testsuite.
+       * configure.ac: Look for a yacc program, using AC_CHECK_PROGS.
+       * tests/defs.in: Updated to use the value of $YACC precomputed by
+       configure, unless the user overrides that in the environment.
+
+2011-01-22   Stefano Lattarini  <address@hidden>
+
        tests: more coverage on yacc/lex silent-rules, plus minor cleanups
        * tests/silent-yacc-gcc.test: Add sanity checks verifying that the
        generated Makefile.in files really contains the non-generic rules
diff --git a/Makefile.in b/Makefile.in
index 25d580d..dd2b085 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -188,6 +188,7 @@ 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 5af3df8..789a8d3 100755
--- a/configure
+++ b/configure
@@ -575,6 +575,7 @@ GREP
 MODIFICATION_DELAY
 LN
 HELP2MAN
+YACC
 TEX
 PERL_THREADS
 PERL
@@ -2404,6 +2405,57 @@ fi
 
 
 
+# The test suite will skip some tests if no yacc program is available.
+# We don't use AC_PROG_YACC because:
+#  1. we don't want bison to be preferred to system yacc;
+#  2. we don't want $YACC to be defined to 'yacc' by default;
+#  3. we prefer not to have the YFLAGS variable to be AC_SUBST'd,
+#  4. we prefer that the YACC variable is not reported in the
+#     configure help screen.
+for ac_prog in yacc byacc 'bison -y'
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with 
args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_YACC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$YACC"; then
+  ac_cv_prog_YACC="$YACC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x 
"$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_YACC="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" 
>&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+YACC=$ac_cv_prog_YACC
+if test -n "$YACC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
+$as_echo "$YACC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$YACC" && break
+done
+test -n "$YACC" || YACC="false"
+
+
 # Generate man pages.
 
 HELP2MAN=${HELP2MAN-"${am_missing_run}help2man"}
diff --git a/configure.ac b/configure.ac
index de4583d..343bca5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,8 @@
 # Process this file with autoconf to produce a configure script.
 
 # Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-# 2004, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+# 2004, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
+# Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -93,6 +94,15 @@ AC_SUBST([PERL_THREADS])
 # The test suite will skip some tests if tex is absent.
 AC_CHECK_PROG([TEX], [tex], [tex])
 
+# The test suite will skip some tests if no yacc program is available.
+# We don't use AC_PROG_YACC because:
+#  1. we don't want bison to be preferred to system yacc;
+#  2. we don't want $YACC to be defined to 'yacc' by default;
+#  3. we prefer not to have the YFLAGS variable to be AC_SUBST'd,
+#  4. we prefer that the YACC variable is not reported in the
+#     configure help screen.
+AC_CHECK_PROGS([YACC], [yacc byacc 'bison -y'], [false])
+
 # Generate man pages.
 AM_MISSING_PROG([HELP2MAN], [help2man])
 
diff --git a/doc/Makefile.in b/doc/Makefile.in
index c1739e5..a3cfbba 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -155,6 +155,7 @@ 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 5f051ed..dd331fe 100644
--- a/lib/Automake/Makefile.in
+++ b/lib/Automake/Makefile.in
@@ -175,6 +175,7 @@ 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 4b2c57f..80427fb 100644
--- a/lib/Automake/tests/Makefile.in
+++ b/lib/Automake/tests/Makefile.in
@@ -220,6 +220,7 @@ 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 d9e41e2..63edec9 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -177,6 +177,7 @@ 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 352c64f..e24400b 100644
--- a/lib/am/Makefile.in
+++ b/lib/am/Makefile.in
@@ -135,6 +135,7 @@ 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 cd80415..baaf548 100644
--- a/m4/Makefile.in
+++ b/m4/Makefile.in
@@ -135,6 +135,7 @@ 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 5eedb76..25fc4a8 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -225,6 +225,7 @@ 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/defs.in b/tests/defs.in
index dfb5f2e..cfa9fd3 100644
--- a/tests/defs.in
+++ b/tests/defs.in
@@ -62,6 +62,7 @@ SHELL='@SHELL@'
 export SHELL
 # User can override various tools used.
 test -z "$PERL" && PERL='@PERL@'
+test -z "$YACC" && YACC='@YACC@'
 test -z "$MAKE" && MAKE=make
 test -z "$AUTOCONF" && AUTOCONF="@am_AUTOCONF@"
 test -z "$AUTOHEADER" && AUTOHEADER="@am_AUTOHEADER@"
@@ -210,19 +211,14 @@ do
       ( texi2dvi -o /dev/null --version ) || exit 77
       ;;
     yacc)
-      if test x"$YACC" = x"no"; then
-        # The user has explicitly told he doesn't want a yacc program
-        # to be used.
-        echo "$me: \$YACC is \"no\", skipping test" >&2
+      if test x"$YACC" = x"false"; then
+        # No yacc program was found at configure time, or the user has
+        # explicitly told he doesn't want a yacc program to be used.
+        echo "$me: \$YACC is \"false\", skipping test" >&2
         exit 77
-      elif test -z "$YACC"; then
-        # The user hasn't explicitly specified any yacc program in the
-        # environment, so we try to use bison, skipping the test if it's
-        # not found.
-        YACC='bison -y'
+      else
+        # Make YACC available to configure by exporting it.
         export YACC
-        echo "$me: running bison --version"
-        bison --version || exit 77
       fi
       ;;
     # Generic case: the tool must support --version.


hooks/post-receive
-- 
GNU Automake



reply via email to

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