diff options
author | Chris Larson <clarson@kergoth.com> | 2004-12-07 20:55:41 +0000 |
---|---|---|
committer | Chris Larson <clarson@kergoth.com> | 2004-12-07 20:55:41 +0000 |
commit | d91e57c44e923b6b65396515ff878199d43763a1 (patch) | |
tree | c891ef94238989d3efb004cc3d22a280b642260b /doc/manual/Makefile | |
parent | 9633dc85c57a0a6de1b088b49e589513087c2720 (diff) | |
download | bitbake-d91e57c44e923b6b65396515ff878199d43763a1.tar.gz |
Initial import.
Diffstat (limited to 'doc/manual/Makefile')
-rw-r--r-- | doc/manual/Makefile | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/doc/manual/Makefile b/doc/manual/Makefile new file mode 100644 index 000000000..84373db74 --- /dev/null +++ b/doc/manual/Makefile @@ -0,0 +1,49 @@ +topdir = . +manual = $(topdir)/usermanual.xml +# types = pdf txt rtf ps xhtml html man tex texi dvi +# types = pdf txt +types = $(xmltotypes) $(htmltypes) +xmltotypes = pdf txt +htmltypes = html xhtml +htmlxsl = http://docbook.sourceforge.net/release/xsl/current/$@/chunk.xsl +htmlcssfile = docbook.css +htmlcss = $(topdir)/html.css +# htmlcssfile = +# htmlcss = +cleanfiles = $(foreach i,$(types),$(topdir)/$(i)) + +ifdef DEBUG +define command + $(1) +endef +else +define command + @echo $(2) $(3) $(4) + @$(1) >/dev/null +endef +endif + +all: $(types) + +lint: $(manual) FORCE + $(call command,xmllint --xinclude --postvalid --noout $(manual),XMLLINT $(manual)) + +$(types): lint FORCE + +$(htmltypes): $(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),XSLTPROC $@ $(manual)) + +$(xmltotypes): $(manual) + $(call command,xmlto --extensions -o $(topdir)/$@ $@ $(manual),XMLTO $@ $(manual)) + +clean: + rm -rf $(cleanfiles) + +$(foreach i,$(types),clean-$(i)): + rm -rf $(patsubst clean-%,%,$@) + +FORCE: |