[PATCH v2 modular 3/3] build.sh: provide a new implementation for the -g option

Gaetan Nadon memsize at videotron.ca
Fri Dec 3 06:41:12 PST 2010


Given that CFLAGS variable is now supported, the -g option
is reimplemented using CFLAGS. The debug options are appended
to CFLAGS, preserving the user's existing options, if any.

The CONFCFLAGS variable is removed. It had not been designed
as a vehicle to forward C flags to module configuration, but
as a -g implementation. A statement such as
export CONFCFLAGS=-"g3 -O0" would fail.

Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
---
 build.sh |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/build.sh b/build.sh
index d804221..6e42f5f 100755
--- a/build.sh
+++ b/build.sh
@@ -23,7 +23,6 @@ global environment variables you may set to augment functionality:
               you have headers in a nonstandard directory <include dir>
   CPP         C preprocessor
   CONFFLAGS:  additional flags to pass to all configure scripts
-  CONFCFLAGS: additional compile flags to pass to all configure scripts
   MAKEFLAGS:  additional flags to pass to all make invocations
   PKG_CONFIG_PATH: include paths in addition to:
                    \$DESTDIR/\$PREFIX/share/pkgconfig
@@ -361,8 +360,7 @@ process() {
 	    ${CPP:+CPP=}${CPP} \
 	    "${CPPFLAGS:+CPPFLAGS=}${CPPFLAGS}" \
 	    "${CFLAGS:+CFLAGS=}${CFLAGS}" \
-	    "${LDFLAGS:+LDFLAGS=}${LDFLAGS}" \
-	    "$CONFCFLAGS"
+	    "${LDFLAGS:+LDFLAGS=}${LDFLAGS}"
 	if [ $? -ne 0 ]; then
 	    failed ${CONFCMD} $1 $2
 	    cd $old_pwd
@@ -1021,9 +1019,7 @@ do
 	DISTCHECK=1
 	;;
     -g)
-	CFLAGS="-g3 -O0"
-	export CFLAGS
-	CONFCFLAGS="CFLAGS=-g3 -O0"
+	CFLAGS="${CFLAGS} -g3 -O0"
 	;;
     -h|--help)
 	usage
-- 
1.6.0.4



More information about the xorg-devel mailing list