Code

Makefile: added "sparse-check" target
authorMax Kellermann <max@duempel.org>
Thu, 25 Sep 2008 19:24:57 +0000 (21:24 +0200)
committerMax Kellermann <max@duempel.org>
Thu, 25 Sep 2008 19:24:57 +0000 (21:24 +0200)
Makefile.am
src/Makefile.am

index 77720dd1a6a7c9b6d1b64ca2741b7afdf1af1a7b..3637428842112342b9d90025d3e012dd0d604fbc 100644 (file)
@@ -18,6 +18,8 @@ doc_DATA = \
 EXTRA_DIST = \
   $(doc_DATA)
 
+sparse-check:
+       $(MAKE) -C src $@
 
 #
 # lyrics plugins
index 106cd3e2eaa0d3ff3d23ca756eeae6bf4db30951..8007996134d0c4b2868bce16530fea5d368d8805 100644 (file)
@@ -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