summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2007-08-23 00:38:00 -0400
committerBehdad Esfahbod <behdad@behdad.org>2007-08-23 14:00:12 -0400
commit5594f8b0356fc209749d01e2043559fccd3966d0 (patch)
treeb41449ae86a9215c675851b8e201f1c106e5b93e
parent503ab85e44bfa02ef8391f7849826cbe07ff15d2 (diff)
[Makefile.am] Run sparse and splint once per source file
Also skip .h files for splint as it causes lots of unused-function warnings.
-rw-r--r--src/Makefile.am13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 082ce9335..5cd368bca 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -311,8 +311,17 @@ TESTS_ENVIRONMENT = srcdir="$(srcdir)"
TESTS = check-def.sh check-plt.sh check-headers.sh check-cairoint.sh
EXTRA_DIST += $(TESTS)
+SPARSE = sparse
sparse:
- sparse -I$(top_builddir) $(libcairo_la_CFLAGS) -DHAVE_CONFIG_H $(libcairo_la_base_sources)
+ @status=true; for f in $(libcairo_la_base_sources); do \
+ echo sparse $$f; \
+ $(SPARSE) -I$(top_builddir) $(libcairo_la_CFLAGS) -DHAVE_CONFIG_H $$f || status=false; \
+ done; $$status
+SPLINT = splint -badflag
splint:
- splint -badflag -I$(top_builddir) $(libcairo_la_CFLAGS) -DHAVE_CONFIG_H $(libcairo_la_base_sources)
+ @status=true; for f in $(libcairo_la_base_sources); do \
+ test "$$f" = "`echo "$$f" | sed 's/[.]h$$//'`" || continue; \
+ echo sparse $$f; \
+ $(SPLINT) -I$(top_builddir) $(libcairo_la_CFLAGS) -DHAVE_CONFIG_H $$f || status=false; \
+ done; $$status