[policy] 01/01: Enable other formats as policy output; add publish target to easily publish changes
Andreas Tille
tille at debian.org
Mon Nov 4 09:40:04 UTC 2013
This is an automated email from the git hooks/post-receive script.
tille pushed a commit to branch master
in repository policy.
commit df2b7c92a23788b1d82267021e713b83eace75a1
Author: Andreas Tille <tille at debian.org>
Date: Mon Nov 4 10:44:00 2013 +0100
Enable other formats as policy output; add publish target to easily publish changes
---
Makefile | 54 +++++++++++++++++++++++++++++++++++++++++++++++-------
1 file changed, 47 insertions(+), 7 deletions(-)
diff --git a/Makefile b/Makefile
index 5a96a49..cf15d63 100644
--- a/Makefile
+++ b/Makefile
@@ -1,12 +1,52 @@
-all: xhtml
+## ----------------------------------------------------------------------
+## Makefile : makefile for debian-science-policy
+## ----------------------------------------------------------------------
-xhtml: html/debian-science-policy.html
+## ----------------------------------------------------------------------
+## Document definitions
+doc_name := debian-science-policy
+doc_xml := $(doc_name).xml
+doc_pdf := $(doc_name).pdf
+doc_txt := $(doc_name).txt
+#this needed cause xmlto txt does not include section numbering by default
+doc_txt_params := --stringparam section.autolabel=1 --stringparam section.label.includes.component.label=1
-html/debian-science-policy.html: debian-science-policy.xml
- mkdir -p html
- xmlto -o html/ xhtml-nochunks $<
+doc_html := $(doc_name).html
+
+## ----------------------------------------------------------------------
+# this can and will be overriden by a higher level makefile
+PUBLISHDIR := alioth.debian.org:/home/groups/debian-science/htdocs/
+
+# There is no difference between letter and a4, but a2 for instance works
+PAPERSIZE := a4
+
+## ----------------------------------------------------------------------
+## Targets
+all: html
+
+validate: $(doc_xml)
+ xmllint --valid --noout $(doc_xml)
+
+html: $(doc_html)
+
+$(doc_html): $(doc_xml)
+ xmlto xhtml-nochunks $(doc_xml)
+
+txt $(doc_txt): $(doc_xml)
+ xmlto $(doc_txt_params) txt $(doc_xml)
+
+pdf $(doc_pdf): $(doc_xml)
+ xmlto --with-dblatex pdf $(doc_xml)
+
+
+publish: html
+ rsync -a $(doc_html) $(PUBLISHDIR)
+
+clean:
+ rm -rf $(doc_html) $(doc_txt) $(doc_pdf)
distclean:
- rm -rf html/
+ make clean
+ find . -name "*~" -exec rm -rf {} \;
-.PHONY: xthml distclean
+.PHONY: all publish clean distclean validate
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/policy.git
More information about the debian-science-commits
mailing list