summaryrefslogtreecommitdiff
path: root/sandbox/docbook/scripts/test/makefile
blob: 8633d47c6a6a335437964bb5ce2c4df08a4ed68c (plain)
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
all: outfile diff

term: nooutfile diff

outfile: 
	files=`ls *xml`; for the_file in $$files; do \
	     BASE=`basename  $$the_file .xml`;\
	     EXT=`echo "$$the_file"|awk -F . '{print $$NF}'`;\
	     OUT_DIR=final;\
	     OUT_FILE=$$OUT_DIR/$${BASE}_test_;\
	     command="rstxml2xml.py -o $$OUT_FILE $$the_file";\
	     eval $$command;\
	      done

nooutfile: 
	files=`ls *xml`; for the_file in $$files; do \
	     BASE=`basename  $$the_file .xml`;\
	     EXT=`echo "$$the_file"|awk -F . '{print $$NF}'`;\
	     OUT_DIR=final;\
	     OUT_FILE=$$OUT_DIR/$${BASE}_test_;\
	     command="python ../rstxml2xml.py $$the_file" > $$OUT_FILE;\
	     eval $$command;\
	      done
diff:
	cd final; files=`ls *xml`; for the_file in $$files; do \
	     BASE=`basename  $$the_file .xml`;\
	     EXT=`echo "$$the_file"|awk -F . '{print $$NF}'`;\
	     TEST_FILE=$${BASE}_test_;\
	    diff $$the_file $$TEST_FILE;\
	    done

clean:
	rm -f final/*_test_