]> andersk Git - splint.git/blobdiff - src/Makefile.am
Cleaned up flags to generate manual help.
[splint.git] / src / Makefile.am
index 38f7f50f3086b9b9b272b800a75022f619e14cfa..bad7f0534fcb78f105e45129682a43e5fb12350a 100644 (file)
@@ -4,18 +4,20 @@ AUTOMAKE_OPTIONS = 1.5 foreign
 
 SUFFIXES = .h .c .o .l .check
 
-# Check files before compiling; requires lclint!
+# Check files before compiling; requires splint!
 CHECK = 1
 
 # Some preferences
-YFLAGS = -v -t -d --debug
-
+### We use the no-lines option to prevent confusion with splint flag settings.
+### Should fix splint to avoid this...
+YFLAGS = -v -t -d --debug --no-lines
+LFLAGS = -L
 
 BISON_SRC = cgrammar.y  llgrammar.y  mtgrammar.y  signature.y
 
 
-## We only build LCLint
-bin_PROGRAMS = lclint
+## We only build Splint
+bin_PROGRAMS = splint
 
 ## This is a fake program, so we can easily substitute in the extra LCL objects
 EXTRA_PROGRAMS = lcl
@@ -40,12 +42,12 @@ CSRC = uentry.c cprim.c macrocache.c qual.c qtype.c stateClause.c \
        functionClauseList.c metaStateConstraint.c metaStateConstraintList.c \
        metaStateExpression.c metaStateSpecifier.c functionConstraint.c
 
-LCLINTSRC = exprNode.c exprChecks.c llmain.c
+SPLINTSRC = exprNode.c exprChecks.c llmain.c
 CHECKSRC = structNames.c transferChecks.c varKinds.c nameChecks.c
 
-GLOBSRC = context.c globals.c flags.c general.c osd.c reader.c
+GLOBSRC = context.c globals.c flags.c general.c osd.c reader.c mtreader.c
 
-GRAMSRC = cgrammar.c cscanner.c mtscanner.c mtreader.c mtgrammar.c
+GRAMSRC = cgrammar.c cscanner.c mtscanner.c mtgrammar.c llgrammar.c signature.c
 
 OVERFLOWCHSRC = constraintGeneration.c constraintTerm.c \
                 constraintExprData.c constraintExpr.c constraint.c \
@@ -77,8 +79,6 @@ LCLONLYSRC = usymtab_interface.c abstract.c ltoken.c lclscanline.c \
 LSLSRC = tokentable.c scan.c scanline.c lslparse.c \
          lh.c checking.c lclctypes.c imports.c lslinit.c syntable.c 
 
-LCLGRAMSRC = llgrammar.c signature.c
-
 LCLSETSRC  = lsymbolSet.c sigNodeSet.c lslOpSet.c sortSet.c
 
 LCLLISTSRC = initDeclNodeList.c sortList.c declaratorInvNodeList.c \
@@ -94,7 +94,7 @@ LCLLISTSRC = initDeclNodeList.c sortList.c declaratorInvNodeList.c \
 HEADERSRC = Headers/abstBodyNode.h           Headers/ltokenList.h \
           Headers/abstract.h               Headers/macrocache.h \
           Headers/abstractNode.h           Headers/mapping.h \
-          Headers/aliasChecks.h            Headers/message.h \
+          Headers/message.h \
           Headers/aliasStack.h             Headers/messageLog.h \
           Headers/aliasTable.h             Headers/metaStateConstraint.h \
           Headers/annotationInfo.h         Headers/metaStateConstraintList.h \
@@ -228,12 +228,14 @@ HEADERSRC = Headers/abstBodyNode.h           Headers/ltokenList.h \
           Headers/lsymbol.h                Headers/version.h \
           Headers/lsymbolList.h            Headers/warnClause.h \
           Headers/lsymbolSet.h             Headers/ynm.h \
-          Headers/ltoken.h   Headers/lclintMacros.nf  
+          Headers/ltoken.h   Headers/splintMacros.nf  
 
 IFILES =  ctbase.i  cttable.i  exprDataQuite.i
 
 ## Non-built files we need to distribute
-EXTRA_DIST = DATE $(BISON_SRC) bison.head bison.reset $(HEADERSRC) flags.def cscanner.l flex.head flex.reset $(IFILES)
+EXTRA_DIST = DATE $(BISON_SRC) bison.head bison.reset $(HEADERSRC)  \
+            flags.def cscanner.l flex.head flex.reset $(IFILES) \
+ Headers/256_random_numbers.nf  Headers/splintMacros.nf        Headers/reservedNames.nf
 
 
 #Files that are used on systems that do not have bison or yacc
@@ -245,20 +247,21 @@ DER_FILES = $(DER_BISON_FILES)
 COMMONSRC = $(OVERFLOWCHSRC) $(CPPSRC) $(CSRC) $(CHECKSRC) $(GENERALSRC) \
             $(GLOBSRC) $(IFACESRC) $(LISTSRC) $(SETSRC) $(METASTATESRC)
 
-ALLSRC = $(GRAMSRC) $(COMMONSRC) $(LCLINTSRC) $(DER_FILES) $(HEADERSRC)
+ALLSRC = $(GRAMSRC) $(COMMONSRC) $(SPLINTSRC) $(DER_FILES) $(HEADERSRC)
 
-#ALLSRC = $(COMMONSRC) $(LCLINTSRC) $(DER_FILES) $(HEADERSRC)
+#files to run Splint on
+LINTSRC = $(COMMONSRC) $(SPLINTSRC) 
 
-LCLSRC = $(LCLSETSRC) $(LCLLISTSRC) $(LSLSRC) $(CMNSRC) $(LCLONLYSRC) \
-         $(LCLGRAMSRC)
+#ALLSRC = $(COMMONSRC) $(SPLINTSRC) $(DER_FILES) $(HEADERSRC)
 
+LCLSRC = $(LCLSETSRC) $(LCLLISTSRC) $(LSLSRC) $(CMNSRC) $(LCLONLYSRC) 
 lcl_SOURCES = $(LCLSRC)
 
-lclint_SOURCES = $(ALLSRC)
-lclint_LDADD = $(LCLOBJ) @LEXLIB@
+splint_SOURCES = $(ALLSRC)
+splint_LDADD = $(LCLOBJ) @LEXLIB@
 
 # Ensure the LCL objects get built if needed
-lclint_DEPENDENCIES = $(LCLOBJ)
+splint_DEPENDENCIES = $(LCLOBJ)
 
 # Keep it fake
 .PHONY: lcl$(EXEEXT)
@@ -276,13 +279,14 @@ BUILT_SOURCES = Headers/signature_gen.h Headers/cgrammar_tokens.h \
 ## Grammars
 
 Headers/signature_gen.h signature.c: signature.c.der signature.y
-       if test x$(BISON) = xno; then \
+       @if test x$(BISON) = xno; then \
          $(CP) signature.c.der signature.c; \
        else \
+         echo '* Making signature.c'; \
          $(BISON) $(YFLAGS) -p lsl signature.y; \
          $(CAT) bison.head signature.tab.c bison.reset >signature.c; \
          $(CP) signature.c signature.c.der; \
-         -$(MV) Headers/signature_gen.h Headers/signature_gen.bak; \
+         $(MV) Headers/signature_gen.h Headers/signature_gen.bak; \
          $(CAT) bison.head signature.tab.h bison.reset >Headers/signature_gen.h; \
          $(RM) signature.tab.c signature.tab.h; \
        fi
@@ -290,15 +294,16 @@ Headers/signature_gen.h signature.c: signature.c.der signature.y
 ## 11/29/001 drl added copy so that the file cgrammar.c.der is created
 
 Headers/cgrammar_tokens.h cgrammar.c: cgrammar.c.der cgrammar.y
-       if test x$(BISON) = xno; then \
+       @if test x$(BISON) = xno; then \
          $(CP) cgrammar.c.der cgrammar.c; \
        else \
+         echo '* Making cgrammar.c'; \
          echo '* Expect 141 shift/reduce conflicts and 111 reduce/reduce conflicts.'; \
          echo '* (see cgrammar.y for explanation)'; \
          $(BISON) $(YFLAGS) cgrammar.y; \
          $(CAT) bison.head cgrammar.tab.c bison.reset >cgrammar.c; \
          $(CP) cgrammar.c cgrammar.c.der; \
-         -$(MV) Headers/cgrammar_tokens.h Headers/cgrammar_tokens.bak; \
+         $(MV) Headers/cgrammar_tokens.h Headers/cgrammar_tokens.bak; \
          $(CAT) bison.head cgrammar.tab.h bison.reset >Headers/cgrammar_tokens.h; \
          $(RM) cgrammar.tab.c cgrammar.tab.h; \
        fi
@@ -307,13 +312,14 @@ Headers/cgrammar_tokens.h cgrammar.c: cgrammar.c.der cgrammar.y
 ## also removed the dependency for this file on mtgrammary.c  
 
 Headers/mtgrammar_tokens.h mtgrammar.c: mtgrammar.y
-       if test x$(BISON) = xno; then \
+       @if test x$(BISON) = xno; then \
          $(CP) mtgrammar.c.der mtgrammar.c; \
        else \
+         echo '* Making mygrammar.c'; \
          $(BISON) $(YFLAGS) -p mt mtgrammar.y; \
          $(CAT) bison.head mtgrammar.tab.c bison.reset >mtgrammar.c; \
          $(CP) mtgrammar.c mtgrammar.c.der; \
-         -$(MV) Headers/mtgrammar_tokens.h Headers/mtgrammar_tokens.bak; \
+         $(MV) Headers/mtgrammar_tokens.h Headers/mtgrammar_tokens.bak; \
          $(CAT) bison.head mtgrammar.tab.h bison.reset >Headers/mtgrammar_tokens.h; \
          $(RM) mtgrammar.tab.c mtgrammar.tab.h; \
        fi
@@ -321,16 +327,17 @@ Headers/mtgrammar_tokens.h mtgrammar.c: mtgrammar.y
 ## 11/29/001 drl added copy so that the file llgrammar.c.der is created
 
 Headers/llgrammar_gen.h Headers/llgrammar_gen2.h llgrammar.c: llgrammar.c.der llgrammar.y
-       if test x$(BISON) = xno; then \
+       @if test x$(BISON) = xno; then \
          $(CP) llgrammar.c.der llgrammar.c; \
        else \
+         echo '* Making llgrammar.c'; \
          echo '* Expect 2 shift/reduce conflicts'; \
          $(BISON) $(YFLAGS) -p yl llgrammar.y; \
          $(CAT) bison.head llgrammar.tab.c bison.reset >llgrammar.c; \
          $(CP) llgrammar.c llgrammar.c.der; \
-         -$(MV) Headers/llgrammar_gen2.h Headers/llgrammar_gen2.bak; \
+         $(MV) Headers/llgrammar_gen2.h Headers/llgrammar_gen2.bak; \
          $(CAT) bison.head llgrammar.tab.h bison.reset >Headers/llgrammar_gen2.h; \
-         0$(MV) Headers/llgrammar_gen.h Headers/llgrammar_gen.bak; \
+         $(MV) Headers/llgrammar_gen.h Headers/llgrammar_gen.bak; \
          $(CAT) bison.head llgrammar.tab.h bison.reset >Headers/llgrammar_gen.h; \
          $(RM) llgrammar.tab.c llgrammar.tab.h; \
        fi
@@ -341,10 +348,12 @@ cscanner.c: cscanner.l
 
 Headers/flag_codes.gen: flags.def
        grep "FLG_" flags.def > Headers/flag_codes.gen
+       $(MAKE)
+       cd ../lib; $(MAKE)
 
 ## Checking rules
 
-CHECKS = $(subst .c,.check,$(lclint_SOURCES))
+CHECKS = $(subst .c,.check,$(splint_SOURCES))
 
 ## Other rules
 
@@ -361,21 +370,25 @@ test:
 etags:
        maketags
 
-lintnew: 
-       ./lclint -f lclint.lclintrc $(DEFAULT_INCLUDES) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) +singleinclude $(ALLSRC) $(LCLSRC) -dump lclint \
+lintnew: splintme
+
+splintme: 
+       ./splint $(DEFAULT_INCLUDES) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) +singleinclude $(LINTSRC) $(LCLSRC) -dump lclint \
                     +forcehints -misplacedsharequal +showsourceloc -unrecogcomments \
                     -supcounts -fcnuse -exportlocal -constuse -mts file -mts filerw
 
 lintbuffercheck: 
-       ./lclint -f lclint.lclintrc $(DEFAULT_INCLUDES) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) +singleinclude $(ALLSRC) $(LCLSRC) -dump lclint \
+       ./splint $(DEFAULT_INCLUDES) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) +singleinclude $(LINTSRC) $(LCLSRC) -dump lclint \
                     +forcehints -misplacedsharequal +showsourceloc -unrecogcomments \
-                    -supcounts -fcnuse -exportlocal -constuse -mts file -mts filerw +arraybounds +arrayboundsread
-
+                    -supcounts -fcnuse -exportlocal -constuse -mts file -mts filerw +arraybounds +arrayboundsread +implictconstraint
 
 
-.PHONY: purify
-purify: $(lclint_OBJECTS)
-       purify $(LINK) -o lclint$(EXEEXT) $^ $(lclint_LDADD)
+all: splint$(EXEEXT)
+CLEANFILES = splint$(EXEEXT)
 
-all: lclint$(EXEEXT)
-CLEANFILES = lclint$(EXEEXT)
+.c.o:
+       @echo "Compiling "$<"..."; \
+       source='$<' object='$@' libtool=no \
+       depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' \
+       $(CCDEPMODE) $(depcomp) \
+       $(COMPILE) -c `test -f $< || echo '$(srcdir)/'`$<
This page took 0.132727 seconds and 4 git commands to generate.