This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
More SvPV consting
[perl5.git] / Makefile.SH
index 70c3d6c..a6034ab 100644 (file)
@@ -354,7 +354,31 @@ obj3 = doop$(OBJ_EXT) doio$(OBJ_EXT) regexec$(OBJ_EXT) utf8$(OBJ_EXT) taint$(OBJ
 
 obj = $(obj1) $(obj2) $(obj3) $(ARCHOBJS)
 
-lintflags = -hbvxac
+lintflags = \
+    -bhn \
+    -p \
+    -s \
+    -Ncheck=%all \
+    -Nlevel=4 \
+    -errfmt=src \
+    -errtags \
+    -erroff=E_BAD_PTR_CAST \
+    -erroff=E_BLOCK_DECL_UNUSED \
+    -erroff=E_CONSTANT_CONDITION \
+    -erroff=E_BAD_PTR_CAST_ALIGN \
+    -erroff=E_PTRDIFF_OVERFLOW \
+    -erroff=E_EXPR_NULL_EFFECT \
+    -erroff=E_BAD_PTR_INT_COMBINATION \
+    -erroff=E_LOOP_EMPTY \
+    -erroff=E_TRUE_LOGICAL_EXPR \
+    -erroff=E_FALSE_LOGICAL_EXPR \
+    -erroff=E_INDISTING_FROM_TRUNC \
+    -erroff=E_POINTER_TO_OBJECT \
+    -erroff=E_ASSIGN_NARROW_CONV \
+    -erroff=E_BAD_SIGN_EXTEND \
+    -erroff=E_INCL_NUSD \
+    -erroff=E_MAIN_PARAM \
+    -Wfoo.flow
 
 .c$(OBJ_EXT):
        $(CCCMD) $(PLDLFLAGS) $*.c
@@ -634,7 +658,7 @@ perl.valgrind.config: config.sh
 perl.config.dashg:
        @echo "Checking optimize='-g' in config.sh..."
        @grep "^optimize="     config.sh
-       @grep "^optimize='-g'" config.sh >/dev/null || exit 1
+       @egrep "^optimize='(-g|.*-g[1-3].*)'" config.sh >/dev/null || exit 1
 
 perl.third.config: config.sh
        @echo "To build perl.third you must Configure -Doptimize=-g -Uusemymalloc, checking..."
@@ -752,7 +776,6 @@ $(CONFIGPM): config.sh miniperl$(EXE_EXT) configpm Porting/Glossary
 lib/ExtUtils/Miniperl.pm: miniperlmain.c miniperl$(EXE_EXT) minimod.pl $(CONFIGPM)
        $(LDLIBPTH) ./miniperl minimod.pl > minimod.tmp
        sh mv-if-diff minimod.tmp $@
-       -touch lib/ExtUtils/Miniperl.pm
 
 lib/re.pm: ext/re/re.pm
        cp ext/re/re.pm ext/re/re.tmp && sh mv-if-diff ext/re/re.tmp lib/re.pm
@@ -1017,6 +1040,9 @@ _cleaner2:
        rm -f preload
        rm -f testcompile compilelog
        rm -rf lib/Encode
+       rm -f lib/ExtUtils/ParseXS/t/XSTest.c
+       rm -f lib/ExtUtils/ParseXS/t/XSTest$(OBJ_EXT)
+       rm -f lib/ExtUtils/ParseXS/t/XSTest$(DLSUFFIX)
        -rmdir lib/B lib/Data
        -rmdir lib/Filter/Util lib/IO/Socket lib/IO
        -rmdir lib/List lib/MIME lib/Scalar lib/Sys 
@@ -1031,14 +1057,10 @@ _verycleaner:
        @$(LDLIBPTH) $(MAKE) _cleaner2
        -rm -f *~ *.orig */*~ */*.orig */*/*~ */*/*.orig
 
-# The following lint has practically everything turned on.  Unfortunately,
-# you have to wade through a lot of mumbo jumbo that can't be suppressed.
-# If the source file has a /*NOSTRICT*/ somewhere, ignore the lint message
-# for that spot.
-
 .PHONY: lint
 lint: $(c)
-       lint $(lintflags) $(defs) perly.c $(c) > perl.fuzz
+       rm -f *.ln
+       lint $(lintflags) -DPERL_CORE -D_REENTRANT -DDEBUGGING -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(c)
 
 # Need to unset during recursion to go out of loop.
 # The README below ensures that the dependency list is never empty and
@@ -1273,14 +1295,15 @@ etags:  TAGS
 TAGS: emacs/cperl-mode.elc
        sh emacs/ptags
 
-ctags: tags
-
 # Let's hope make will not go into an infinite loop on case-unsensitive systems
 # This may also fail if . is in the head of the path, since perl will
 # require -Ilib
 tags:  TAGS
        perl emacs/e2ctags.pl TAGS > tags
 
+ctags:
+       ctags -f Tags -N --totals --languages=c --langmap=c:+.h *.c *.h
+
 # AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE
 # If this runs make out of memory, delete /usr/include lines.
 !NO!SUBS!
@@ -1354,3 +1377,4 @@ esac
     ;;
 esac
 
+# ex: set ts=8 sts=4 sw=4 noet: