Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
80 lines (69 loc) · 1.93 KB
/
Copy pathMakefile
File metadata and controls
80 lines (69 loc) · 1.93 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# GNUMakefile for test
RM=rm -f
CMP=:
ECHO=echo
PYTHON=python2
PYTHON3=python3
PDF2TXT=PYTHONPATH=.. $(PYTHON) ../tools/pdf2txt.py -p1 -V
PDF2TXT3=PYTHONPATH=.. $(PYTHON3) ../tools/pdf2txt.py -p1 -V
FREE= \
simple1 \
simple2 \
simple3 \
jo
NONFREE= \
nonfree/dmca \
nonfree/f1040nr \
nonfree/i1040nr \
nonfree/kampo \
nonfree/naacl06-shinyama \
nonfree/nlp2004slides
TESTS=$(FREE) $(NONFREE)
CRYPT_PASS1=foo
CRYPT_PASS2=baz
CRYPT_BASE=encryption/base
CRYPTS= \
encryption/rc4-40 \
encryption/rc4-128 \
encryption/aes-128 \
encryption/aes-128-m \
encryption/aes-256 \
encryption/aes-256-m
all: tests crypts
tests:
for i in $(TESTS); do \
$(ECHO) $$i; \
$(PDF2TXT) -t html -o $$i.html $$i.pdf || exit 1; \
$(CMP) $$i.html $$i.html.ref || exit 1; \
$(PDF2TXT) -t xml -o $$i.xml $$i.pdf || exit 1; \
$(CMP) $$i.xml $$i.xml.ref || exit 1; \
$(PDF2TXT) -t text -o $$i.txt $$i.pdf || exit 1; \
$(CMP) $$i.txt $$i.txt.ref || exit 1; \
$(PDF2TXT3) -t html -o $$i.html $$i.pdf || exit 1; \
$(CMP) $$i.html $$i.html.ref || exit 1; \
$(PDF2TXT3) -t xml -o $$i.xml $$i.pdf || exit 1; \
$(CMP) $$i.xml $$i.xml.ref || exit 1; \
$(PDF2TXT3) -t text -o $$i.txt $$i.pdf || exit 1; \
$(CMP) $$i.txt $$i.txt.ref || exit 1; \
done
crypts:
for i in $(CRYPTS); do \
$(ECHO) $$i; \
$(PDF2TXT) -t xml -P $(CRYPT_PASS1) -o $$i.1.xml $$i.pdf || exit 1; \
$(CMP) $$i.1.xml $(CRYPT_BASE).xml || exit 1; \
$(PDF2TXT) -t xml -P $(CRYPT_PASS2) -o $$i.2.xml $$i.pdf || exit 1; \
$(CMP) $$i.2.xml $(CRYPT_BASE).xml || exit 1; \
$(PDF2TXT3) -t xml -P $(CRYPT_PASS1) -o $$i.1.xml $$i.pdf || exit 1; \
$(CMP) $$i.1.xml $(CRYPT_BASE).xml || exit 1; \
$(PDF2TXT3) -t xml -P $(CRYPT_PASS2) -o $$i.2.xml $$i.pdf || exit 1; \
$(CMP) $$i.2.xml $(CRYPT_BASE).xml || exit 1; \
done
test:
$(MAKE) all CMP=cmp
clean:
-for i in $(TESTS); do \
$(RM) $$i.html $$i.xml $$i.txt; \
done
-for i in $(CRYPTS); do \
$(RM) $$i.1.xml $$i.2.xml; \
done