]>
Commit | Line | Data |
---|---|---|
885824d3 | 1 | ### |
11db3170 | 2 | ### Splint db3 test |
885824d3 | 3 | ### |
4 | ### Taken from sample, thirteenth iteration: strictlib | |
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 | |
11db3170 | 12 | SPLINT = splint |
13 | SPLINTF = $(SPLINT) -f ./.splintrc | |
14 | LCL = $(SPLINTF) -specundef +lh +quiet -nof | |
15 | SPLINTLH = $(SPLINTF) +lh | |
885824d3 | 16 | LCSFILES = dbase.lcs employee.lcs empset.lcs erc.lcs eref.lcs ereftab.lcs bool.lcs check.lcs |
17 | MODULES = employee eref empset ereftab erc dbase drive.c bool.lcl check.lcl | |
18 | OBJS = dbase.o employee.o empset.o erc.o eref.o ereftab.o | |
19 | ||
20 | test: | |
a469ccf0 | 21 | @$(MAKE) -e check |
885824d3 | 22 | |
11db3170 | 23 | ### Note there is a .splint file used for checking! |
885824d3 | 24 | |
25 | check: $(LCSFILES) | |
909cf5eb | 26 | -$(SPLINTF) -showcol $(MODULES) +strict -bounds -modfilesystem +showsummary -exportconstant -exportlocal -protoparamprefix p_ -expect 5 |
27 | -$(SPLINTF) -showcol $(MODULES) +strict -bounds -modfilesystem +showsummary -exportconstant -exportlocal -protoparamprefix p_ +strictlib -expect 82 | |
f9264521 | 28 | |
29 | # evans 2002-07-09: 5 new sprintf warnings | |
885824d3 | 30 | |
31 | ||
32 | ### The following rules generate .lh and .lcs files from .lcl files. They also | |
33 | ### ensure that .h files appear to be updated whenever the corresponding .lh | |
34 | ### file is updated. | |
35 | ||
36 | .lcl.lh: | |
37 | $(LCL) $*.lcl | |
38 | ||
39 | .lcl.lcs: | |
40 | $(LCL) $*.lcl | |
41 | ||
42 | .lh.h: | |
43 | touch $*.h | |
44 | ||
45 | .c.o: | |
46 | $(GCC) -c $*.c | |
47 | ||
48 | ### | |
49 | ### Clean removes junk and all derived files. | |
50 | ### Tidy removes junk and object and executable files. | |
51 | ### | |
52 | ||
53 | clean: tidy | |
54 | -@rm -f *.c.html *.lcl.html *.h.html *.lh.html *.lcs *.lh >& /dev/null | |
55 | ||
56 | tidy: | |
57 | -@rm -f ,* .,* *.CKP *.BAK .emacs_[0-9]* core a.out *.*~ *~ *.o drive >& /dev/null | |
58 | ||
59 | ### The following dependencies ensure that imported LCL specs | |
60 | ### are checked before the specs that import them. | |
61 | ||
62 | dbase.lcs: employee.lcs empset.lcs | |
63 | empset.lcs: employee.lcs | |
64 | erc.lcs: eref.lcs | |
65 | eref.lcl: employee.lcs | |
66 | ereftab.lcs: employee.lcs eref.lcs | |
67 | ||
68 | ### The following dependencies ensure that a .o file is recompiled when the | |
69 | ### corresponding .c file, or one of the .h files it #includes, is changed. | |
70 | ||
71 | dbase.o: dbase.c bool.h dbase.h employee.h empset.h | |
72 | drive.o: drive.c bool.h dbase.h employee.h empset.h erc.h eref.h ereftab.h | |
73 | employee.o: employee.c employee.h | |
74 | empset.o: empset.c bool.h empset.h erc.h eref.h employee.h employee.h | |
75 | erc.o: erc.c bool.h erc.h eref.h employee.h | |
76 | eref.o: eref.c eref.h employee.h | |
77 | ereftab.o: ereftab.c bool.h ereftab.h erc.h eref.h employee.h | |
78 | ||
79 | ||
80 | ||
81 |