1 |
greg |
1.2 |
# RCSid $Id: Makefile,v 1.1 2019/02/12 22:54:19 greg Exp $ |
2 |
greg |
1.1 |
# |
3 |
|
|
# Tests for tools built in ray/src/cal directory. |
4 |
|
|
# |
5 |
|
|
|
6 |
greg |
1.2 |
all: test-cnt test-rcalc test-total test-histo test-rlam \ |
7 |
|
|
test-tabfunc test-rsplit test-ev |
8 |
greg |
1.1 |
|
9 |
|
|
clean: |
10 |
greg |
1.2 |
rm -f cnt.txt rcalc.txt total.txt histo.txt rlam.txt \ |
11 |
|
|
tabfunc.cal tabfunc.txt cfirst.txt cthird.txt evout.txt |
12 |
greg |
1.1 |
|
13 |
|
|
test-cnt: cnt.txt |
14 |
|
|
radcompare ref/cnt.txt cnt.txt |
15 |
|
|
|
16 |
|
|
test-rcalc: rcalc.txt |
17 |
|
|
radcompare ref/rcalc.txt rcalc.txt |
18 |
|
|
|
19 |
|
|
test-total: total.txt |
20 |
|
|
radcompare ref/total.txt total.txt |
21 |
|
|
|
22 |
|
|
test-histo: histo.txt |
23 |
|
|
radcompare ref/histo.txt histo.txt |
24 |
|
|
|
25 |
|
|
test-rlam: rlam.txt |
26 |
|
|
radcompare ref/rlam.txt rlam.txt |
27 |
|
|
|
28 |
greg |
1.2 |
test-tabfunc: tabfunc.txt |
29 |
|
|
radcompare ref/tabfunc.txt tabfunc.txt |
30 |
|
|
|
31 |
|
|
test-rsplit: cfirst.txt cthird.txt |
32 |
|
|
radcompare ref/cfirst.txt cfirst.txt |
33 |
|
|
radcompare ref/cthird.txt cthird.txt |
34 |
|
|
|
35 |
|
|
test-ev: evout.txt |
36 |
|
|
radcompare ref/evout.txt evout.txt |
37 |
|
|
|
38 |
greg |
1.1 |
cnt.txt: |
39 |
|
|
cnt 5 3 2 > cnt.txt |
40 |
|
|
|
41 |
|
|
rcalc.txt: cnt.txt |
42 |
|
|
rcalc -o 'Test $${v1} $$(s1) $${v2}' \ |
43 |
|
|
-e 'v1=$$1*$$2;v2=($$2-$$1)*exp($$3)' -s s1=HEY cnt.txt > rcalc.txt |
44 |
|
|
|
45 |
|
|
total.txt: cnt.txt |
46 |
|
|
total cnt.txt > total.txt |
47 |
|
|
total -l cnt.txt >> total.txt |
48 |
|
|
total -u cnt.txt >> total.txt |
49 |
|
|
total -m cnt.txt >> total.txt |
50 |
|
|
total -s2.5 cnt.txt >> total.txt |
51 |
|
|
total -3 -r cnt.txt >> total.txt |
52 |
|
|
|
53 |
|
|
histo.txt: total.txt |
54 |
|
|
histo 0 60 5 < total.txt > histo.txt |
55 |
|
|
|
56 |
|
|
rlam.txt: total.txt cnt.txt histo.txt |
57 |
|
|
rlam -in 5 total.txt cnt.txt histo.txt > rlam.txt |
58 |
greg |
1.2 |
|
59 |
|
|
tabfunc.txt: tabfunc.cal |
60 |
|
|
cnt 50 | rcalc -f tabfunc.cal -e 'xv=$$1+5' \ |
61 |
|
|
-e '$$1=cfirst(xv);$$2=csecond(xv);$$3=cthird(xv)' > tabfunc.txt |
62 |
|
|
|
63 |
|
|
tabfunc.cal: histo.txt |
64 |
|
|
tabfunc -i cfirst csecond cthird < histo.txt > tabfunc.cal |
65 |
|
|
|
66 |
|
|
cfirst.txt cthird.txt: tabfunc.txt |
67 |
|
|
rsplit -on 11 -f '-t ' - . cthird.txt < tabfunc.txt > cfirst.txt |
68 |
|
|
|
69 |
|
|
evout.txt: |
70 |
|
|
ev 'sin(0.9353)' 'sqrt(2)' 'log(atan(.5)+3.917)' > evout.txt |