# -u show context
+
+#drl 3/27/2002 get the test suit to print a warning when splint is built under /usr/
SPLINT = $(top_builddir)/src/splint$(EXEEXT)
+### These are shell-specific
+
### This is horrible! Can't we make top_builddir absolute?
SPLINTNEST = ../$(top_builddir)/src/splint$(EXEEXT)
UNITTESTS = \
help \
abstptr abstract alias alttypes ansireserved argorder \
- args arraydims arrayinit blocks break cases cast charlit clauses commentchar compdestroy \
+ args arraydims arrayinit arraylit blocks break cases cast charlit clauses commentchar compdestroy \
compoundliterals compoundstmt constannot controldepth csyntax czechnames czechoslovaknames deadparam \
- decl divzero enum exports external fields flags forbody format freearray \
+ decl divzero enum enumtag exports external fields flags forbody format freearray \
funcpointer functionmacro glob globals impabstract info init inparam internal iter keep libs \
linked lintcomments list loopexec looptesteffect \
macros macrosef merge mergenull modifies modtest moduncon \
specclauses \
special stack staticarray strings \
stringliteral \
- structassign typequals typeof ud ulstypes union unioninit unreachable unsignedcompare \
+ structassign typequals typeof ud ulstypes union unioninit \
+ unnamedsu unreachable unsignedcompare \
unused ullint utypes void widestrings
UNITEXPECTS = $(addsuffix .expect, $(UNITTESTS))
CLEANOUTPUT = $(GREP) -v "Splint 3." | $(GREP) -v "$(SPLINT)" | $(GREP) -v "^make.*\[[1-9]*\]:" | $(GREP) -v "^gmake.*\[[1-9]*\]:" | $(GREP) -v "^gmake -e" | $(GREP) -v "^make -e" |$(GREP) -v "config.status: creating test/Makefile" | $(GREP) -v "cd .. && " | $(GREP) -v "CONFIG_HEADERS=" | $(GREP) -v "CONFIG_FILES="
+
+#drl temporally take this out.
+#.PHONY: expects
+#expects:
+# @echo "Saving old expects..."; \
+# cat *.expect >expects-`date +"%y-%m-%d-%H"`
+# @for TEST in $(UNITTESTS) $(INTEGTESTS); do \
+# echo "Making $$TEST.expect..."; \
+# $(MAKE) $$TEST 2>&1 | $(CLEANOUTPUT) >$$TEST.expect; \
+# cat $$TEST.expect; \
+# done
+CheckSystemDir = (pwd | grep -q "/usr" && echo "Warning tests which not run correctly when splint is built in /usr or a subdirectory under /usr. Build splint in a different directory or disregard test failures." )
+
#drl 11/29/2001 This is a very ugly hack to get make dist to work
EXTRA_DIST = ./abst_t.lcl ./abst_t.lcs \
./abstptr.lcl ./abstptr.lcs \
./argorder5.c \
./args.c \
./arrayinit.c \
+ ./arraylit.c \
./blocks.c \
./branchstate.c \
./break.c \
./dkf5kSprintf.c \
./ensures.c \
./enum.c \
+ ./enumtag.c \
./exports.c \
./external.c \
./fields.c \
./union.c \
./unreachable.c \
./unsignedcompare.c \
+ ./unnamedsu.c \
./unused.c \
./void.c \
./conditions/miroslaw.c \
argorder.expect \
args.expect \
arrayinit.expect \
+ arraylit.expect \
blocks.expect \
branchstate.expect \
break.expect \
deadparam.expect \
decl.expect \
enum.expect \
+ enumtag.expect \
exports.expect \
external.expect \
fields.expect \
ullint.expect \
ulstypes.expect \
union.expect \
+ unnamedsu.expect \
unreachable.expect \
unsignedcompare.expect \
unused.expect \
mostlyclean-generic uninstall uninstall-am uninstall-info-am
-unexport LARCH_PATH
-unexport LCLIMPORTDIR
-
.PHONY: all check
all check: fulltest
.PHONY: version
version:
- -$(SPLINTP) -help version
+ -$(SPLINT) -help version
.PHONY: help
help:
-@$(SPLINT)
-@LARCH_PATH=/dev/null; $(SPLINT) -nof empty.lcl
- -@$(SPLINTP) -help
+ -@$(SPLINT) -help
-@$(SPLINTP) -asdf
-@$(SPLINTP) +boolint +boolint
- -@$(SPLINTP) -help flags alpha
+ -@$(SPLINT) -help flags alpha
#commenting these out for the release because they will almost always fail
#since the default will only fit one system
#Don't want to panic the user...
-# -@$(SPLINTP) -help flags all | $(GREP) -v "^larchpath <path> " | $(GREP) -v "^lclimportdir <directory> " | $(GREP) -v " Path argument. Default: " | $(GREP) -v " Directory argument. Default: " | $(GREP) -v " lclimportdir <directory> "
-# -@$(SPLINTP) -help flags full | $(GREP) -v "^larchpath <path> " | $(GREP) -v "^lclimportdir <directory> " | $(GREP) -v " Path argument. Default: " | $(GREP) -v " Directory argument. Default: " | $(GREP) -v " lclimportdir <directory> "
-# -@$(SPLINTP) -help flags manual | $(GREP) -v "^larchpath <path> " | $(GREP) -v "^lclimportdir <directory> " | $(GREP) -v " Path argument. Default: " | $(GREP) -v " Directory argument. Default: " | $(GREP) -v " lclimportdir <directory> "
+# -@$(SPLINT) -help flags all | $(GREP) -v "^larchpath <path> " | $(GREP) -v "^lclimportdir <directory> " | $(GREP) -v " Path argument. Default: " | $(GREP) -v " Directory argument. Default: " | $(GREP) -v " lclimportdir <directory> "
+# -@$(SPLINT) -help flags full | $(GREP) -v "^larchpath <path> " | $(GREP) -v "^lclimportdir <directory> " | $(GREP) -v " Path argument. Default: " | $(GREP) -v " Directory argument. Default: " | $(GREP) -v " lclimportdir <directory> "
+# -@$(SPLINT) -help flags manual | $(GREP) -v "^larchpath <path> " | $(GREP) -v "^lclimportdir <directory> " | $(GREP) -v " Path argument. Default: " | $(GREP) -v " Directory argument. Default: " | $(GREP) -v " lclimportdir <directory> "
#larch and lclimportdir have different hardcoded default paths so don't include the path in the output..
.c.diff:
$(MAKE) $* |& $(CLEANOUTPUT) >$*.out && diff $*.expect $*.out
-#drl temporally take this out.
-#.PHONY: expects
-#expects:
-# @echo "Saving old expects..."; \
-# cat *.expect >expects-`date +"%y-%m-%d-%H"`
-# @for TEST in $(UNITTESTS) $(INTEGTESTS); do \
-# echo "Making $$TEST.expect..."; \
-# $(MAKE) $$TEST 2>&1 | $(CLEANOUTPUT) >$$TEST.expect; \
-# cat $$TEST.expect; \
-# done
-
.PHONY: quicktest
quicktest:
+ $(CheckSystemDir)
@for TEST in $(QUICKTESTS); do \
echo "Checking $$TEST..."; \
$(MAKE) $$TEST 2>&1 | $(CLEANOUTPUT) >$$TEST.out && \
@echo "Testing $(PACKAGE) $(VERSION)..."
@echo
@echo "Version Info:"
- @$(SPLINTP) -help version
- @$(SPLINTP) -help vars
+ @$(SPLINT) -help version
+ @$(SPLINT) -help vars
@echo ""
@echo "Tests:"
@echo ""
arrayinit:
-$(SPLINTR) arrayinit.c -expect 9
+.PHONY: arraylit
+arraylit:
+ -$(SPLINTR) arraylit.c -expect 2
+ -$(SPLINTR) arraylit.c +stringliteralsmaller -expect 4
+
.PHONY: blocks
blocks:
-$(SPLINTR) blocks.c -expect 4
-$(SPLINTR) enum -expect 16
-$(SPLINTR) enum -misscase -expect 14
+.PHONY: enumtag
+enumtag:
+ -$(SPLINTR) enumtag.c -expect 2
+
.PHONY: exports
exports:
-$(SPLINTR) exports.c +exporttype +exportvar +exportfcn +topuse +typeuse -expect 6
staticarray:
-$(SPLINTR) staticarray.c -expect 3
+###
+### evans 2002-03-16: Default setting of stringliteralnoroomfinalnull changed
+###
+
.PHONY: stringliteral
stringliteral:
- -$(SPLINTR) stringliteral.c +stringliteralnoroomfinalnull -expect 4
- -$(SPLINTR) stringliteral.c -expect 3
+ -$(SPLINTR) stringliteral.c -stringliteralnoroomfinalnull -expect 3
+ -$(SPLINTR) stringliteral.c -expect 4
.PHONY: strings
strings:
unioninit:
-$(SPLINTR) unioninit.c -expect 2
+.PHONY: unnamedsu
+unnamedsu:
+ -$(SPLINTR) unnamedsu.c -expect 0
+
.PHONY: unreachable
unreachable:
-$(SPLINTR) unreachable.c -expect 5