1 # $Id: Makefile.tests 8481 2009-07-13 20:18:41Z abdelazer $
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.
9 # To use it, run "make check" or just "make"
14 TESTFILE
=tests
/refentry
.007.xml
15 TESTFILE_NS
=tests
/refentry
.007.ns.xml
17 NORMAL_STYLES
=fo
/docbook.xsl html
/docbook.xsl xhtml
/docbook.xsl
18 NORMAL_PROFILE_STYLES
=fo
/profile-docbook.xsl html
/profile-docbook.xsl xhtml
/profile-docbook.xsl
19 CHUNK_STYLES
=html
/chunk.xsl html
/onechunk.xsl xhtml
/chunk.xsl xhtml
/onechunk.xsl
20 HELP_STYLES
=htmlhelp
/htmlhelp.xsl javahelp
/javahelp.xsl eclipse
/eclipse.xsl
21 MULTIFILE_STYLES
=$(CHUNK_STYLES
) $(HELP_STYLES
)
22 CHUNK_PROFILE_STYLES
=html
/profile-chunk.xsl html
/profile-onechunk.xsl xhtml
/profile-chunk.xsl xhtml
/profile-onechunk.xsl
23 HELP_PROFILE_STYLES
=htmlhelp
/profile-htmlhelp.xsl eclipse
/profile-eclipse.xsl javahelp
/profile-javahelp.xsl
24 MULTIFILE_PROFILE_STYLES
=$(CHUNK_PROFILE_STYLES
) $(HELP_PROFILE_STYLES
)
26 MAN_STYLE
=manpages
/docbook.xsl
27 MAN_PROFILE_STYLE
=manpages
/profile-docbook.xsl
29 TWO_PROFILE_STYLE
=profiling
/profile.xsl
31 ROUNDTRIP_STYLES
=roundtrip
/dbk2ooo.xsl roundtrip
/dbk2pages.xsl roundtrip
/dbk2wordml.xsl
32 SLIDES_STYLES
=slides
/html
/default.xsl slides
/xhtml
/default.xsl slides
/fo
/plain.xsl
33 WEBSITE_STYLES
=website
/website.xsl
34 WEBSITE_CHUNK_STYLES
=website
/chunk-website.xsl
36 # chunked output gets written to TMP_OUTPUT_DIR
37 TMP_OUTPUT_DIR
=/tmp
/smoketest-output
/
38 # if you don't want TMP_OUTPUT_DIR and its contents deleted, unset
39 # SMOKETEST_CLEAN_TARGET; e.g. "make check SMOKETEST_CLEAN_TARGET=''"
40 SMOKETEST_CLEAN_TARGET
=smoketest-clean
42 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
)
44 smoketest-make-tmp-dir
:
45 $(RM
) -r
$(TMP_OUTPUT_DIR
)
46 mkdir
'$(TMP_OUTPUT_DIR)'
49 for stylesheet in
$(NORMAL_STYLES
); do \
50 echo
"$(XSLT) $(TESTFILE) $$stylesheet > /dev/null"; \
51 $(XSLT
) $(TESTFILE
) $$stylesheet > /dev
/null
; \
52 echo
"$(XSLT) $(TESTFILE_NS) $$stylesheet > /dev/null"; \
53 $(XSLT
) $(TESTFILE_NS
) $$stylesheet > /dev
/null
; \
56 smoketest-normal-profile
:
57 for stylesheet in
$(NORMAL_PROFILE_STYLES
); do \
58 echo
"$(XSLT) $(TESTFILE) $$stylesheet > /dev/null"; \
59 $(XSLT
) $(TESTFILE
) $$stylesheet > /dev
/null
; \
60 echo
"$(XSLT) $(TESTFILE_NS) $$stylesheet > /dev/null"; \
61 $(XSLT
) $(TESTFILE_NS
) $$stylesheet > /dev
/null
; \
65 for stylesheet in
$(MULTIFILE_STYLES
) ; do \
66 $(XSLT
) $(TESTFILE
) $$stylesheet manifest.in.base.
dir=1 base.
dir=$(TMP_OUTPUT_DIR
) ; \
67 $(XSLT
) $(TESTFILE_NS
) $$stylesheet manifest.in.base.
dir=1 base.
dir=$(TMP_OUTPUT_DIR
) ; \
70 smoketest-chunk-profile
:
71 for stylesheet in
$(MULTIFILE_PROFILE_STYLES
) ; do \
72 $(XSLT
) $(TESTFILE
) $$stylesheet manifest.in.base.
dir=1 base.
dir=$(TMP_OUTPUT_DIR
) ; \
73 $(XSLT
) $(TESTFILE_NS
) $$stylesheet manifest.in.base.
dir=1 base.
dir=$(TMP_OUTPUT_DIR
) ; \
77 $(XSLT
) $(TESTFILE
) $(MAN_STYLE
) man.output.in.separate.
dir=1 man.output.base.
dir=$(TMP_OUTPUT_DIR
) ; \
78 $(XSLT
) $(TESTFILE_NS
) $(MAN_STYLE
) man.output.in.separate.
dir=1 man.output.base.
dir=$(TMP_OUTPUT_DIR
) ;
80 smoketest-man-profile
:
81 $(XSLT
) $(TESTFILE
) $(MAN_PROFILE_STYLE
) man.output.in.separate.
dir=1 man.output.base.
dir=$(TMP_OUTPUT_DIR
) ; \
82 $(XSLT
) $(TESTFILE_NS
) $(MAN_PROFILE_STYLE
) man.output.in.separate.
dir=1 man.output.base.
dir=$(TMP_OUTPUT_DIR
) ;
84 smoketest-two-profile
:
85 $(XSLT
) $(TESTFILE_NS
) $(TWO_PROFILE_STYLE
) > /dev
/null
;
88 $(RM
) -r
$(TMP_OUTPUT_DIR
)