1
0

Makefile 3.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. # $Id: Makefile.tests 8481 2009-07-13 20:18:41Z abdelazer $
  2. #
  3. # This makefile does a "smoketest" of stylesheets for various
  4. # output formats in the DocBook XSL Stylesheets release package.
  5. # It doesn't actually check the output -- it's just useful for
  6. # confirming whether each XSLT transformation actually executes
  7. # successfully without any errors.
  8. #
  9. # To use it, run "make check" or just "make"
  10. XSLTPROC=xsltproc
  11. XSLTPROC_FLAGS=
  12. TESTFILE=tests/refentry.007.xml
  13. TESTFILE_NS=tests/refentry.007.ns.xml
  14. NORMAL_STYLES=fo/docbook.xsl html/docbook.xsl xhtml/docbook.xsl
  15. NORMAL_PROFILE_STYLES=fo/profile-docbook.xsl html/profile-docbook.xsl xhtml/profile-docbook.xsl
  16. CHUNK_STYLES=html/chunk.xsl html/onechunk.xsl xhtml/chunk.xsl xhtml/onechunk.xsl
  17. HELP_STYLES=htmlhelp/htmlhelp.xsl javahelp/javahelp.xsl eclipse/eclipse.xsl
  18. MULTIFILE_STYLES=$(CHUNK_STYLES) $(HELP_STYLES)
  19. CHUNK_PROFILE_STYLES=html/profile-chunk.xsl html/profile-onechunk.xsl xhtml/profile-chunk.xsl xhtml/profile-onechunk.xsl
  20. HELP_PROFILE_STYLES=htmlhelp/profile-htmlhelp.xsl eclipse/profile-eclipse.xsl javahelp/profile-javahelp.xsl
  21. MULTIFILE_PROFILE_STYLES=$(CHUNK_PROFILE_STYLES) $(HELP_PROFILE_STYLES)
  22. MAN_STYLE=manpages/docbook.xsl
  23. MAN_PROFILE_STYLE=manpages/profile-docbook.xsl
  24. TWO_PROFILE_STYLE=profiling/profile.xsl
  25. ROUNDTRIP_STYLES=roundtrip/dbk2ooo.xsl roundtrip/dbk2pages.xsl roundtrip/dbk2wordml.xsl
  26. SLIDES_STYLES=slides/html/default.xsl slides/xhtml/default.xsl slides/fo/plain.xsl
  27. WEBSITE_STYLES=website/website.xsl
  28. WEBSITE_CHUNK_STYLES=website/chunk-website.xsl
  29. # chunked output gets written to TMP_OUTPUT_DIR
  30. TMP_OUTPUT_DIR=/tmp/smoketest-output/
  31. # if you don't want TMP_OUTPUT_DIR and its contents deleted, unset
  32. # SMOKETEST_CLEAN_TARGET; e.g. "make check SMOKETEST_CLEAN_TARGET=''"
  33. SMOKETEST_CLEAN_TARGET=smoketest-clean
  34. check: smoketest-make-tmp-dir smoketest-normal smoketest-normal-profile smoketest-chunk smoketest-chunk-profile smoketest-man smoketest-man-profile smoketest-two-profile $(SMOKETEST_CLEAN_TARGET)
  35. smoketest-make-tmp-dir:
  36. $(RM) -r $(TMP_OUTPUT_DIR)
  37. mkdir '$(TMP_OUTPUT_DIR)'
  38. smoketest-normal:
  39. for stylesheet in $(NORMAL_STYLES); do \
  40. echo "$(XSLT) $(TESTFILE) $$stylesheet > /dev/null"; \
  41. $(XSLT) $(TESTFILE) $$stylesheet > /dev/null; \
  42. echo "$(XSLT) $(TESTFILE_NS) $$stylesheet > /dev/null"; \
  43. $(XSLT) $(TESTFILE_NS) $$stylesheet > /dev/null; \
  44. done
  45. smoketest-normal-profile:
  46. for stylesheet in $(NORMAL_PROFILE_STYLES); do \
  47. echo "$(XSLT) $(TESTFILE) $$stylesheet > /dev/null"; \
  48. $(XSLT) $(TESTFILE) $$stylesheet > /dev/null; \
  49. echo "$(XSLT) $(TESTFILE_NS) $$stylesheet > /dev/null"; \
  50. $(XSLT) $(TESTFILE_NS) $$stylesheet > /dev/null; \
  51. done
  52. smoketest-chunk:
  53. for stylesheet in $(MULTIFILE_STYLES) ; do \
  54. $(XSLT) $(TESTFILE) $$stylesheet manifest.in.base.dir=1 base.dir=$(TMP_OUTPUT_DIR) ; \
  55. $(XSLT) $(TESTFILE_NS) $$stylesheet manifest.in.base.dir=1 base.dir=$(TMP_OUTPUT_DIR) ; \
  56. done;
  57. smoketest-chunk-profile:
  58. for stylesheet in $(MULTIFILE_PROFILE_STYLES) ; do \
  59. $(XSLT) $(TESTFILE) $$stylesheet manifest.in.base.dir=1 base.dir=$(TMP_OUTPUT_DIR) ; \
  60. $(XSLT) $(TESTFILE_NS) $$stylesheet manifest.in.base.dir=1 base.dir=$(TMP_OUTPUT_DIR) ; \
  61. done;
  62. smoketest-man:
  63. $(XSLT) $(TESTFILE) $(MAN_STYLE) man.output.in.separate.dir=1 man.output.base.dir=$(TMP_OUTPUT_DIR) ; \
  64. $(XSLT) $(TESTFILE_NS) $(MAN_STYLE) man.output.in.separate.dir=1 man.output.base.dir=$(TMP_OUTPUT_DIR) ;
  65. smoketest-man-profile:
  66. $(XSLT) $(TESTFILE) $(MAN_PROFILE_STYLE) man.output.in.separate.dir=1 man.output.base.dir=$(TMP_OUTPUT_DIR) ; \
  67. $(XSLT) $(TESTFILE_NS) $(MAN_PROFILE_STYLE) man.output.in.separate.dir=1 man.output.base.dir=$(TMP_OUTPUT_DIR) ;
  68. smoketest-two-profile:
  69. $(XSLT) $(TESTFILE_NS) $(TWO_PROFILE_STYLE) > /dev/null ;
  70. smoketest-clean:
  71. $(RM) -r $(TMP_OUTPUT_DIR)