Makefile 4.82 KB
Newer Older
Anthony LICK's avatar
Anthony LICK committed
1
all: dist.dat axis-count.tex size-gte-100.tex matrices xslt.dat xqy.dat coverage-size.tex coverage-axis-step.tex numqueries.tex MAXcount.tex composition.tex composition_full.tex all-full-cov-pc.tex all-full-cov.tex
2 3

SHELL := /bin/bash
4 5 6 7

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

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

19 20 21 22 23 24 25 26
# 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
27
numqueries: $(wildcard ../../benchmark/*-full.xml)
28 29 30
	grep '<ast' `grep 'href' benchmarks-all-full.xml | sed -e 's/.*href="\([^"]*\).*/\1/'` | wc -l > $@

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

MAXcount: $(wildcard ../../benchmark/*-full.xml)
	grep 'MAX' `grep 'href' benchmarks-all-full.xml | sed -e 's/.*href="\([^"]*\).*/\1/'` | wc -l > $@

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

39

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

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

Sylvain Schmitz's avatar
Sylvain Schmitz committed
46
dist.dat: numqueries distribution.sh $(wildcard ../../benchmark/*-full.xml)
47
	./distribution.sh 1 > dist.dat
48 49 50 51
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
52

Sylvain Schmitz's avatar
Sylvain Schmitz committed
53 54 55 56 57 58 59 60 61
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
62
xslt-full.cov: coverage.sh full-frags.sh ../../relaxng/fragments-full.xml
Sylvain Schmitz's avatar
Sylvain Schmitz committed
63
	./coverage.sh 'type="xslt"' "`./full-frags.sh ../../relaxng/fragments-full.xml`" > xslt-full.cov
Sylvain Schmitz's avatar
Sylvain Schmitz committed
64 65

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

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

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

xslt.dat: bench.sh xslt-full.cov xslt-orig.cov $(wildcard ../../benchmark/*-full.xml) benchmarks-all-full.xml
75
	./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
76 77

xqy.dat: bench.sh xquery-full.cov xquery-orig.cov $(wildcard ../../benchmark/*-full.xml) benchmarks-all-full.xml
78
	./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
79 80 81

test.pdf: xslt.dat xqy.dat test.tex
	pdflatex --shell-escape test.tex
82

83 84 85 86 87 88
%.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"' $< > $@
89 90

contingency-size.dat: contingency-size.sh benchmarks-all-full.xml $(wildcard ../../benchmark/*-full.xml)
91
	./contingency-size.sh `grep 'href' benchmarks-all-full.xml | sed -e 's/.*href="\([^"]*\).*/\1/'` > $@
92 93 94 95 96

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)
97
	./contingency-axis-step.sh `grep 'href' benchmarks-all-full.xml | sed -e 's/.*href="\([^"]*\).*/\1/'` > $@
98 99 100

chisquare-axis-step: contingency-axis-step.dat chisquare.R
	./chisquare.R contingency-axis-step.dat
101 102 103 104 105 106

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

coverage-axis-step.tex: coverage-axis-step.sh benchmarks-all-full.xml $(wildcard ../../benchmark/*-full.xml)
	./$<  `grep 'href' benchmarks-all-full.xml | sed -e 's/.*href="\([^"]*\).*/\1/'` > $@
107 108 109

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

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