1 # $Id: Makefile,v 1.17 2006-07-20 03:41:23 olpa Exp $
8 good_xml_tests:=$(notdir $(wildcard data/*xml)) quick.xml
9 good_test_stamps=$(addprefix tmp/data/,$(good_xml_tests:.xml=.stamp))
10 fail_xml_tests:=$(notdir $(wildcard faildata/*xml))
11 fail_test_stamps=$(addprefix tmp/faildata/,$(fail_xml_tests:.xml=.stamp))
13 texml_modules:=$(wildcard ../Texml/*py)
14 texml_program_files=$(texml_modules) ../scripts/texml.py
15 texml_script=../scripts/texml_local
18 # Individual test parameters to converter
20 params-mixed = -e ascii
21 params-koi8 = -e koi8-r
22 params-koi8_ns = -e koi8-r
23 params-koi8bad = -e koi8-r
24 params-koi8bad_ns = -e koi8-r
25 params-latex = -e koi8-r
26 params-latex_ns = -e koi8-r
27 params-cmdnest = -e ascii
28 params-wselim2 = -w 100
29 params-wselim2_ns = -w 100
31 params-quick_ns = -w 60
32 params-context = --context -e utf8
33 params-context_ns = --context -e utf8
34 params-chinese1 = -e utf8 -a
35 params-tour_pdfok = -e koi8-r
36 params-aenc = --encoding utf8 -a
38 tests: $(good_test_stamps) $(fail_test_stamps)
41 # Initialization, creation of folders
43 init=tmp/data/.stamp tmp/faildata/.stamp
45 tmp/data/.stamp tmp/faildata/.stamp:
49 # Need a line after "FORCE"
52 # Need a line after "FORCE"
57 # Running "good" tests
59 tmp/data/%.out: data/%.xml $(texml_program_files) data/%.out $(init)
60 $(texml_script) $(call params-$*) $< $@
62 tmp/data/%.stamp: tmp/data/%.out FORCE
63 diff -qs $(basename $@).out data/$(notdir $*).out
66 # Running "bad" tests: if fact, we make grep of error message
68 tmp/faildata/%.err: faildata/%.xml $(texml_program_files) $(init)
69 $(texml_script) $< $(basename $@).out 2>$@ || true
71 tmp/faildata/%.stamp: tmp/faildata/%.err FORCE
72 grep -q -f faildata/$(notdir $*).grep $<
75 # Dependencies for quick start files
77 data/quick.xml: data/quick/quick.texml
80 data/quick.out: data/quick/quick.tex