Update of /cvsroot/pclasses/pclasses2/toc/tests
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8008/toc/tests
Modified Files:
gnu_cpp_tools.sh user_is_stephan_beal.sh
Log Message:
Mass commit: a number of tweaks vis-a-vis CXXFLAGS and friends.
Index: user_is_stephan_beal.sh
===================================================================
RCS file: /cvsroot/pclasses/pclasses2/toc/tests/user_is_stephan_beal.sh,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- user_is_stephan_beal.sh 22 Dec 2004 19:04:25 -0000 1.1
+++ user_is_stephan_beal.sh 30 Dec 2004 15:30:42 -0000 1.2
@@ -7,14 +7,14 @@
got=0
for h in cheyenne ludo jareth hoggle owl; do
- test x$h = "x${HOSTNAME}" && got=1
+ test x$h = "x${HOSTNAME}" && { got=1; break; }
done
test $got = 0 && return 1
echo "Setting up stephan's always-used settings..."
-{ # for gnu_cpp_tools:
+{ # for gnu_cpp_tools toc test:
echo "Enabling debug/werror/wall."
export configure_enable_debug=1
export configure_enable_werror=1
Index: gnu_cpp_tools.sh
===================================================================
RCS file: /cvsroot/pclasses/pclasses2/toc/tests/gnu_cpp_tools.sh,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- gnu_cpp_tools.sh 22 Dec 2004 19:04:25 -0000 1.1
+++ gnu_cpp_tools.sh 30 Dec 2004 15:30:42 -0000 1.2
@@ -17,7 +17,6 @@
# - STRIP /path/to/strip (optional component)
# - INCLUDES probably empty
# - CPPFLAGS probably empty
-# - OPT -g or -O2 (or some other value specified by --enable-debug)
# - CFLAGS_OPT same as OPT (prefered for naming's sake)
# - WARN -Wall (or some other value specified by --enable-warn or --enable-werror)
# - CFLAGS probably empty (or maybe -pipe)
@@ -27,6 +26,10 @@
CC=
+: ${configure_enable_debug=0}
+: ${configure_enable_warn=0}
+: ${configure_enable_werror=0}
+
for foo in \
ar-AR gcc-CC g++-CXX ld-LD ldd-LDD \
; do
@@ -45,51 +48,50 @@
key=${foo%%-*}
var=${foo##*-}
toc_find $key
- toc_add_make $var="${TOC_FIND_RESULT}"
+ toc_export $var="${TOC_FIND_RESULT}"
done
-toc_add_make INCLUDES="$INCLUDES"
-toc_add_make CPPFLAGS="$CPPFLAGS"
-if test "$configure_enable_debug" = 1; then
- OPT="-g $OPT"
-elif test "${configure_enable_debug:-0}" = 0; then
+toc_export INCLUDES="$INCLUDES"
+toc_export CPPFLAGS="$CPPFLAGS"
+if test "x${configure_enable_debug}" = x1; then
+ CFLAGS_OPT="-g -DDEBUG -D_DEBUG $CFLAGS_OPT"
+elif test "x${configure_enable_debug}" = x0; then
# What's a sensible default here? -O2? Put it first in the hopes
- # that any values already in $OPT will take precedence.
- OPT="-O2 $OPT -DNDEBUG=1"
+ # that any values already in $CFLAGS_OPT will take precedence.
+ CFLAGS_OPT="-O2 $CFLAGS_OPT -DNDEBUG"
else
# They specified some flags.
- OPT="$configure_enable_debug"
+ CFLAGS_OPT="$configure_enable_debug"
fi
-toc_add_make OPT="$OPT"
-toc_add_make CFLAGS_OPT="$OPT"
+toc_export CFLAGS_OPT="$CFLAGS_OPT"
-if test "$configure_enable_warn" = 1; then
+if test "x${configure_enable_warn}" = x1; then
WARN="-Wall $WARN"
-elif test "${configure_enable_warn:-0}" = 0; then
+elif test "x${configure_enable_warn}" = x0; then
WARN=
else
# They specified some flags.
WARN="$configure_enable_warn"
fi
-if test "x$configure_enable_werror" != x0; then
- if test "x$configure_enable_werror" = x1; then
+if test "x${configure_enable_werror}" != x0; then
+ if test "x${configure_enable_werror}" = x1; then
WARN="-Wall -Werror $WARN"
else
- WARN="$WARN $configure_enable_werror"
+ WARN="$WARN ${configure_enable_werror}"
fi
fi
-toc_add_make WARN="$WARN"
+toc_export WARN="$WARN"
# Presumably we could determine whether -pipe works instead of assuming
# it does...
-CFLAGS="-pipe $CFLAGS"
-CXXFLAGS="-pipe $CXXFLAGS"
-toc_add_make CFLAGS="$CFLAGS"
-toc_add_make CXXFLAGS="$CXXFLAGS"
-toc_add_make LDFLAGS="$LDFLAGS"
+CFLAGS="-pipe $CFLAGS ${WARN} ${CFLAGS_OPT}"
+CXXFLAGS="-pipe $CXXFLAGS ${WARN} ${CFLAGS_OPT}"
+toc_export CFLAGS="$CFLAGS"
+toc_export CXXFLAGS="$CXXFLAGS"
+toc_export LDFLAGS="$LDFLAGS"
|