]> andersk Git - splint.git/blame - test/db1/Makefile
Merged code tree with Dave Evans's version. Many changes to numberous to list....
[splint.git] / test / db1 / Makefile
CommitLineData
885824d3 1###
2### LCLint db1 test
3###
4### Taken from sample, second iteration: weakchecks
5###
6
7.SUFFIXES: .lcl .lcs .lh .h .c .o
8.PHONY: check
9
10SHELL = /bin/csh -f
11
12LCLINT = lclint
13LCL = $(LCLINT) -specundef +lh +quiet -nof
14LCLINTLH = $(LCLINT) +lh
15LCSFILES = bool.lcs dbase.lcs employee.lcs empset.lcs erc.lcs eref.lcs ereftab.lcs
16
17MODULES = bool.lcl employee eref empset ereftab erc dbase drive.c
18OBJS = dbase.o employee.o empset.o erc.o eref.o ereftab.o
19
20test:
21 $(MAKE) -e clean
22 $(MAKE) -e check
23
24check: $(LCSFILES)
25 $(LCLINT) -showcol -weak +showscan $(MODULES) -expect 16
26 $(LCLINT) -showcol +strict -modfilesystem +showscan +showsummary $(MODULES) -expect 331
27
28### The following rules generate .lh and .lcs files from .lcl files. They also
29### ensure that .h files appear to be updated whenever the corresponding .lh
30### file is updated.
31
32.lcl.lh:
33 $(LCL) $*.lcl
34
35.lcl.lcs:
36 $(LCL) $*.lcl
37
38.lh.h:
39 touch $*.h
40
41.c.o:
42 $(GCC) -c $*.c
43
44###
45### Clean removes junk and all derived files.
46### Tidy removes junk and object and executable files.
47###
48
49clean: tidy
50 -@rm -f *.c.html *.lcl.html *.h.html *.lh.html *.lcs *.lh >& /dev/null
51
52tidy:
53 -@rm -f ,* .,* *.CKP *.BAK .emacs_[0-9]* core a.out *.*~ *~ *.o drive >& /dev/null
54
55### The following dependencies ensure that imported LCL specs
56### are checked before the specs that import them.
57
58dbase.lcs: employee.lcs empset.lcs
59empset.lcs: employee.lcs
60erc.lcs: eref.lcs
61eref.lcl: employee.lcs
62ereftab.lcs: employee.lcs eref.lcs
63
64### The following dependencies ensure that a .o file is recompiled when the
65### corresponding .c file, or one of the .h files it #includes, is changed.
66
67dbase.o: dbase.c bool.h dbase.h employee.h empset.h
68drive.o: drive.c bool.h dbase.h employee.h empset.h erc.h eref.h ereftab.h
69employee.o: employee.c employee.h
70empset.o: empset.c bool.h empset.h erc.h eref.h employee.h employee.h
71erc.o: erc.c bool.h erc.h eref.h employee.h
72eref.o: eref.c eref.h employee.h
73ereftab.o: ereftab.c bool.h ereftab.h erc.h eref.h employee.h
This page took 0.098717 seconds and 5 git commands to generate.