Makefile.am revision 64b0d60c2872ed6c788dd245b92dea95c095b8a3
1# Beware this is autogenerated by index.py
2INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I@srcdir@/include @THREAD_CFLAGS@ @Z_CFLAGS@
3DEPS = $(top_builddir)/libxml2.la
4LDADDS = @STATIC_BINARIES@ $(top_builddir)/libxml2.la @THREAD_LIBS@ @Z_LIBS@ $(ICONV_LIBS) -lm @WIN32_EXTRA_LIBADD@
5
6rebuild: examples.xml index.html
7
8examples.xml: index.py *.c
9	-@($(srcdir)/index.py)
10
11index.html: examples.xml examples.xsl
12	-@(xsltproc examples.xsl examples.xml && echo "Rebuilt web page" && xmllint --valid --noout index.html)
13
14install-data-local: 
15	@MKDIR_P@ $(DESTDIR)$(HTML_DIR)
16	-@INSTALL@ -m 0644 $(srcdir)/*.html $(srcdir)/*.c $(srcdir)/*.xml $(srcdir)/*.xsl $(srcdir)/*.res $(DESTDIR)$(HTML_DIR)
17
18EXTRA_DIST=examples.xsl index.py examples.xml writer.xml test3.xml tst.xml test1.xml test2.xml io2.res xpath2.res tree1.res reader4.res io1.res tree2.res reader3.res xpath1.res reader1.res 
19
20noinst_PROGRAMS=xpath2 reader1 reader4 parse2 reader2 parse3 reader3 tree2 parse4 io2 testWriter io1 xpath1 parse1 tree1 
21
22xpath2_SOURCES=xpath2.c
23xpath2_LDFLAGS=
24xpath2_DEPENDENCIES= $(DEPS)
25xpath2_LDADD= @RDL_LIBS@ $(LDADDS)
26
27reader1_SOURCES=reader1.c
28reader1_LDFLAGS=
29reader1_DEPENDENCIES= $(DEPS)
30reader1_LDADD= @RDL_LIBS@ $(LDADDS)
31
32reader4_SOURCES=reader4.c
33reader4_LDFLAGS=
34reader4_DEPENDENCIES= $(DEPS)
35reader4_LDADD= @RDL_LIBS@ $(LDADDS)
36
37parse2_SOURCES=parse2.c
38parse2_LDFLAGS=
39parse2_DEPENDENCIES= $(DEPS)
40parse2_LDADD= @RDL_LIBS@ $(LDADDS)
41
42reader2_SOURCES=reader2.c
43reader2_LDFLAGS=
44reader2_DEPENDENCIES= $(DEPS)
45reader2_LDADD= @RDL_LIBS@ $(LDADDS)
46
47parse3_SOURCES=parse3.c
48parse3_LDFLAGS=
49parse3_DEPENDENCIES= $(DEPS)
50parse3_LDADD= @RDL_LIBS@ $(LDADDS)
51
52reader3_SOURCES=reader3.c
53reader3_LDFLAGS=
54reader3_DEPENDENCIES= $(DEPS)
55reader3_LDADD= @RDL_LIBS@ $(LDADDS)
56
57tree2_SOURCES=tree2.c
58tree2_LDFLAGS=
59tree2_DEPENDENCIES= $(DEPS)
60tree2_LDADD= @RDL_LIBS@ $(LDADDS)
61
62parse4_SOURCES=parse4.c
63parse4_LDFLAGS=
64parse4_DEPENDENCIES= $(DEPS)
65parse4_LDADD= @RDL_LIBS@ $(LDADDS)
66
67io2_SOURCES=io2.c
68io2_LDFLAGS=
69io2_DEPENDENCIES= $(DEPS)
70io2_LDADD= @RDL_LIBS@ $(LDADDS)
71
72testWriter_SOURCES=testWriter.c
73testWriter_LDFLAGS=
74testWriter_DEPENDENCIES= $(DEPS)
75testWriter_LDADD= @RDL_LIBS@ $(LDADDS)
76
77io1_SOURCES=io1.c
78io1_LDFLAGS=
79io1_DEPENDENCIES= $(DEPS)
80io1_LDADD= @RDL_LIBS@ $(LDADDS)
81
82xpath1_SOURCES=xpath1.c
83xpath1_LDFLAGS=
84xpath1_DEPENDENCIES= $(DEPS)
85xpath1_LDADD= @RDL_LIBS@ $(LDADDS)
86
87parse1_SOURCES=parse1.c
88parse1_LDFLAGS=
89parse1_DEPENDENCIES= $(DEPS)
90parse1_LDADD= @RDL_LIBS@ $(LDADDS)
91
92tree1_SOURCES=tree1.c
93tree1_LDFLAGS=
94tree1_DEPENDENCIES= $(DEPS)
95tree1_LDADD= @RDL_LIBS@ $(LDADDS)
96
97valgrind: 
98	$(MAKE) CHECKER='valgrind' tests
99
100tests: $(noinst_PROGRAMS)
101	@(echo '## examples regression tests')
102	@(echo > .memdump)
103	@($(CHECKER) ./xpath2 test3.xml '//discarded' discarded > xpath2.tmp ; diff xpath2.tmp xpath2.res ; rm xpath2.tmp)
104	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
105	@($(CHECKER) ./reader1 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp)
106	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
107	@($(CHECKER) ./reader4 test1.xml test2.xml test3.xml > reader4.tmp ; diff reader4.tmp reader4.res ; rm reader4.tmp)
108	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
109	@($(CHECKER) ./parse2 test2.xml)
110	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
111	@($(CHECKER) ./reader2 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp)
112	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
113	@($(CHECKER) ./parse3)
114	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
115	@($(CHECKER) ./reader3 > reader3.tmp ; diff reader3.tmp reader3.res ; rm reader3.tmp)
116	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
117	@($(CHECKER) ./tree2 > tree2.tmp ; diff tree2.tmp tree2.res ; rm tree2.tmp)
118	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
119	@($(CHECKER) ./parse4 test3.xml)
120	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
121	@($(CHECKER) ./io2 > io2.tmp ; diff io2.tmp io2.res ; rm -f io2.tmp)
122	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
123	@($(CHECKER) ./testWriter ; for i in 1 2 3 4 ; do diff writer.xml writer$$i.res ; done ; rm writer*.res)
124	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
125	@($(CHECKER) ./io1 > io1.tmp ; diff io1.tmp io1.res ; rm -f io1.tmp)
126	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
127	@($(CHECKER) ././xpath1 test3.xml '//child2' > xpath1.tmp ; diff xpath1.tmp xpath1.res ; rm xpath1.tmp)
128	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
129	@($(CHECKER) ./parse1 test1.xml)
130	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
131	@($(CHECKER) ./tree1 test2.xml > tree1.tmp ; diff tree1.tmp tree1.res ; rm tree1.tmp)
132	@(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
133
134
135