From: Jeff Mahoney <jeffm@jeffreymahoney.com>
To: Chris Mason <chris.mason@oracle.com>
Cc: Btrfs Development List <linux-btrfs@vger.kernel.org>
Subject: [patch 2/5] btrfs-progs: Test for sparse support in configure
Date: Fri, 13 Jun 2008 16:09:08 -0400 [thread overview]
Message-ID: <20080613201007.765555685@suse.com> (raw)
In-Reply-To: 20080613200906.180149089@suse.com
This patch moves the sparse defines from Makefile.am to configure.ac
This allows us to enable sparse checking in other directories just
by adding the following to the Makefile.am:
TESTS = $(SOURCES)
TESTS_ENVIRONMENT = @SPARSE@
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
---
Makefile.am | 9 +++------
configure.ac | 8 ++++++++
2 files changed, 11 insertions(+), 6 deletions(-)
--- a/Makefile.am
+++ b/Makefile.am
@@ -26,10 +26,7 @@ PROGS_SRCS = $(COMMON_SOURCES) btrfsctl.
btrfsck.c bit-radix.c mkfs.c debug-tree.c dir-test.c \
quick-test.c convert.c
-CHECKFLAGS=-Wbitwise -Wuninitialized -Wshadow -Wundef
-SPARSE = sparse
-
+if HAVE_SPARSE
TESTS = $(PROGS_SRCS)
-TESTS_ENVIRONMENT = \
- $(SPARSE) $(CHECKFLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) -include $(top_builddir)/predef.h
+TESTS_ENVIRONMENT = @SPARSE@
+endif
--- a/configure.ac
+++ b/configure.ac
@@ -38,4 +38,12 @@ fi
PREDEFINED_MACROS=$(echo | gcc -dM -E - )
AC_SUBST(PREDEFINED_MACROS)
+AC_CHECK_PROG(sparse, sparse, yes)
+
+AM_CONDITIONAL(HAVE_SPARSE, test "$sparse" = "yes")
+CHECKFLAGS="-Wbitwise -Wuninitialized -Wshadow -Wundef"
+SPARSE='sparse $(CHECKFLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) \
+ -include $(top_builddir)/predef.h'
+AC_SUBST(SPARSE)
AC_OUTPUT(Makefile predef.h)
next prev parent reply other threads:[~2008-06-13 20:09 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-13 20:09 [patch 0/5] btrfs-progs: Create libbtrfs and package it up Jeff Mahoney
2008-06-13 20:09 ` [patch 1/5] btrfs-progs: convert to autotools Jeff Mahoney
2008-06-14 2:09 ` Miguel Sousa Filipe
2008-06-14 5:22 ` Jeff Mahoney
2008-06-14 6:10 ` Dongjun Shin
2008-06-14 6:38 ` Joe Peterson
2008-06-13 20:09 ` Jeff Mahoney [this message]
2008-06-13 20:09 ` [patch 3/5] btrfs-progs: Restructure code layout, create libbtrfs Jeff Mahoney
2008-06-13 20:09 ` [patch 4/5] btrfs-progs: Add RPM spec file support Jeff Mahoney
2008-06-13 20:09 ` [patch 5/5] btrfs-progs: Script to restructure the source as needed by patch 3 Jeff Mahoney
2008-06-13 20:29 ` [patch 0/5] btrfs-progs: Create libbtrfs and package it up Christoph Hellwig
2008-06-13 17:17 ` Jeff Mahoney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080613201007.765555685@suse.com \
--to=jeffm@jeffreymahoney.com \
--cc=chris.mason@oracle.com \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.