From f825f27654988e107272c3a408ac5934f7731e34 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 25 Sep 2008 21:24:57 +0200 Subject: [PATCH] Makefile: added "sparse-check" target --- Makefile.am | 2 ++ src/Makefile.am | 15 +++++++++++++++ 2 files changed, 17 insertions(+) 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 -- 2.30.2