source: tests/zombies/Makefile.example @ 65ef0cd

Last change on this file since 65ef0cd was 87b9332, checked in by Andrew Beach <ajbeach@…>, 4 years ago

Moved 'examples/' to 'tests/zombies/'.

  • Property mode set to 100644
File size: 1007 bytes
RevLine 
[55ba7339]1CFA ?= ../driver/cfa-cpp
[7bcf74e]2CFAOPT ?= -a
3OUTPUT ?= Output
4EXPECT ?= Expect
5OUTPUTDIR ?= ${OUTPUT}${CFAOPT}
6EXPECTDIR ?= ${EXPECT}${CFAOPT}
7EXAMPLES = ${wildcard *.c}
8OUTPUTS = ${addprefix ${OUTPUTDIR}/,${EXAMPLES:.c=.txt}}
9
[6ba0659]10#.SILENT :
[7bcf74e]11
12all :
13        +for opt in -a -e -f -r -s -v ; do \
14            make test CFAOPT=$${opt} ; \
15        done ; \
16        rm -f core
17
18test : ${OUTPUTS} ${OUTPUTDIR}/report
19
20${OUTPUTDIR}/%.txt : %.c ${CFA} Makefile
[6ba0659]21        -${CFA} -n ${CFAOPT} $< > $@ 2>&1
[7bcf74e]22
23${OUTPUTDIR}/report : ${OUTPUTS} ${EXPECTDIR}
24        rm -f $@
25        echo "===== regression test using cfa-cpp flag ${CFAOPT} ====="
26        @for i in ${OUTPUTS} ; do \
27             echo "---"`basename $$i`"---" | tee -a $@; \
28             diff -B -w ${EXPECTDIR}/`basename $$i` $$i | tee -a $@; \
29        done
30
31${OUTPUTS} : | ${OUTPUTDIR}             # order only prerequisite
32
33${OUTPUTDIR} :
[55ba7339]34        mkdir -p $@
[7bcf74e]35
36# remove the expected results directories to generate new ones from the current output
37
38${EXPECTDIR} : | ${OUTPUTS}             # new Expected results ?
39        cp -pr ${OUTPUTDIR} $@
40
41clean :
42        rm -rf ${OUTPUT}-* core
Note: See TracBrowser for help on using the repository browser.