From f825f27654988e107272c3a408ac5934f7731e34 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 25 Sep 2008 21:24:57 +0200 Subject: Makefile: added "sparse-check" target --- src/Makefile.am | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src') diff --git a/src/Makefile.am b/src/Makefile.am index 106cd3e2e..800799613 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -88,3 +88,18 @@ endif ncmpc_SOURCES+=${ncmpc_headers} +# +# sparse +# + +SPARSE = sparse +SPARSE_FLAGS = -Wdecl -Wdefault-bitfield-sign -Wdo-while -Wenum-mismatch \ + -Wnon-pointer-null -Wptr-subtraction-blows -Wreturn-void \ + -Wshadow -Wtypesign \ + -D__transparent_union__=unused + +sparse-check: + for i in $(ncmpc_SOURCES); \ + do \ + $(SPARSE) -I. -I.. -I/usr/lib/gcc/$(shell gcc -dumpmachine)/4.3/include -I/usr/lib/gcc/$(shell gcc -dumpmachine)/4.3/include-fixed $(AM_CPPFLAGS) $(SPARSE_FLAGS) $(srcdir)/$$i || exit; \ + done -- cgit v1.2.3