]> andersk Git - splint.git/blobdiff - src/Makefile
Fixed make file so that pristine gets rid of more generated files.
[splint.git] / src / Makefile
index ced5c724b2acce66c1343056030a03681b2129c2..e3485c7cacb0aa91d39ef37a995d072a17cf95ae 100644 (file)
@@ -47,6 +47,7 @@ include Makefile.sys
 CHECK = 0 ### set to 1
 
 LCLINT = //tmp/lclint-2.5q/bin/lclint
+#LCLINT = ../bin/lclint
 
 ###
 ### source files
@@ -70,8 +71,6 @@ lclint : $(OBJ)
 
 object: $(OBJ)
 
-mylint:
-       CC="$(LCLINT)" ; export CC ; $(MAKE) -e object
 ###
 ### grammars
 ###
@@ -85,7 +84,7 @@ signature.c : signature.c.der signature.y
 ifdef BISON
        @$(BISON) $(YFLAGS) -p lsl signature.y
        @$(CAT) bison.head signature.tab.c > signature.c
-       @$(MV) Headers/signature_gen.h Headers/signature_gen.bak
+       -@$(MV) Headers/signature_gen.h Headers/signature_gen.bak
        @$(CAT) bison.head signature.tab.h > Headers/signature_gen.h
 else
        $(CP) signature.c.der signature.c
@@ -97,7 +96,7 @@ ifdef BISON
        @echo '//           Expect 119 shift/reduce conflicts and 114 reduce/reduce conflicts.'
        @echo '//           (see cgrammar.y for explanation)'
        @$(CAT) bison.head cgrammar.tab.c > cgrammar.c
-       @$(MV) Headers/cgrammar_tokens.h Headers/cgrammar_tokens.bak
+       -@$(MV) Headers/cgrammar_tokens.h Headers/cgrammar_tokens.bak
        @$(CAT) bison.head cgrammar.tab.h > Headers/cgrammar_tokens.h
 else
        $(CP) cgrammar.c.der cgrammar.c
@@ -110,9 +109,9 @@ ifdef BISON
        $(BISON) $(YFLAGS) -p yl llgrammar.y
        @echo '//            Expect 2 shift/reduce conflicts.'
        @$(CAT) bison.head llgrammar.tab.c > llgrammar.c
-       @$(MV) Headers/llgrammar_gen2.h Headers/llgrammar_gen2.bak
+       -@$(MV) Headers/llgrammar_gen2.h Headers/llgrammar_gen2.bak
        @$(CAT) bison.head llgrammar.tab.h > Headers/llgrammar_gen2.h
-       @$(MV) Headers/llgrammar_gen.h Headers/llgrammar_gen.bak
+       -@$(MV) Headers/llgrammar_gen.h Headers/llgrammar_gen.bak
        @$(CAT) bison.head llgrammar.tab.h > Headers/llgrammar_gen.h
 else
        $(CP) llgrammar.c.der llgrammar.c
@@ -148,6 +147,7 @@ cscanner.o : cscanner.c
 
 Headers/signature2.h : signature.c
 Headers/cgrammar2.h : cgrammar.c
+Headers/cgrammar_tokens.h : cgrammar.c
 Headers/llgrammar.h : llgrammar.c
 
 ###
@@ -160,6 +160,10 @@ SINGLEFLAGS = +neverinclude -supcounts +partial -showsummary -load lclint.lcd
 .c.check: lclint.lcd lclint
        $(LCLINT) $(LINTFLAGS) $(SINGLEFLAGS) $*.c
 
+lcllib.c: Headers/llgrammar.h
+clabstract.c: Headers/cgrammar_tokens.h 
+scan.c: Headers/signature2.h 
+
 .c.o:
 ifeq ($(CHECK), 1)
        $(LCLINT) $(LINTFLAGS) $(SINGLEFLAGS) $*.c
@@ -252,6 +256,8 @@ endif
        @echo '//  Done Release '`cat $(VERSION_NUMBER)`
 
 
+Headers/flag_codes.h: flags
+
 flags: flags.def
        grep "FLG_" flags.def > Headers/flag_codes.gen
 
@@ -269,6 +275,12 @@ flags: flags.def
 
 pristine: clean
        -$(RM) -f *.lcs *.lslo
+       -$(RM)  signature.c signature.tab.c  signature.tab.h
+       -$(RM)  llgrammar.c llgrammar.tab.c llgrammar.tab.h
+       -$(RM)  Headers/cgrammar_tokens.h
+       -$(RM)  lex.yy.c
+       -$(RM)  cgrammar.tab.h
+       -$(RM)  Headers/*_gen.h* Headers/*_gen2.h*
 
 clean: tidy
        -$(RM) core lclint 
@@ -312,10 +324,15 @@ $(CHECKS): lclint.lcd
 ### other flags are in .lclintrc file
 ### 
 
-lint: 
-       $(LCLINT) -f lclint.lclintrc $(CPPFLAGS) +singleinclude -nestcomments -mustfree -namechecks -abstract -boolops -protoparammatch -unqualifiedtrans -dependenttrans $(ALLSRC) -dump lclint
+#lint: 
+#      $(LCLINT) -f lclint.lclintrc $(CPPFLAGS) +forcehints +singleinclude -nestcomments -fcnuse -allimponly -modglobsnomods -uniondef -exportlocal -exportheader -abstract -namechecks -protoparammatch -boolops $(ALLSRC) -dump  lclint
 
+lint: 
+       $(LCLINT) -f lclint.lclintrc $(CPPFLAGS) +forcehints +singleinclude -nestcomments -fcnuse -uniondef +allimponly -branchstate -exportlocal -exportheader -abstract -namechecks -protoparammatch -temptrans -boolops $(ALLSRC) -dump  lclint
 
 
+myall:
+       -$(RM) -f ../bin/lclint; \
+       gmake -C ..
 
 
This page took 0.604349 seconds and 4 git commands to generate.