summaryrefslogtreecommitdiff
path: root/buildlib
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 17:05:24 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 17:05:24 +0000
commitf11dd35cc40eb8e1b18ae8d481cc67b28539ebd9 (patch)
tree565830f78761760fb00e4ff2fd5a365f2bfd3659 /buildlib
parentdbf03e0516ff800cf90ea080fd5095281612069e (diff)
This must have escaped my commit, part of the XML manpa...
Author: mdz Date: 2004-02-09 20:46:44 GMT This must have escaped my commit, part of the XML manpage stuff
Diffstat (limited to 'buildlib')
-rw-r--r--buildlib/xml_manpage.mak45
1 files changed, 45 insertions, 0 deletions
diff --git a/buildlib/xml_manpage.mak b/buildlib/xml_manpage.mak
new file mode 100644
index 000000000..57e95f303
--- /dev/null
+++ b/buildlib/xml_manpage.mak
@@ -0,0 +1,45 @@
+# -*- make -*-
+
+# This handles man pages in DocBook XML format. We convert to the respective
+# output in the source directory then copy over to the final dest. This
+# means yodl is only needed if compiling from CVS
+
+# Input
+# $(SOURCE) - The documents to use, in the form foo.sect, ie apt-cache.8
+# the XML files are called apt-cache.8.xml
+
+# See defaults.mak for information about LOCAL
+
+# Some local definitions
+ifdef XMLTO
+
+LOCAL := xml-manpage-$(firstword $(SOURCE))
+$(LOCAL)-LIST := $(SOURCE)
+
+# Install generation hooks
+doc: $($(LOCAL)-LIST)
+veryclean: veryclean/$(LOCAL)
+
+$($(LOCAL)-LIST) :: % : %.xml $(INCLUDES)
+ echo Creating man page $@
+ $(XMLTO) man $<
+
+# Clean rule
+.PHONY: veryclean/$(LOCAL)
+veryclean/$(LOCAL):
+ -rm -rf $($(@F)-LIST)
+
+HAVE_XMLTO=yes
+endif
+
+INCLUDES :=
+
+ifndef HAVE_XMLTO
+# Strip from the source list any man pages we dont have compiled already
+SOURCE := $(wildcard $(SOURCE))
+endif
+
+# Chain to the manpage rule
+ifneq ($(words $(SOURCE)),0)
+include $(MANPAGE_H)
+endif