Makefile.am 4.9 KB

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