blob: 3c1eb0635e3f35c13be771ca7230db1e6d9a839c [file] [log] [blame]
Daniel Veillard16ed5972003-11-20 18:22:31 +00001# Beware this is autogenerated by index.py
Daniel Veillard8d7b5c72003-11-15 18:24:36 +00002HTML_DIR=$(datadir)/doc
3DOC_MODULE=libxml2-$(VERSION)
4TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)/examples
5
Daniel Veillard7ecced52003-12-18 14:22:09 +00006INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I@srcdir@/include @THREAD_CFLAGS@ @Z_CFLAGS@
Daniel Veillardd8cf9062003-11-11 21:12:36 +00007DEPS = $(top_builddir)/libxml2.la
8LDADDS = @STATIC_BINARIES@ $(top_builddir)/libxml2.la @THREAD_LIBS@ @Z_LIBS@ $(ICONV_LIBS) -lm @WIN32_EXTRA_LIBADD@
9
Daniel Veillardf2a12832003-11-24 13:04:35 +000010rebuild: examples.xml index.html
Daniel Veillardd8cf9062003-11-11 21:12:36 +000011
12examples.xml: index.py *.c
13 -@($(srcdir)/index.py)
Daniel Veillardb72876d2003-11-12 00:40:33 +000014
15index.html: examples.xml examples.xsl
16 -@(xsltproc examples.xsl examples.xml && echo "Rebuilt web page" && xmllint --valid --noout index.html)
Daniel Veillard8c034012003-11-12 16:54:26 +000017
Daniel Veillard8d7b5c72003-11-15 18:24:36 +000018install-data-local:
19 $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)
Daniel Veillardb286d842003-12-17 15:08:55 +000020 -@INSTALL@ -m 0644 $(srcdir)/*.html $(srcdir)/*.c $(srcdir)/*.xml $(srcdir)/*.xsl $(srcdir)/*.res $(DESTDIR)$(TARGET_DIR)
Daniel Veillard8d7b5c72003-11-15 18:24:36 +000021
Daniel Veillard4773df22004-01-23 13:15:13 +000022EXTRA_DIST=examples.xsl index.py test1.xml examples.xml test2.xml writer.xml test3.xml reader1.res reader3.res tree1.res tree2.res io1.res
Daniel Veillard8c034012003-11-12 16:54:26 +000023
Daniel Veillard4773df22004-01-23 13:15:13 +000024noinst_PROGRAMS=xpath1 parse1 parse2 tree1 tree2 testWriter reader1 reader2 reader3 io1
Daniel Veillard241e19d2003-11-13 10:39:27 +000025
26xpath1_SOURCES=xpath1.c
27xpath1_LDFLAGS=
28xpath1_DEPENDENCIES= $(DEPS)
29xpath1_LDADD= @RDL_LIBS@ $(LDADDS)
Daniel Veillard8c034012003-11-12 16:54:26 +000030
31parse1_SOURCES=parse1.c
32parse1_LDFLAGS=
33parse1_DEPENDENCIES= $(DEPS)
34parse1_LDADD= @RDL_LIBS@ $(LDADDS)
35
Daniel Veillarda59853a2003-11-12 22:50:47 +000036parse2_SOURCES=parse2.c
37parse2_LDFLAGS=
38parse2_DEPENDENCIES= $(DEPS)
39parse2_LDADD= @RDL_LIBS@ $(LDADDS)
40
Daniel Veillardd9d63d62003-11-13 11:45:43 +000041tree1_SOURCES=tree1.c
42tree1_LDFLAGS=
43tree1_DEPENDENCIES= $(DEPS)
44tree1_LDADD= @RDL_LIBS@ $(LDADDS)
45
Daniel Veillarda152c4d2003-11-19 16:24:26 +000046tree2_SOURCES=tree2.c
47tree2_LDFLAGS=
48tree2_DEPENDENCIES= $(DEPS)
49tree2_LDADD= @RDL_LIBS@ $(LDADDS)
50
Daniel Veillard5841f0e2003-11-20 11:59:09 +000051testWriter_SOURCES=testWriter.c
52testWriter_LDFLAGS=
53testWriter_DEPENDENCIES= $(DEPS)
54testWriter_LDADD= @RDL_LIBS@ $(LDADDS)
55
Daniel Veillard16ed5972003-11-20 18:22:31 +000056reader1_SOURCES=reader1.c
57reader1_LDFLAGS=
58reader1_DEPENDENCIES= $(DEPS)
59reader1_LDADD= @RDL_LIBS@ $(LDADDS)
60
61reader2_SOURCES=reader2.c
62reader2_LDFLAGS=
63reader2_DEPENDENCIES= $(DEPS)
64reader2_LDADD= @RDL_LIBS@ $(LDADDS)
65
Daniel Veillard1e906612003-12-05 14:57:46 +000066reader3_SOURCES=reader3.c
67reader3_LDFLAGS=
68reader3_DEPENDENCIES= $(DEPS)
69reader3_LDADD= @RDL_LIBS@ $(LDADDS)
70
Daniel Veillard4773df22004-01-23 13:15:13 +000071io1_SOURCES=io1.c
72io1_LDFLAGS=
73io1_DEPENDENCIES= $(DEPS)
74io1_LDADD= @RDL_LIBS@ $(LDADDS)
75
Daniel Veillarda59853a2003-11-12 22:50:47 +000076tests: $(noinst_PROGRAMS)
Daniel Veillard4773df22004-01-23 13:15:13 +000077 @(echo > .memdump)
Daniel Veillardc3a429a2004-01-26 11:55:11 +000078 @(./parse1 test1.xml)
Daniel Veillard4773df22004-01-23 13:15:13 +000079 @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
Daniel Veillardc3a429a2004-01-26 11:55:11 +000080 @(./parse2 test2.xml)
Daniel Veillard4773df22004-01-23 13:15:13 +000081 @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
Daniel Veillardc3a429a2004-01-26 11:55:11 +000082 @(./tree1 test2.xml > tree1.tmp ; diff tree1.tmp tree1.res ; rm tree1.tmp)
Daniel Veillard4773df22004-01-23 13:15:13 +000083 @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
Daniel Veillardc3a429a2004-01-26 11:55:11 +000084 @(./tree2 > tree2.tmp ; diff tree2.tmp tree2.res ; rm tree2.tmp)
Daniel Veillard4773df22004-01-23 13:15:13 +000085 @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
Daniel Veillardc3a429a2004-01-26 11:55:11 +000086 @(./testWriter ; for i in 1 2 3 4 ; do diff writer.xml writer$$i.res ; done ; rm writer*.res)
Daniel Veillard4773df22004-01-23 13:15:13 +000087 @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
Daniel Veillardc3a429a2004-01-26 11:55:11 +000088 @(./reader1 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp)
Daniel Veillard4773df22004-01-23 13:15:13 +000089 @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
Daniel Veillardc3a429a2004-01-26 11:55:11 +000090 @(./reader2 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp)
Daniel Veillard4773df22004-01-23 13:15:13 +000091 @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
Daniel Veillardc3a429a2004-01-26 11:55:11 +000092 @(./reader3 > reader3.tmp ; diff reader3.tmp reader3.res ; rm reader3.tmp)
Daniel Veillard4773df22004-01-23 13:15:13 +000093 @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
Daniel Veillardc3a429a2004-01-26 11:55:11 +000094 @(./io1 > io1.tmp ; diff io1.tmp io1.res ; rm -f io1.tmp)
Daniel Veillard4773df22004-01-23 13:15:13 +000095 @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
Daniel Veillarda59853a2003-11-12 22:50:47 +000096
97