diff options
Diffstat (limited to '')
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | src/Makefile.am | 15 |
2 files changed, 17 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am index 77720dd1a..363742884 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 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 |