]> andersk Git - splint.git/blob - test/db2/Makefile
Initial revision
[splint.git] / test / db2 / Makefile
1 ###
2 ### LCLint db2 test
3 ###
4 ### Taken from sample, fifth iteration: memchecks1
5 ###
6
7 .SUFFIXES: .lcl .lcs .lh .h .c .o
8 .PHONY: check
9
10 SHELL = /bin/csh -f
11
12 LCLINT = lclint
13 LCL = $(LCLINT) -specundef +lh +quiet -nof
14 LCLINTLH = $(LCLINT) +lh
15 LCSFILES = dbase.lcs employee.lcs empset.lcs erc.lcs eref.lcs ereftab.lcs 
16
17 MODULES = 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
24 check: $(LCSFILES)
25         $(LCLINT) -exportlocal -showcol -allimponly -macrovarprefixexclude +showscan $(MODULES) -expect 15
26         $(LCLINT) -exportlocal -showcol +allimponly +showscan $(MODULES) -expect 28
27         $(LCLINT) -exportlocal -showcol -memchecks -macrovarprefixexclude +showscan $(MODULES)
28
29 ### The following rules generate .lh and .lcs files from .lcl files.  They also
30 ### ensure that .h files appear to be updated whenever the corresponding .lh
31 ### file is updated.
32
33 .lcl.lh:
34         $(LCL) $*.lcl
35
36 .lcl.lcs:
37         $(LCL) $*.lcl
38
39 .lh.h:
40         touch $*.h
41
42 .c.o:
43         $(GCC) -c $*.c 
44
45 ###
46 ### Clean removes junk and all derived files.
47 ### Tidy removes junk and object and executable files.
48 ###
49
50 clean: tidy
51         -@rm -f *.c.html *.lcl.html *.h.html *.lh.html *.lcs *.lh >& /dev/null
52
53 tidy:
54         -@rm -f ,* .,* *.CKP *.BAK .emacs_[0-9]* core a.out *.*~ *~ *.o drive >& /dev/null
55
56 ### The following dependencies ensure that imported LCL specs 
57 ### are checked before the specs that import them.
58
59 dbase.lcs:   employee.lcs empset.lcs 
60 empset.lcs:  employee.lcs
61 erc.lcs:     eref.lcs
62 eref.lcl:    employee.lcs
63 ereftab.lcs: employee.lcs eref.lcs
64
65 ### The following dependencies ensure that a .o file is recompiled when the
66 ### corresponding .c file, or one of the .h files it #includes, is changed.
67
68 dbase.o:    dbase.c bool.h dbase.h employee.h empset.h
69 drive.o:    drive.c bool.h dbase.h employee.h empset.h erc.h eref.h ereftab.h 
70 employee.o: employee.c employee.h 
71 empset.o:   empset.c bool.h empset.h erc.h eref.h employee.h employee.h 
72 erc.o:      erc.c bool.h erc.h eref.h employee.h 
73 eref.o:     eref.c eref.h employee.h 
74 ereftab.o:  ereftab.c bool.h ereftab.h erc.h eref.h employee.h 
This page took 0.054447 seconds and 5 git commands to generate.