]>
Commit | Line | Data |
---|---|---|
885824d3 | 1 | ### |
11db3170 | 2 | ### Splint db1 test |
885824d3 | 3 | ### |
4 | ### Taken from sample, second iteration: weakchecks | |
5 | ### | |
6 | ||
7 | .SUFFIXES: .lcl .lcs .lh .h .c .o | |
80ee600a | 8 | .PHONY: check clean |
885824d3 | 9 | |
4dd72714 | 10 | ### SHELL = /bin/csh -f |
885824d3 | 11 | |
0bd4c301 | 12 | SPLINT = splint -booltype bool -booltrue TRUE -boolfalse FALSE |
11db3170 | 13 | LCL = $(SPLINT) -specundef +lh +quiet -nof |
14 | SPLINTLH = $(SPLINT) +lh | |
885824d3 | 15 | LCSFILES = bool.lcs dbase.lcs employee.lcs empset.lcs erc.lcs eref.lcs ereftab.lcs |
16 | ||
17 | MODULES = bool.lcl employee eref empset ereftab erc dbase drive.c | |
18 | OBJS = dbase.o employee.o empset.o erc.o eref.o ereftab.o | |
19 | ||
20 | test: | |
21 | $(MAKE) -e clean | |
22 | $(MAKE) -e check | |
23 | ||
a469ccf0 | 24 | ### |
25 | ### Removed +showscan, produces different results on different platforms | |
26 | ### | |
27 | ||
16c024b5 | 28 | ### evans 2002-12-17: 2 fewer weak errors because of -abstractcompare default in weak |
29 | ||
885824d3 | 30 | check: $(LCSFILES) |
16c024b5 | 31 | -$(SPLINT) -showcol -weak $(MODULES) -expect 19 |
8ea5df88 | 32 | -$(SPLINT) -showcol +strict -bounds -modfilesystem +showsummary $(MODULES) -expect 338 |
f9264521 | 33 | |
34 | # evans 2002-07-09: 5 bufferoverflowhigh warnings for using sprintf | |
885824d3 | 35 | |
36 | ### The following rules generate .lh and .lcs files from .lcl files. They also | |
37 | ### ensure that .h files appear to be updated whenever the corresponding .lh | |
38 | ### file is updated. | |
39 | ||
40 | .lcl.lh: | |
41 | $(LCL) $*.lcl | |
42 | ||
43 | .lcl.lcs: | |
44 | $(LCL) $*.lcl | |
45 | ||
46 | .lh.h: | |
47 | touch $*.h | |
48 | ||
49 | .c.o: | |
50 | $(GCC) -c $*.c | |
51 | ||
52 | ### | |
53 | ### Clean removes junk and all derived files. | |
54 | ### Tidy removes junk and object and executable files. | |
55 | ### | |
56 | ||
57 | clean: tidy | |
33c9434a | 58 | -@rm -f *.c.html *.lcl.html *.h.html *.lh.html *.lcs *.lh 1> /dev/null |
885824d3 | 59 | |
60 | tidy: | |
b2d6351a | 61 | -@rm -f ,* .,* *.CKP *.BAK .emacs_[0-9]* core a.out *.*~ *~ *.o drive 11> /dev/null |
885824d3 | 62 | |
63 | ### The following dependencies ensure that imported LCL specs | |
64 | ### are checked before the specs that import them. | |
65 | ||
66 | dbase.lcs: employee.lcs empset.lcs | |
67 | empset.lcs: employee.lcs | |
68 | erc.lcs: eref.lcs | |
69 | eref.lcl: employee.lcs | |
70 | ereftab.lcs: employee.lcs eref.lcs | |
71 | ||
72 | ### The following dependencies ensure that a .o file is recompiled when the | |
73 | ### corresponding .c file, or one of the .h files it #includes, is changed. | |
74 | ||
75 | dbase.o: dbase.c bool.h dbase.h employee.h empset.h | |
76 | drive.o: drive.c bool.h dbase.h employee.h empset.h erc.h eref.h ereftab.h | |
77 | employee.o: employee.c employee.h | |
78 | empset.o: empset.c bool.h empset.h erc.h eref.h employee.h employee.h | |
79 | erc.o: erc.c bool.h erc.h eref.h employee.h | |
80 | eref.o: eref.c eref.h employee.h | |
81 | ereftab.o: ereftab.c bool.h ereftab.h erc.h eref.h employee.h |