[pacman-dev] [PATCH 07/11] buildsys: define warning CFLAGS in separate var
Dave Reisner
dreisner at archlinux.org
Mon Apr 2 17:15:52 EDT 2012
Continue the trend of not touching the environment CFLAGS, ensuring that
the user always has the final say.
Signed-off-by: Dave Reisner <dreisner at archlinux.org>
---
configure.ac | 4 ++--
lib/libalpm/Makefile.am | 2 +-
src/pacman/Makefile.am | 2 +-
src/util/Makefile.am | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/configure.ac b/configure.ac
index 7590d9d..9725ba0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -346,10 +346,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
diff --git a/lib/libalpm/Makefile.am b/lib/libalpm/Makefile.am
index c316fca..672a7a5 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 9a92fd6..c8ce977 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 1465407..463abf7 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
--
1.7.9.5
More information about the pacman-dev
mailing list