From: Andy Lester Date: Sun, 2 Jul 2006 12:19:08 +0000 (-0500) Subject: Makefile splint support X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=abcf5adaceac1bafa95366e633b9de5667a997e3;p=p5sagit%2Fp5-mst-13.2.git Makefile splint support Message-ID: <20060702171908.GA20443@petdance.com> p4raw-id: //depot/perl@28471 --- diff --git a/Makefile.SH b/Makefile.SH index 1ae0471..ea9c636 100644 --- a/Makefile.SH +++ b/Makefile.SH @@ -389,12 +389,13 @@ lintflags = \ -erroff=E_BAD_SIGN_EXTEND \ -erroff=E_BLOCK_DECL_UNUSED \ -erroff=E_CASE_FALLTHRU \ + -erroff=E_CONST_EXPR \ -erroff=E_CONSTANT_CONDITION \ + -erroff=E_END_OF_LOOP_CODE_NOT_REACHED \ -erroff=E_EQUALITY_NOT_ASSIGNMENT \ -erroff=E_EXPR_NULL_EFFECT \ -erroff=E_FALSE_LOGICAL_EXPR \ -erroff=E_INCL_NUSD \ - -erroff=E_INDISTING_FROM_TRUNC \ -erroff=E_LOOP_EMPTY \ -erroff=E_MAIN_PARAM \ -erroff=E_POINTER_TO_OBJECT \ @@ -403,6 +404,32 @@ lintflags = \ -erroff=E_STATIC_UNUSED \ -erroff=E_TRUE_LOGICAL_EXPR +splintflags = \ + -I/usr/lib/gcc/i486-linux-gnu/4.0.2/include/ \ + -D__builtin_va_list=va_list \ + -Dsigjmp_buf=jmp_buf \ + -warnposix \ + \ + +boolint \ + +charintliteral \ + -fixedformalarray \ + -mustfreefresh \ + -nestedextern \ + -predboolint \ + -predboolothers \ + -preproc \ + -boolops \ + -shadow \ + -nullstate \ + +longintegral \ + +matchanyintegral \ + -type \ + \ + +line-len 999 \ + +weak + +splintfiles = $(c1) + .c$(OBJ_EXT): $(CCCMD) $(PLDLFLAGS) $*.c @@ -1104,6 +1131,10 @@ lint: $(c) rm -f *.ln lint $(lintflags) -DPERL_CORE -D_REENTRANT -DDEBUGGING -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(c) +.PHONY: splint +splint: $(c) + splint $(splintflags) -DPERL_CORE -D_REENTRANT -DDEBUGGING -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(splintfiles) + # Need to unset during recursion to go out of loop. # The README below ensures that the dependency list is never empty and # that when MAKEDEPEND is empty $(FIRSTMAKEFILE) doesn't need rebuilding. @@ -1344,7 +1375,7 @@ tags: TAGS perl emacs/e2ctags.pl TAGS > tags ctags: - ctags -f Tags -N --totals --languages=c --langmap=c:+.h *.c *.h + ctags -f Tags -N --totals --languages=c --langmap=c:+.h --exclude=opmini.c *.c *.h # AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE # If this runs make out of memory, delete /usr/include lines.