[ostree] Switch to using explicit WARN_CFLAGS
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] Switch to using explicit WARN_CFLAGS
- Date: Fri, 11 Nov 2011 11:55:36 +0000 (UTC)
commit f5cf1a54de72721c972a930d7523a755b2c115dd
Author: Colin Walters <walters verbum org>
Date: Fri Nov 11 06:53:44 2011 -0500
Switch to using explicit WARN_CFLAGS
The rationale is documented well in the automake manual.
Makefile-libostree.am | 2 +-
Makefile-ostree.am | 2 +-
Makefile-otutil.am | 2 +-
Makefile.am | 1 +
configure.ac | 10 ++--------
5 files changed, 6 insertions(+), 11 deletions(-)
---
diff --git a/Makefile-libostree.am b/Makefile-libostree.am
index 7f86e74..84737a7 100644
--- a/Makefile-libostree.am
+++ b/Makefile-libostree.am
@@ -31,5 +31,5 @@ libostree_la_SOURCES = libostree/ostree.h \
libostree/ostree-checkout.c \
libostree/ostree-checkout.h \
$(NULL)
-libostree_la_CFLAGS = -I$(srcdir)/libotutil -I$(srcdir)/libostree -DLOCALEDIR=\"$(datadir)/locale\" $(OT_COREBIN_DEP_CFLAGS)
+libostree_la_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/libotutil -I$(srcdir)/libostree -DLOCALEDIR=\"$(datadir)/locale\" $(OT_COREBIN_DEP_CFLAGS)
libostree_la_LIBADD = libotutil.la $(OT_COREBIN_DEP_LIBS)
diff --git a/Makefile-ostree.am b/Makefile-ostree.am
index 714c484..dfc09a0 100644
--- a/Makefile-ostree.am
+++ b/Makefile-ostree.am
@@ -34,5 +34,5 @@ ostree_SOURCES = ostree/main.c \
ostree/ot-builtin-rev-parse.c \
ostree/ot-builtin-show.c \
$(NULL)
-ostree_CFLAGS = -I$(srcdir)/libotutil -I$(srcdir)/libostree -I$(srcdir)/ostree -DLOCALEDIR=\"$(datadir)/locale\" $(OT_COREBIN_DEP_CFLAGS)
+ostree_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/libotutil -I$(srcdir)/libostree -I$(srcdir)/ostree -DLOCALEDIR=\"$(datadir)/locale\" $(OT_COREBIN_DEP_CFLAGS)
ostree_LDADD = libotutil.la libostree.la $(OT_COREBIN_DEP_LIBS)
diff --git a/Makefile-otutil.am b/Makefile-otutil.am
index 44eb65c..ff729bd 100644
--- a/Makefile-otutil.am
+++ b/Makefile-otutil.am
@@ -32,5 +32,5 @@ libotutil_la_SOURCES = \
libotutil/ot-glib-compat.h \
libotutil/otutil.h \
$(NULL)
-libotutil_la_CFLAGS = -I$(srcdir)/libotutil -DLOCALEDIR=\"$(datadir)/locale\" $(GIO_UNIX_CFLAGS)
+libotutil_la_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/libotutil -DLOCALEDIR=\"$(datadir)/locale\" $(GIO_UNIX_CFLAGS)
libotutil_la_LIBADD = $(GIO_UNIX_LIBS)
diff --git a/Makefile.am b/Makefile.am
index fe3684c..917b29d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -17,6 +17,7 @@
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
AM_CPPFLAGS = -DDATADIR='"$(datadir)"' -DLIBEXECDIR='"$(libexecdir)"'
+AM_CFLAGS = $(WARN_CFLAGS)
NULL =
BUILT_SOURCES =
diff --git a/configure.ac b/configure.ac
index 92c06d5..71a9e70 100644
--- a/configure.ac
+++ b/configure.ac
@@ -13,16 +13,10 @@ AM_PROG_CC_C_O
changequote(,)dnl
if test "x$GCC" = "xyes"; then
- case " $CFLAGS " in
- *[\ \ ]-Wall[\ \ ]*) ;;
- *) CFLAGS="$CFLAGS -Wall" ;;
- esac
- case " $CFLAGS " in
- *[\ \ ]-Werror=missing-prototypes[\ \ ]*) ;;
- *) CFLAGS="$CFLAGS -Werror=missing-prototypes" ;;
- esac
+ WARN_CFLAGS="-Wall -Werror=missing-prototypes"
fi
changequote([,])dnl
+AC_SUBST(WARN_CFLAGS)
# Initialize libtool
AC_PROG_LIBTOOL
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]