diff options
-rw-r--r-- | doc/manual/Makefile | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/doc/manual/Makefile b/doc/manual/Makefile index 84373db74..a43c02545 100644 --- a/doc/manual/Makefile +++ b/doc/manual/Makefile @@ -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: |