summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-03-30 23:26:32 -0400
committerDave Reisner <dreisner@archlinux.org>2012-04-08 22:28:45 -0400
commit793eff37047dbceedaf3443311bc826566685181 (patch)
treed55886e67e13f347e483d0c30dd005f1aaee1fac
parent7fcb445f35d70d6dd4fa14e9d7b5de35625b0811 (diff)
buildsys: define warning CFLAGS in separate var
Continue the trend of not touching the environment CFLAGS, ensuring that the user always has the final say. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
-rw-r--r--configure.ac6
-rw-r--r--lib/libalpm/Makefile.am2
-rw-r--r--src/pacman/Makefile.am2
-rw-r--r--src/util/Makefile.am2
4 files changed, 6 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index 13dddc61..3c6df0db 100644
--- a/configure.ac
+++ b/configure.ac
@@ -350,10 +350,10 @@ if test "x$debug" = "xyes" ; then
GCC_STACK_PROTECT_LIB
GCC_STACK_PROTECT_CC
GCC_FORTIFY_SOURCE_CC
- CFLAGS="$CFLAGS -g -Wall -Werror"
+ WARNING_CFLAGS="-g -Wall -Werror"
else
AC_MSG_RESULT(no)
- CFLAGS="$CFLAGS -Wall"
+ WARNING_CFLAGS="-Wall"
fi
# Enable or disable use of git version in pacman version string
@@ -424,7 +424,7 @@ ${PACKAGE_NAME}:
compiler : ${CC}
preprocessor flags : ${CPPFLAGS}
- compiler flags : ${CFLAGS}
+ compiler flags : ${WARNING_CFLAGS} ${CFLAGS}
defines : ${DEFS}
library flags : ${LIBS} ${LIBSSL_LIBS} ${LIBARCHIVE_LIBS} ${LIBCURL_LIBS} ${GPGME_LIBS}
linker flags : ${LDFLAGS}
diff --git a/lib/libalpm/Makefile.am b/lib/libalpm/Makefile.am
index 31de62e3..0781d5d8 100644
--- a/lib/libalpm/Makefile.am
+++ b/lib/libalpm/Makefile.am
@@ -10,7 +10,7 @@ DEFS = -DLOCALEDIR=\"@localedir@\" @DEFS@
AM_CPPFLAGS = \
-imacros $(top_builddir)/config.h
-AM_CFLAGS = -pedantic -D_GNU_SOURCE
+AM_CFLAGS = -pedantic -D_GNU_SOURCE $(WARNING_CFLAGS)
if ENABLE_VISIBILITY_CC
if DARWIN
diff --git a/src/pacman/Makefile.am b/src/pacman/Makefile.am
index 9a92fd6b..c8ce9773 100644
--- a/src/pacman/Makefile.am
+++ b/src/pacman/Makefile.am
@@ -21,7 +21,7 @@ AM_CPPFLAGS = \
-imacros $(top_builddir)/config.h \
-I$(top_srcdir)/lib/libalpm
-AM_CFLAGS = -pedantic -D_GNU_SOURCE
+AM_CFLAGS = -pedantic -D_GNU_SOURCE $(WARNING_CFLAGS)
if USE_GIT_VERSION
GIT_VERSION := $(shell sh -c 'git describe --abbrev=4 --dirty | sed s/^v//')
diff --git a/src/util/Makefile.am b/src/util/Makefile.am
index 1465407c..463abf7f 100644
--- a/src/util/Makefile.am
+++ b/src/util/Makefile.am
@@ -17,7 +17,7 @@ AM_CPPFLAGS = \
-imacros $(top_builddir)/config.h \
-I$(top_srcdir)/lib/libalpm
-AM_CFLAGS = -pedantic -D_GNU_SOURCE
+AM_CFLAGS = -pedantic -D_GNU_SOURCE $(WARNING_CFLAGS)
cleanupdelta_SOURCES = cleanupdelta.c
cleanupdelta_LDADD = $(top_builddir)/lib/libalpm/.libs/libalpm.la