From 5594f8b0356fc209749d01e2043559fccd3966d0 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 23 Aug 2007 00:38:00 -0400 Subject: [PATCH] [Makefile.am] Run sparse and splint once per source file Also skip .h files for splint as it causes lots of unused-function warnings. --- src/Makefile.am | 13 +++++++++++-- 1 file 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