Daniel Veillard | 16ed597 | 2003-11-20 18:22:31 +0000 | [diff] [blame] | 1 | # Beware this is autogenerated by index.py |
Daniel Veillard | 8d7b5c7 | 2003-11-15 18:24:36 +0000 | [diff] [blame] | 2 | HTML_DIR=$(datadir)/doc |
| 3 | DOC_MODULE=libxml2-$(VERSION) |
| 4 | TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)/examples |
| 5 | |
Daniel Veillard | 7ecced5 | 2003-12-18 14:22:09 +0000 | [diff] [blame] | 6 | INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I@srcdir@/include @THREAD_CFLAGS@ @Z_CFLAGS@ |
Daniel Veillard | d8cf906 | 2003-11-11 21:12:36 +0000 | [diff] [blame] | 7 | DEPS = $(top_builddir)/libxml2.la |
| 8 | LDADDS = @STATIC_BINARIES@ $(top_builddir)/libxml2.la @THREAD_LIBS@ @Z_LIBS@ $(ICONV_LIBS) -lm @WIN32_EXTRA_LIBADD@ |
| 9 | |
Daniel Veillard | f2a1283 | 2003-11-24 13:04:35 +0000 | [diff] [blame] | 10 | rebuild: examples.xml index.html |
Daniel Veillard | d8cf906 | 2003-11-11 21:12:36 +0000 | [diff] [blame] | 11 | |
| 12 | examples.xml: index.py *.c |
| 13 | -@($(srcdir)/index.py) |
Daniel Veillard | b72876d | 2003-11-12 00:40:33 +0000 | [diff] [blame] | 14 | |
| 15 | index.html: examples.xml examples.xsl |
| 16 | -@(xsltproc examples.xsl examples.xml && echo "Rebuilt web page" && xmllint --valid --noout index.html) |
Daniel Veillard | 8c03401 | 2003-11-12 16:54:26 +0000 | [diff] [blame] | 17 | |
Daniel Veillard | 8d7b5c7 | 2003-11-15 18:24:36 +0000 | [diff] [blame] | 18 | install-data-local: |
| 19 | $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR) |
Daniel Veillard | b286d84 | 2003-12-17 15:08:55 +0000 | [diff] [blame] | 20 | -@INSTALL@ -m 0644 $(srcdir)/*.html $(srcdir)/*.c $(srcdir)/*.xml $(srcdir)/*.xsl $(srcdir)/*.res $(DESTDIR)$(TARGET_DIR) |
Daniel Veillard | 8d7b5c7 | 2003-11-15 18:24:36 +0000 | [diff] [blame] | 21 | |
Daniel Veillard | 4773df2 | 2004-01-23 13:15:13 +0000 | [diff] [blame] | 22 | EXTRA_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 Veillard | 8c03401 | 2003-11-12 16:54:26 +0000 | [diff] [blame] | 23 | |
Daniel Veillard | 4773df2 | 2004-01-23 13:15:13 +0000 | [diff] [blame] | 24 | noinst_PROGRAMS=xpath1 parse1 parse2 tree1 tree2 testWriter reader1 reader2 reader3 io1 |
Daniel Veillard | 241e19d | 2003-11-13 10:39:27 +0000 | [diff] [blame] | 25 | |
| 26 | xpath1_SOURCES=xpath1.c |
| 27 | xpath1_LDFLAGS= |
| 28 | xpath1_DEPENDENCIES= $(DEPS) |
| 29 | xpath1_LDADD= @RDL_LIBS@ $(LDADDS) |
Daniel Veillard | 8c03401 | 2003-11-12 16:54:26 +0000 | [diff] [blame] | 30 | |
| 31 | parse1_SOURCES=parse1.c |
| 32 | parse1_LDFLAGS= |
| 33 | parse1_DEPENDENCIES= $(DEPS) |
| 34 | parse1_LDADD= @RDL_LIBS@ $(LDADDS) |
| 35 | |
Daniel Veillard | a59853a | 2003-11-12 22:50:47 +0000 | [diff] [blame] | 36 | parse2_SOURCES=parse2.c |
| 37 | parse2_LDFLAGS= |
| 38 | parse2_DEPENDENCIES= $(DEPS) |
| 39 | parse2_LDADD= @RDL_LIBS@ $(LDADDS) |
| 40 | |
Daniel Veillard | d9d63d6 | 2003-11-13 11:45:43 +0000 | [diff] [blame] | 41 | tree1_SOURCES=tree1.c |
| 42 | tree1_LDFLAGS= |
| 43 | tree1_DEPENDENCIES= $(DEPS) |
| 44 | tree1_LDADD= @RDL_LIBS@ $(LDADDS) |
| 45 | |
Daniel Veillard | a152c4d | 2003-11-19 16:24:26 +0000 | [diff] [blame] | 46 | tree2_SOURCES=tree2.c |
| 47 | tree2_LDFLAGS= |
| 48 | tree2_DEPENDENCIES= $(DEPS) |
| 49 | tree2_LDADD= @RDL_LIBS@ $(LDADDS) |
| 50 | |
Daniel Veillard | 5841f0e | 2003-11-20 11:59:09 +0000 | [diff] [blame] | 51 | testWriter_SOURCES=testWriter.c |
| 52 | testWriter_LDFLAGS= |
| 53 | testWriter_DEPENDENCIES= $(DEPS) |
| 54 | testWriter_LDADD= @RDL_LIBS@ $(LDADDS) |
| 55 | |
Daniel Veillard | 16ed597 | 2003-11-20 18:22:31 +0000 | [diff] [blame] | 56 | reader1_SOURCES=reader1.c |
| 57 | reader1_LDFLAGS= |
| 58 | reader1_DEPENDENCIES= $(DEPS) |
| 59 | reader1_LDADD= @RDL_LIBS@ $(LDADDS) |
| 60 | |
| 61 | reader2_SOURCES=reader2.c |
| 62 | reader2_LDFLAGS= |
| 63 | reader2_DEPENDENCIES= $(DEPS) |
| 64 | reader2_LDADD= @RDL_LIBS@ $(LDADDS) |
| 65 | |
Daniel Veillard | 1e90661 | 2003-12-05 14:57:46 +0000 | [diff] [blame] | 66 | reader3_SOURCES=reader3.c |
| 67 | reader3_LDFLAGS= |
| 68 | reader3_DEPENDENCIES= $(DEPS) |
| 69 | reader3_LDADD= @RDL_LIBS@ $(LDADDS) |
| 70 | |
Daniel Veillard | 4773df2 | 2004-01-23 13:15:13 +0000 | [diff] [blame] | 71 | io1_SOURCES=io1.c |
| 72 | io1_LDFLAGS= |
| 73 | io1_DEPENDENCIES= $(DEPS) |
| 74 | io1_LDADD= @RDL_LIBS@ $(LDADDS) |
| 75 | |
Daniel Veillard | a59853a | 2003-11-12 22:50:47 +0000 | [diff] [blame] | 76 | tests: $(noinst_PROGRAMS) |
Daniel Veillard | 4773df2 | 2004-01-23 13:15:13 +0000 | [diff] [blame] | 77 | @(echo > .memdump) |
Daniel Veillard | c3a429a | 2004-01-26 11:55:11 +0000 | [diff] [blame^] | 78 | @(./parse1 test1.xml) |
Daniel Veillard | 4773df2 | 2004-01-23 13:15:13 +0000 | [diff] [blame] | 79 | @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) |
Daniel Veillard | c3a429a | 2004-01-26 11:55:11 +0000 | [diff] [blame^] | 80 | @(./parse2 test2.xml) |
Daniel Veillard | 4773df2 | 2004-01-23 13:15:13 +0000 | [diff] [blame] | 81 | @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) |
Daniel Veillard | c3a429a | 2004-01-26 11:55:11 +0000 | [diff] [blame^] | 82 | @(./tree1 test2.xml > tree1.tmp ; diff tree1.tmp tree1.res ; rm tree1.tmp) |
Daniel Veillard | 4773df2 | 2004-01-23 13:15:13 +0000 | [diff] [blame] | 83 | @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) |
Daniel Veillard | c3a429a | 2004-01-26 11:55:11 +0000 | [diff] [blame^] | 84 | @(./tree2 > tree2.tmp ; diff tree2.tmp tree2.res ; rm tree2.tmp) |
Daniel Veillard | 4773df2 | 2004-01-23 13:15:13 +0000 | [diff] [blame] | 85 | @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) |
Daniel Veillard | c3a429a | 2004-01-26 11:55:11 +0000 | [diff] [blame^] | 86 | @(./testWriter ; for i in 1 2 3 4 ; do diff writer.xml writer$$i.res ; done ; rm writer*.res) |
Daniel Veillard | 4773df2 | 2004-01-23 13:15:13 +0000 | [diff] [blame] | 87 | @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) |
Daniel Veillard | c3a429a | 2004-01-26 11:55:11 +0000 | [diff] [blame^] | 88 | @(./reader1 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp) |
Daniel Veillard | 4773df2 | 2004-01-23 13:15:13 +0000 | [diff] [blame] | 89 | @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) |
Daniel Veillard | c3a429a | 2004-01-26 11:55:11 +0000 | [diff] [blame^] | 90 | @(./reader2 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp) |
Daniel Veillard | 4773df2 | 2004-01-23 13:15:13 +0000 | [diff] [blame] | 91 | @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) |
Daniel Veillard | c3a429a | 2004-01-26 11:55:11 +0000 | [diff] [blame^] | 92 | @(./reader3 > reader3.tmp ; diff reader3.tmp reader3.res ; rm reader3.tmp) |
Daniel Veillard | 4773df2 | 2004-01-23 13:15:13 +0000 | [diff] [blame] | 93 | @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) |
Daniel Veillard | c3a429a | 2004-01-26 11:55:11 +0000 | [diff] [blame^] | 94 | @(./io1 > io1.tmp ; diff io1.tmp io1.res ; rm -f io1.tmp) |
Daniel Veillard | 4773df2 | 2004-01-23 13:15:13 +0000 | [diff] [blame] | 95 | @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) |
Daniel Veillard | a59853a | 2003-11-12 22:50:47 +0000 | [diff] [blame] | 96 | |
| 97 | |