Switch from manually written nroff manpage to asciidoc instead
[grml-x.git] / Makefile
diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..8cd1e53
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,28 @@
+all: doc
+
+doc: doc_man doc_html
+
+doc_html: html-stamp
+
+html-stamp: grml-x.txt
+       asciidoc -b xhtml11 grml-x.txt
+       touch html-stamp
+
+doc_man: man-stamp
+
+man-stamp: grml-x.txt
+       asciidoc -d manpage -b docbook grml-x.txt
+       sed -i 's/<emphasis role="strong">/<emphasis role="bold">/' grml-x.xml
+       xsltproc /usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl grml-x.xml
+       # ugly hack to avoid duplicate empty lines in manpage
+       # notice: docbook-xsl 1.71.0.dfsg.1-1 is broken! make sure you use 1.68.1.dfsg.1-0.2!
+       cp grml-x.1 grml-x.1.tmp
+       uniq grml-x.1.tmp > grml-x.1
+       rm grml-x.1.tmp
+       touch man-stamp
+
+online:
+       scp grml-x.html grml:/var/www/grml/grml-x/index.html
+
+clean:
+       rm -rf grml-x.html grml-x.xml grml-x.1 html-stamp man-stamp