Mercurial > hg > index.cgi
changeset 16:2f98cf1558e1
Added building of manual from docbook source to Makefile
author | lost@l-w.ca |
---|---|
date | Sat, 22 Jan 2011 17:00:15 -0700 |
parents | ed5cbe83cbd3 |
children | 4969bd6f3b7d |
files | .hgignore Makefile docs/rules.make |
diffstat | 3 files changed, 30 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgignore Sat Jan 22 16:22:51 2011 -0700 +++ b/.hgignore Sat Jan 22 17:00:15 2011 -0700 @@ -9,3 +9,5 @@ lwar lwlink lwobjdump +*.html +*.pdf
--- a/Makefile Sat Jan 22 16:22:51 2011 -0700 +++ b/Makefile Sat Jan 22 17:00:15 2011 -0700 @@ -28,7 +28,7 @@ .PHONY: all all: $(MAIN_TARGETS) -subdirs := lwasm lwlink lwar lwlib +subdirs := lwasm lwlink lwar lwlib docs -include $(subdirs:=/rules.make) @@ -104,6 +104,11 @@ @rm -f $(lwasm_objs) $(lwlink_objs) $(lwar_objs) $(lwlib_objs) $(lwobjdump_objs) @rm -f $(extra_clean) +.PHONY: realclean +realclean: clean + @echo "Cleaning up even more" + @rm -f docs/manual/*.html docs/manual/*.pdf + print-%: @echo $* = $($*)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/rules.make Sat Jan 22 17:00:15 2011 -0700 @@ -0,0 +1,22 @@ +dirname := $(dir $(lastword $(MAKEFILE_LIST))) + +.PHONY: manual +manual: manual-html manual-htmlm manual-pdf + +.PHONY: manual-html +manual-html: $(dirname)/manual/manual.html + +.PHONY: manual-htmlm +manual-htmlm: $(dirname)/manual/index.html + +.PHONY: manual-pdf +manual-pdf: $(dirname)/manual/manual.pdf + +$(dirname)/manual/manual.html: $(dirname)/manual.docbook.sgml + docbook2html -u $(dirname)/manual.docbook.sgml && mv manual.docbook.html $(dirname)/manual/manual.html + +$(dirname)/manual/index.html: $(dirname)/manual.docbook.sgml + docbook2html -o $(dirname)/manual $(dirname)manual.docbook.sgml + +$(dirname)/manual/manual.pdf: $(dirname)/manual.docbook.sgml + docbook2pdf -u $(dirname)manual.docbook.sgml && mv manual.docbook.pdf $(dirname)/manual/manual.pdf