Fix usage of CFLAGS in contrib/check-hard

* contrib/check-hard: Set CFLAGS per command line instead of using export.

'make distcheck' changes CFLAGS. So using ./configure -C together with
exported CFLAGS fails. Setting CFLAGS per command line works smoothly.
This commit is contained in:
Tim Rühsen 2015-06-14 20:30:07 +02:00
parent c6ac51d5bc
commit 5f0818d9f1
1 changed files with 3 additions and 3 deletions

View File

@ -10,7 +10,7 @@ make -f Makefile distclean 2>/dev/null
# automatically exit on error
set -e
export CFLAGS="-std=c89 -pedantic -O2 -g -Wall -Wextra -Wstrict-prototypes -Wold-style-definition -Wwrite-strings -Wshadow -Wformat -Wformat-security -Wunreachable-code -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition"
CFLAGS="-std=c89 -pedantic -O2 -g -Wall -Wextra -Wstrict-prototypes -Wold-style-definition -Wwrite-strings -Wshadow -Wformat -Wformat-security -Wunreachable-code -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition"
CACHEFILE=$PWD/config_check.cache
@ -31,7 +31,7 @@ for CC in gcc clang; do
for options in "" "--with-ssl=openssl"; do
export DISTCHECK_CONFIGURE_FLAGS="-C --cache-file=$CACHEFILE $options"
echo " ./configure $DISTCHECK_CONFIGURE_FLAGS"
./configure $DISTCHECK_CONFIGURE_FLAGS >/dev/null
./configure $DISTCHECK_CONFIGURE_FLAGS CFLAGS="$CFLAGS" >/dev/null
for xVALGRIND in 0 1; do
for xLCALL in C tr_TR.utf8; do
@ -44,7 +44,7 @@ for CC in gcc clang; do
unset TESTS_ENVIRONMENT
export TESTS_ENVIRONMENT
echo " make distcheck -j$CORES"
make distcheck -j$CORES
make distcheck CFLAGS="$CFLAGS" -j$CORES
done
done