Add -nochunks makefile targets for documentation generation (user's manual). 1.1
authorChris Larson <clarson@kergoth.com>
Mon, 17 Jan 2005 21:11:26 +0000 (21:11 +0000)
committerChris Larson <clarson@kergoth.com>
Mon, 17 Jan 2005 21:11:26 +0000 (21:11 +0000)
doc/manual/Makefile

index 84373db..a43c025 100644 (file)
@@ -5,7 +5,7 @@ manual = $(topdir)/usermanual.xml
 types = $(xmltotypes) $(htmltypes)
 xmltotypes = pdf txt
 htmltypes = html xhtml
-htmlxsl = http://docbook.sourceforge.net/release/xsl/current/$@/chunk.xsl
+htmlxsl = $(if $(filter $@,$(foreach type,$(htmltypes),$(type)-nochunks)),http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl,http://docbook.sourceforge.net/release/xsl/current/$@/chunk.xsl)
 htmlcssfile = docbook.css
 htmlcss = $(topdir)/html.css
 # htmlcssfile =
@@ -28,7 +28,14 @@ all: $(types)
 lint: $(manual) FORCE
        $(call command,xmllint --xinclude --postvalid --noout $(manual),XMLLINT $(manual))
 
-$(types): lint FORCE
+$(types) $(foreach type,$(htmltypes),$(type)-nochunks): lint FORCE
+
+$(foreach type,$(htmltypes),$(type)-nochunks): $(if $(htmlcss),$(htmlcss)) $(manual)
+       @mkdir -p $@
+ifdef htmlcss
+       $(call command,install -m 0644 $(htmlcss) $@/$(htmlcssfile),CP $(htmlcss) $@/$(htmlcssfile))
+endif
+       $(call command,xsltproc --stringparam base.dir $@/ $(if $(htmlcssfile),--stringparam html.stylesheet $(htmlcssfile)) $(htmlxsl) $(manual) > $@/index.$(patsubst %-nochunks,%,$@),XSLTPROC $@ $(manual))
 
 $(htmltypes): $(if $(htmlcss),$(htmlcss)) $(manual)
        @mkdir -p $@
@@ -43,7 +50,7 @@ $(xmltotypes): $(manual)
 clean:
        rm -rf $(cleanfiles)
 
-$(foreach i,$(types),clean-$(i)):
+$(foreach i,$(types) $(foreach type,$(htmltypes),$(type)-nochunks),clean-$(i)):
        rm -rf $(patsubst clean-%,%,$@)
 
 FORCE: