Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

[1771d5]: classic-bugs / vol2 / Makefile Maximize Restore History

Download this file

Makefile    60 lines (52 with data), 1.6 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
JAGS ?= /usr/local/bin/jags
TIME = /usr/bin/time
EXAMPLES ?= asia biops eyes stagnant pigs \
alli beetles birats dugongs hearts jaw orange schools
all:
bench:
@echo "Creating new benchmark results"
@for d in $(EXAMPLES); do \
(echo $${d}; \
cd $${d}; \
for cmdfile in `ls test*.cmd`; do \
echo "Running " $${cmdfile}; \
($(JAGS) $${cmdfile} && \
Rscript -e "benchfile='bench-$${cmdfile%%.cmd}.R'; source('../../R/bench.R')";) || exit 1; \
done;) || exit 1;\
done;
check: clean
@echo "Checking output against benchmark results"
@for d in $(EXAMPLES); do \
(cd $${d} && \
for cmdfile in `ls test*.cmd`; do \
($(JAGS) $${cmdfile} && \
Rscript -e "source('bench-$${cmdfile%%.cmd}.R'); source('../../R/check.R')";) \
|| exit 1; \
done;) || exit 1;\
done;
Rcheck:
@echo "Checking output against benchmark results"
@for d in $(EXAMPLES); do \
(cd $${d} && \
for cmdfile in `ls test*.R`; do \
R --vanilla < $${cmdfile} || exit 1; \
done;) || exit 1;\
done;
checktime:
rm -f times
@for d in $(EXAMPLES); do \
(cd $${d} && \
for cmdfile in `ls test*.cmd`; do \
($(TIME) -f "$${d} $${cmdfile} %e %U %S" -o ../times -a \
$(JAGS) $${cmdfile};) || exit 1; \
done;) || exit 1;\
done;
clean:
@for d in $(EXAMPLES); do \
(cd $${d} && rm -f core jags.out jags.ind jags.dump \
CODAchain*.txt CODAindex.txt gmon.out) || exit 1; \
done;
distclean: clean
@for d in $(EXAMPLES); do \
(cd $${d} && rm -f bench-*.R) || exit 1; \
done;