From: Max Kellermann Date: Thu, 25 Sep 2008 19:24:57 +0000 (+0200) Subject: Makefile: added "sparse-check" target X-Git-Tag: v0.12_alpha1~142 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f825f27654988e107272c3a408ac5934f7731e34;p=ncmpc.git Makefile: added "sparse-check" target --- diff --git a/Makefile.am b/Makefile.am index 77720dd..3637428 100644 --- a/Makefile.am +++ b/Makefile.am @@ -18,6 +18,8 @@ doc_DATA = \ EXTRA_DIST = \ $(doc_DATA) +sparse-check: + $(MAKE) -C src $@ # # lyrics plugins diff --git a/src/Makefile.am b/src/Makefile.am index 106cd3e..8007996 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