summaryrefslogtreecommitdiff
path: root/buildlib/sgml_manpage.mak
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:56:32 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:56:32 +0000
commitb2e465d6d32d2dc884f58b94acb7e35f671a87fe (patch)
tree5928383b9bde7b0ba9812e6526ad746466e558f7 /buildlib/sgml_manpage.mak
parent00b47c98ca4a4349686a082eba6d77decbb03a4d (diff)
Join with aliencode
Author: jgg Date: 2001-02-20 07:03:16 GMT Join with aliencode
Diffstat (limited to 'buildlib/sgml_manpage.mak')
-rw-r--r--buildlib/sgml_manpage.mak49
1 files changed, 49 insertions, 0 deletions
diff --git a/buildlib/sgml_manpage.mak b/buildlib/sgml_manpage.mak
new file mode 100644
index 000000000..607ead373
--- /dev/null
+++ b/buildlib/sgml_manpage.mak
@@ -0,0 +1,49 @@
+# -*- make -*-
+
+# This handles man pages in DocBook SGMLL 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 sgml files are called apt-cache.8.sgml
+
+# See defaults.mak for information about LOCAL
+
+# Some local definitions
+ifdef NSGMLS
+ifdef SGMLSPL
+ifdef DOCBOOK2MAN
+
+LOCAL := sgml-manpage-$(firstword $(SOURCE))
+$(LOCAL)-LIST := $(SOURCE)
+
+# Install generation hooks
+doc: $($(LOCAL)-LIST)
+veryclean: veryclean/$(LOCAL)
+
+$($(LOCAL)-LIST) :: % : %.sgml $(INCLUDES)
+ echo Creating man page $@
+ $(NSGMLS) $< | $(SGMLSPL) $(DOCBOOK2MAN)
+
+# Clean rule
+.PHONY: veryclean/$(LOCAL)
+veryclean/$(LOCAL):
+ -rm -rf $($(@F)-LIST)
+
+HAVE_SGML=yes
+endif
+endif
+endif
+
+INCLUDES :=
+
+ifndef HAVE_SGML
+# 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