[Top][All Lists]

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

[PATCH 2/5] tests: we might need to find gnulib headers

From: Akim Demaille
Subject: [PATCH 2/5] tests: we might need to find gnulib headers
Date: Tue, 8 May 2018 17:02:29 +0200

    315. testing Calculator  ...
    ++ cat
    ++ test x = x1
    ++ set +x
    bison/tests/ bison -fno-caret -o calc.c calc.y
    ++ bison -fno-caret -o calc.c calc.y
    ++ set +x
    bison/tests/ $BISON_C_WORKS
    ++ set +x
    bison/tests/ $CC $CFLAGS $CPPFLAGS $LDFLAGS -o calc calc.c $LIBS
    ++ ccache clang-mp-6.0 -Qunused-arguments -O3 -g -Wall -Wextra 
-Wno-sign-compare -Wcast-align -Wdocumentation -Wformat -Wpointer-arith 
-Wwrite-strings -Wbad-function-cast -Wshadow -Wstrict-prototypes 
-Wmissing-declarations -Wmissing-prototypes -Wmissing-declarations 
-Wmissing-prototypes -Wundef -pedantic -Wsign-compare -fno-color-diagnostics 
-Wno-keyword-macro -Werror -Ibison/_build/6s/lib -DNDEBUG -isystem 
/opt/local/include -I/opt/local/include -L/opt/local/lib -o calc calc.c 
bison/_build/6s/lib/libbison.a -lintl -Wl,-framework -Wl,CoreFoundation
    In file included from calc.y:198:
    bison/_build/6s/lib/unistd.h:592:11: fatal error: 'getopt-pfx-core.h' file 
not found
    # include <getopt-pfx-core.h>
    1 error generated.
    bison/tests/ exit code was 1, expected 0
    315. 315. Calculator  ( FAILED (

* tests/ (CPPFLAGS): Find gnulib's headers.
 tests/ | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/ b/tests/
index 406f72d5..7b2b916a 100644
--- a/tests/
+++ b/tests/
@@ -16,8 +16,8 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <>.
-# We need 'config.h'.
-CPPFLAGS="-I$abs_top_builddir/lib @CPPFLAGS@"
+# We need 'config.h' (builddir/lib), and the gnulib headers (srcdir/lib).
+CPPFLAGS="-I$abs_top_srcdir/lib -I$abs_top_builddir/lib @CPPFLAGS@"
 # Don't just check if $POSIXLY_CORRECT is set, as Bash, when launched
 # as /bin/sh, sets the shell variable POSIXLY_CORRECT to y, but not

reply via email to

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