[Makefile.am] Run sparse and splint once per source file

Also skip .h files for splint as it causes lots of unused-function warnings.
This commit is contained in:
Behdad Esfahbod 2007-08-23 00:38:00 -04:00
parent 503ab85e44
commit 5594f8b035

View file

@ -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