1 # See comment in ./Makefile.base-vars
4 all: html html-chunk pdf ps
5 all-html: html html-chunk
6 install: install-html install-html-chunk install-pdf install-ps
9 $(VERSION_SOURCE): version
11 @if $(SVNVERSION) . > /dev/null; then \
12 echo '<!ENTITY svn.version "$(L10N_REVISION) '`$(SVNVERSION) .`'">' \
13 > $(VERSION_SOURCE).tmp; \
15 echo '<!ENTITY svn.version "">' > $(VERSION_SOURCE).tmp; \
17 @if cmp -s $(VERSION_SOURCE) $(VERSION_SOURCE).tmp; then \
18 rm $(VERSION_SOURCE).tmp; \
20 mv $(VERSION_SOURCE).tmp $(VERSION_SOURCE); \
24 $(HTML_TARGET): $(ALL_SOURCE) $(VERSION_SOURCE) $(STYLESHEET) $(IMAGES)
26 $(XSLTPROC) $(HTML_XSLTPROC_OPTS) --output $(HTML_TARGET) \
27 $(TOOLS_DIR)/html-stylesheet.xsl $(XML_SOURCE)
29 # The trailing slash on the xsltproc --output option is essential to
30 # output pages into the directory
31 html-chunk: $(HTML_CHUNK_TARGET)
32 $(HTML_CHUNK_TARGET): $(ALL_SOURCE) $(VERSION_SOURCE) $(STYLESHEET) $(IMAGES)
33 mkdir -p $(HTML_CHUNK_DIR)
34 $(IFIMAGES) mkdir -p $(HTML_CHUNK_DIR)/images $(ENDIF)
36 $(XSLTPROC) $(HTML_XSLTPROC_OPTS) \
37 --output $(HTML_CHUNK_DIR)/ \
38 $(TOOLS_DIR)/chunk-stylesheet.xsl $(XML_SOURCE)
39 cp $(STYLESHEET) $(HTML_CHUNK_DIR)
40 $(IFIMAGES) cp $(IMAGES) $(HTML_CHUNK_DIR)/images $(ENDIF)
42 html-arch: $(HTML_ARCH_TARGET)
43 $(HTML_ARCH_TARGET): $(HTML_TARGET) $(IMAGES)
44 rm -rf $(HTML_ARCH_BASENAME) && \
45 $(MAKE) install-html INSTALL_SUBDIR=$(HTML_ARCH_BASENAME) && \
46 $(ARCH_CMD) $@ $(HTML_ARCH_BASENAME) && \
47 rm -rf $(HTML_ARCH_BASENAME)
49 html-chunk-arch: $(HTML_CHUNK_ARCH_TARGET)
50 $(HTML_CHUNK_ARCH_TARGET): $(HTML_CHUNK_TARGET) $(IMAGES)
51 rm -rf $(HTML_CHUNK_ARCH_BASENAME) && \
52 $(MAKE) install-html-chunk \
53 INSTALL_SUBDIR=$(HTML_CHUNK_ARCH_BASENAME) && \
54 $(ARCH_CMD) $@ $(HTML_CHUNK_ARCH_BASENAME) && \
55 rm -rf $(HTML_CHUNK_ARCH_BASENAME)
58 $(FO_TARGET): $(ALL_SOURCE) $(VERSION_SOURCE) $(IMAGES)
60 $(XSLTPROC) $(FO_XSLTPROC_OPTS) --output $(FO_TARGET) \
61 $(TOOLS_DIR)/fo-stylesheet.xsl $(XML_SOURCE)
64 $(PDF_TARGET): $(FO_TARGET) $(IMAGES)
65 $(TOOLS_DIR)/bin/run-fop.sh -fo $(FO_TARGET) -pdf $(PDF_TARGET)
68 $(PS_TARGET): $(FO_TARGET) $(IMAGES)
69 $(TOOLS_DIR)/bin/run-fop.sh -fo $(FO_TARGET) -ps $(PS_TARGET)
73 $(MKDIR) $(INSTALL_SUBDIR)
75 install-html: $(HTML_TARGET) $(INSTALL_SUBDIR)
76 $(IFIMAGES) $(MKDIR) $(INSTALL_SUBDIR)/images $(ENDIF)
77 $(INSTALL_DATA) $(HTML_TARGET) $(INSTALL_SUBDIR)
78 $(INSTALL_DATA) $(STYLESHEET) $(INSTALL_SUBDIR)
79 $(IFIMAGES) $(INSTALL_DATA) $(IMAGES) $(INSTALL_SUBDIR)/images $(ENDIF)
81 install-html-chunk: $(HTML_CHUNK_TARGET) $(INSTALL_SUBDIR)
82 $(IFIMAGES) $(MKDIR) $(INSTALL_SUBDIR)/images $(ENDIF)
83 $(INSTALL_DATA) $(HTML_CHUNK_DIR)/*.html $(INSTALL_SUBDIR)
84 $(INSTALL_DATA) $(STYLESHEET) $(INSTALL_SUBDIR)
85 $(IFIMAGES) $(INSTALL_DATA) $(IMAGES) $(INSTALL_SUBDIR)/images $(ENDIF)
87 install-html-arch: $(HTML_ARCH_TARGET) $(INSTALL_SUBDIR)
88 $(INSTALL_DATA) $(HTML_ARCH_TARGET) $(INSTALL_SUBDIR)
90 install-html-chunk-arch: $(HTML_CHUNK_ARCH_TARGET) $(INSTALL_SUBDIR)
91 $(INSTALL_DATA) $(HTML_CHUNK_ARCH_TARGET) $(INSTALL_SUBDIR)
93 install-pdf: $(PDF_TARGET) $(INSTALL_SUBDIR)
94 $(INSTALL_DATA) $(PDF_TARGET) $(INSTALL_SUBDIR)
96 install-ps: $(PS_TARGET) $(INSTALL_SUBDIR)
97 $(INSTALL_DATA) $(PS_TARGET) $(INSTALL_SUBDIR)
101 rm -f $(VERSION_SOURCE) $(HTML_TARGET)
102 rm -f $(HTML_ARCH_TARGET) $(HTML_CHUNK_ARCH_TARGET)
103 rm -f $(FO_TARGET) $(PDF_TARGET) $(PS_TARGET)
104 rm -rf $(HTML_CHUNK_DIR)
107 valid: $(VERSION_SOURCE)
108 $(XMLLINT) --noout --nonet --valid $(XML_SOURCE)