bison-patches
[Top][All Lists]
Advanced

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

tests: allow to override variables with envvars


From: Akim Demaille
Subject: tests: allow to override variables with envvars
Date: Wed, 12 Sep 2018 22:05:36 +0200

To be installed after my proposal for move (to avoid
conflicts in rebase).  Nothing fancy here.

commit 2bbb6d7163b62cace5b6a3a444c527b5e9cb076a
Author: Akim Demaille <address@hidden>
Date:   Tue Sep 11 08:32:12 2018 +0200

    tests: allow to override variables with envvars
    
    * tests/atlocal.in: Allow the user to change interesting variables
    (CFLAGS, CXXFLAGS, etc.).

diff --git a/tests/atlocal.in b/tests/atlocal.in
index c26ed0b5..e706d3a2 100644
--- a/tests/atlocal.in
+++ b/tests/atlocal.in
@@ -36,26 +36,26 @@ fi
 : ${CXX='@CXX@'}
 
 # Is the compiler GCC?
-GCC='@GCC@'
+: ${GCC='@GCC@'}
 
 # Sometimes a test group needs to ignore gcc warnings, so it locally
 # sets CFLAGS to this.
-  NO_WERROR_CFLAGS='@CFLAGS@   @WARN_CFLAGS@   @WARN_CFLAGS_TEST@'
-NO_WERROR_CXXFLAGS='@CXXFLAGS@ @WARN_CXXFLAGS@ @WARN_CXXFLAGS_TEST@'
-WNO_DEPRECATED_CXXFLAGS='@WNO_DEPRECATED_CXXFLAGS@'
+: ${NO_WERROR_CFLAGS='@CFLAGS@  @WARN_CFLAGS@  @WARN_CFLAGS_TEST@'}
+: ${NO_WERROR_CXXFLAGS='@CXXFLAGS@ @WARN_CXXFLAGS@ @WARN_CXXFLAGS_TEST@'}
+: ${WNO_DEPRECATED_CXXFLAGS='@WNO_DEPRECATED_CXXFLAGS@'}
 
 # But most of the time, we want -Werror.
-  CFLAGS="$NO_WERROR_CFLAGS   @WERROR_CFLAGS@"
-CXXFLAGS="$NO_WERROR_CXXFLAGS @WERROR_CXXFLAGS@"
+: ${CFLAGS="$NO_WERROR_CFLAGS  @WERROR_CFLAGS@"}
+: ${CXXFLAGS="$NO_WERROR_CXXFLAGS @WERROR_CXXFLAGS@"}
 
 # If 'exit 77'; skip all C++ tests; otherwise ':'.
-BISON_CXX_WORKS='@BISON_CXX_WORKS@'
+: ${BISON_CXX_WORKS='@BISON_CXX_WORKS@'}
 
 # Compiler flags to disable exception support.
-NO_EXCEPTIONS_CXXFLAGS='@NO_EXCEPTIONS_CXXFLAGS@'
+: ${NO_EXCEPTIONS_CXXFLAGS='@NO_EXCEPTIONS_CXXFLAGS@'}
 
 # Requiring a specific C++ standard.
-CXX11_CXXFLAGS='@CXX11_CXXFLAGS@'
+: ${CXX11_CXXFLAGS='@CXX11_CXXFLAGS@'}
 
 # Be sure that the C++ compiler is not broken because of gnulib.  This
 # cannot be checked in configure (gnulib is not parameterized yet),
@@ -115,10 +115,10 @@ fi
 ## ------- ##
 
 # Empty if no javac was found
-CONF_JAVAC='@CONF_JAVAC@'
+: ${CONF_JAVAC='@CONF_JAVAC@'}
 
 # Empty if no Java VM was found
-CONF_JAVA='@CONF_JAVA@'
+: ${CONF_JAVA='@CONF_JAVA@'}
 
 # We need egrep and perl.
 : ${EGREP='@EGREP@'}
@@ -129,10 +129,10 @@ LC_CTYPE=C
 export LC_CTYPE
 
 # Are special link options needed?
-LDFLAGS='@LDFLAGS@'
+: ${LDFLAGS='@LDFLAGS@'}
 
 # Are special libraries needed?
-LIBS="$abs_top_builddir/lib/libbison.a @LIBS@ @INTLLIBS@"
+: ${LIBS="$abs_top_builddir/lib/libbison.a @LIBS@ @INTLLIBS@"}
 
 # Empty if no xsltproc was found
 : ${XSLTPROC='@XSLTPROC@'}




reply via email to

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