aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGunnar Wrobel <p@rdus.de>2007-09-11 05:53:25 +0000
committerGunnar Wrobel <p@rdus.de>2007-09-11 05:53:25 +0000
commit387b74f15929efbdce79a6fbf12448f90bb83766 (patch)
treec3276ef615b29a6ead43338bd7e9a8d9405a60ea /doc/Makefile
parentStart the layman repository. (diff)
downloadoverlord-387b74f15929efbdce79a6fbf12448f90bb83766.tar.gz
overlord-387b74f15929efbdce79a6fbf12448f90bb83766.tar.bz2
overlord-387b74f15929efbdce79a6fbf12448f90bb83766.zip
Import layman.
Diffstat (limited to 'doc/Makefile')
-rw-r--r--doc/Makefile41
1 files changed, 41 insertions, 0 deletions
diff --git a/doc/Makefile b/doc/Makefile
new file mode 100644
index 0000000..64b28af
--- /dev/null
+++ b/doc/Makefile
@@ -0,0 +1,41 @@
+#
+# layman/doc/Makefile
+# Simple Makefile to rebuild the documentation from the
+# docbook XML sources
+#
+# Copyright (c) 1999-2005 Gentoo Foundation
+# Released under v2 of the GNU GPL
+#
+# Author(s) Stuart Herbert <stuart@gentoo.org>
+# Renat Lumpau <rl03@gentoo.org>
+# Gunnar Wrobel <php@gunnarwrobel.de>
+#
+# ========================================================================
+
+MAN_PAGES = layman.8
+HTML_PAGES = layman.8.html
+
+TMPFILE=./layman.man
+
+all: man html
+
+html: $(HTML_PAGES)
+
+man: $(MAN_PAGES)
+
+clean:
+ rm -f $(MAN_PAGES)
+ rm -f $(HTML_PAGES)
+
+%.html: %.xml
+ @echo HTML $@
+ @xmlto html-nochunks $<
+
+%: %.xml
+ @echo MAN $@
+ @xmlto man $<
+#
+# fix up the blank lines that docbook leaves behind
+#
+ @cat $@ | sed -e 's/$$/.fred/g;' | tr -d '\n' | sed -e 's/.fred.fred\./.fred./g;' | sed -e 's/.fred/\n/g;' > $(TMPFILE)
+ @mv $(TMPFILE) $@