Makefile 7.11 KB
Newer Older
1
all: dist.dat dist-xquery.dat dist-xslt.dat bnch.dat \
2
  axis-count.tex size-gte-100.tex matrices xslt.dat xqy.dat xslt-std.dat xqy-std.dat coverage-size.tex coverage-axis-step.tex numqueries.tex MAXcount.tex composition.tex composition-bench.tex composition_full.tex all-full-cov-pc.tex all-full-cov.tex occurences_axis.tex occurences_operators.tex occurences_grammar.tex
3 4

SHELL := /bin/bash
5 6 7 8

BENCHMARKS=benchmarks-all.xml \
		   benchmarks-xslt-full.xml benchmarks-xslt.xml \
		   benchmarks-xquery-full.xml benchmarks-xquery.xml 
9
matrices: $(BENCHMARKS) $(wildcard ../../benchmark/*-full.xml) $(wildcard ../../relaxng/fragments-*.xml)
David BAELDE's avatar
David BAELDE committed
10
	rm -f matrix_*_*.tex
11
	ant
12
	touch $@
13 14 15

# Remove generated files
clean: miniclean
16
	rm -f dist.dat axis-count.tex size-gte-100.tex captured_dist.dat
17
	rm -f dist-xquery.dat dist-xslt.dat
18
	rm -f $(BENCHMARKS)
19
	rm -f matrix_*_*.tex totals_*_*.tex matrices
20

21 22 23 24 25 26 27 28
# Remove some generated files that are not useful as end products
miniclean:
	rm -f *gnuplottex-fig*.eps
	rm -f *gnuplottex-fig*.gnuplot
	rm -f *gnuplottex-fig*.tex
	rm -f *gnuplottex-fig*.pdf
	rm -f *.aux *.gnuploterrors *.log

Sylvain Schmitz's avatar
Sylvain Schmitz committed
29
numqueries: $(wildcard ../../benchmark/*-full.xml)
30
	grep '<ast' `grep 'type="\(xslt\|xquery\)"' benchmarks-all-full.xml | sed -e 's/.*href="\([^"]*\).*/\1/'` | wc -l > $@
31 32

numqueries.tex: numqueries
Sylvain Schmitz's avatar
Sylvain Schmitz committed
33 34 35
	printf "%'.0f" `cat $<` > $@

MAXcount: $(wildcard ../../benchmark/*-full.xml)
36
	grep 'MAX' `grep 'type="\(xslt\|xquery\)"' benchmarks-all-full.xml | sed -e 's/.*href="\([^"]*\).*/\1/'` | wc -l > $@
Sylvain Schmitz's avatar
Sylvain Schmitz committed
37 38 39 40

MAXcount.tex: MAXcount
	printf "%'.0f" `cat $<` > $@

41

42
size-gte-100.tex: $(wildcard ../../benchmark/*-full.xml)
43
	./size-gte.sh `grep 'type="\(xslt\|xquery\)"' benchmarks-all-full.xml | sed -e 's/.*href="\([^"]*\).*/\1/'` > $@
Sylvain Schmitz's avatar
Sylvain Schmitz committed
44 45

axis-count.tex: $(wildcard ../../benchmark/*-axis-step.xml)
46
	./axis-count.sh > $@
Sylvain Schmitz's avatar
Sylvain Schmitz committed
47

Sylvain Schmitz's avatar
Sylvain Schmitz committed
48
dist.dat: numqueries distribution.sh $(wildcard ../../benchmark/*-full.xml)
49 50 51 52 53
	./distribution.sh 1 > $@
dist-xquery.dat: numqueries distribution.sh $(wildcard ../../benchmark/*-full.xml)
	FRAGTYPE=xquery ./distribution.sh 1 > $@
dist-xslt.dat: numqueries distribution.sh $(wildcard ../../benchmark/*-full.xml)
	FRAGTYPE=xslt ./distribution.sh 1 > $@
54 55 56 57
captured_dist.dat: $(wildcard ../../benchmark/*-full.xml)
	./captured_distr.sh > captured_dist.dat
captured_dist.pdf: captured_dist.dat captured_dist.tex
	pdflatex --shell-escape captured_dist.tex
58

Sylvain Schmitz's avatar
Sylvain Schmitz committed
59 60 61 62 63 64 65 66 67
all-full.cov: coverage.sh full-frags.sh ../../relaxng/fragments-full.xml
	./coverage.sh "href" "`./full-frags.sh ../../relaxng/fragments-full.xml`" > $@

all-full-cov.tex: all-full.cov
	printf "%'.0f" `cat $<` > $@

all-full-cov-pc.tex: all-full.cov numqueries
	echo "scale=2; 100*`cat all-full.cov`/`cat numqueries`" | bc > $@

Sylvain Schmitz's avatar
Sylvain Schmitz committed
68
xslt-full.cov: coverage.sh full-frags.sh ../../relaxng/fragments-full.xml
Sylvain Schmitz's avatar
Sylvain Schmitz committed
69
	./coverage.sh 'type="xslt"' "`./full-frags.sh ../../relaxng/fragments-full.xml`" > xslt-full.cov
Sylvain Schmitz's avatar
Sylvain Schmitz committed
70 71

xslt-orig.cov: coverage.sh full-frags.sh ../../relaxng/fragments-full.xml
Sylvain Schmitz's avatar
Sylvain Schmitz committed
72
	./coverage.sh 'type="xslt"' "`./full-frags.sh ../../relaxng/fragments-orig.xml`" > xslt-orig.cov
Sylvain Schmitz's avatar
Sylvain Schmitz committed
73

Sylvain Schmitz's avatar
Sylvain Schmitz committed
74
xquery-full.cov: coverage.sh full-frags.sh ../../relaxng/fragments-full.xml
Sylvain Schmitz's avatar
Sylvain Schmitz committed
75
	./coverage.sh 'type="xquery"' "`./full-frags.sh ../../relaxng/fragments-full.xml`" > xquery-full.cov
Sylvain Schmitz's avatar
Sylvain Schmitz committed
76 77

xquery-orig.cov: coverage.sh full-frags.sh ../../relaxng/fragments-full.xml
Sylvain Schmitz's avatar
Sylvain Schmitz committed
78
	./coverage.sh 'type="xquery"' "`./full-frags.sh ../../relaxng/fragments-orig.xml`" > xquery-orig.cov
Sylvain Schmitz's avatar
Sylvain Schmitz committed
79

80 81 82 83 84 85
bnch-full.cov: coverage.sh full-frags.sh ../../relaxng/fragments-full.xml
	./coverage.sh 'type="bench"' "`./full-frags.sh ../../relaxng/fragments-full.xml`" > bnch-full.cov

bnch-orig.cov: coverage.sh full-frags.sh ../../relaxng/fragments-full.xml
	./coverage.sh 'type="bench"' "`./full-frags.sh ../../relaxng/fragments-orig.xml`" > bnch-orig.cov

Sylvain Schmitz's avatar
Sylvain Schmitz committed
86
xslt.dat: bench.sh xslt-full.cov xslt-orig.cov $(wildcard ../../benchmark/*-full.xml) benchmarks-all-full.xml
87
	./bench.sh  xslt-full.cov xslt-orig.cov `grep 'type="xslt"' benchmarks-all-full.xml | sed -e 's/.*href="\([^"]*\).*/\1/'` > xslt.dat 2> minmax-xslt.tex
Sylvain Schmitz's avatar
Sylvain Schmitz committed
88 89

xqy.dat: bench.sh xquery-full.cov xquery-orig.cov $(wildcard ../../benchmark/*-full.xml) benchmarks-all-full.xml
90
	./bench.sh xquery-full.cov xquery-orig.cov `grep 'type="xquery"' benchmarks-all-full.xml | sed -e 's/.*href="\([^"]*\).*/\1/'` > xqy.dat 2> minmax-xqy.tex
91

92 93 94
bnch.dat: bench.sh bnch-full.cov bnch-orig.cov $(wildcard ../../benchmark/*-full.xml) benchmarks-all-full.xml
	./bench.sh bnch-full.cov bnch-orig.cov `grep 'type="bench"' benchmarks-all-full.xml | sed -e 's/.*href="\([^"]*\).*/\1/'` > bnch.dat 2> minmax-bnch.tex

Sylvain Schmitz's avatar
Sylvain Schmitz committed
95
xslt-std.dat: bench-std.sh xslt-full.cov xslt-orig.cov $(wildcard ../../benchmark/*-full.xml) benchmarks-all-full.xml
Sylvain Schmitz's avatar
Sylvain Schmitz committed
96
	./bench-std.sh  xslt-full.cov xslt-orig.cov `grep 'type="xslt"' benchmarks-all-full.xml | sed -e 's/.*href="\([^"]*\).*/\1/'` > $@ 2> minmax-std-xslt.tex
Sylvain Schmitz's avatar
Sylvain Schmitz committed
97 98

xqy-std.dat: bench-std.sh xquery-full.cov xquery-orig.cov $(wildcard ../../benchmark/*-full.xml) benchmarks-all-full.xml
Sylvain Schmitz's avatar
Sylvain Schmitz committed
99
	./bench-std.sh xquery-full.cov xquery-orig.cov `grep 'type="xquery"' benchmarks-all-full.xml | sed -e 's/.*href="\([^"]*\).*/\1/'` > $@ 2> minmax-std-xqy.tex
Sylvain Schmitz's avatar
Sylvain Schmitz committed
100

101
test.pdf: xslt.dat xqy.dat bnch.dat test.tex
102
	pdflatex --shell-escape test.tex
103

104 105 106 107 108 109
%.xml: %-full.xml
	cat $< | sed -e 's/-full.xml/.xml/' > $@
benchmarks-xslt-full.xml: benchmarks-all-full.xml
	grep -v 'type="xquery"' $< > $@
benchmarks-xquery-full.xml: benchmarks-all-full.xml
	grep -v 'type="xslt"' $< > $@
110 111
benchmarks-bench-full.xml: benchmarks-all-full.xml
	grep -v 'type="bench"' $< > $@
112 113

contingency-size.dat: contingency-size.sh benchmarks-all-full.xml $(wildcard ../../benchmark/*-full.xml)
114
	./contingency-size.sh `grep 'type="\(xslt\|xquery\)"' benchmarks-all-full.xml | sed -e 's/.*href="\([^"]*\).*/\1/'` > $@
115 116 117 118 119

chisquare-size: contingency-size.dat chisquare.R
	./chisquare.R contingency-size.dat

contingency-axis-step.dat: contingency-axis-step.sh benchmarks-all-full.xml $(wildcard ../../benchmark/*-full.xml)
120
	./contingency-axis-step.sh `grep 'type="\(xslt\|xquery\)"' benchmarks-all-full.xml | sed -e 's/.*href="\([^"]*\).*/\1/'` > $@
121 122 123

chisquare-axis-step: contingency-axis-step.dat chisquare.R
	./chisquare.R contingency-axis-step.dat
124 125

coverage-size.tex: coverage-size.sh benchmarks-all-full.xml $(wildcard ../../benchmark/*-full.xml)
126
	./$<  `grep 'type="\(xslt\|xquery\)"' benchmarks-all-full.xml | sed -e 's/.*href="\([^"]*\).*/\1/'` > $@
127 128

coverage-axis-step.tex: coverage-axis-step.sh benchmarks-all-full.xml $(wildcard ../../benchmark/*-full.xml)
129
	./$<  `grep 'type="\(xslt\|xquery\)"' benchmarks-all-full.xml | sed -e 's/.*href="\([^"]*\).*/\1/'` > $@
130 131 132

composition.tex: composition.sh benchmarks-all-full.xml $(wildcard ../../benchmark/*-full.xml)
	./$<  > $@
Anthony LICK's avatar
Anthony LICK committed
133

134 135 136
composition-bench.tex: composition-bench.sh benchmarks-all-full.xml $(wildcard ../../benchmark/*-full.xml)
	./$<  > $@

Anthony LICK's avatar
Anthony LICK committed
137 138
composition_full.tex: composition_full.sh benchmarks-all-full.xml $(wildcard ../../benchmark/*-full.xml)
	./$<  > $@
139 140 141 142 143 144

occurences_axis.tex: occurences_axis.sh benchmarks-all-full.xml $(wildcard ../../benchmark/*-full.xml)
	./$<  > $@

occurences_operators.tex: occurences_operators.sh benchmarks-all-full.xml $(wildcard ../../benchmark/*-full.xml)
	./$<  > $@
145 146
occurences_grammar.tex: occurences_grammar.sh benchmarks-all-full.xml $(wildcard ../../benchmark/*-full.xml)
	./$<  > $@