summaryrefslogtreecommitdiff
path: root/buildlib/yodl_manpage.mak
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:52:00 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:52:00 +0000
commit8a9ec51975d0562879ad76660942d831360e51bd (patch)
tree6a4ac6c76007e4c6ba102c20ed3e683481f9e285 /buildlib/yodl_manpage.mak
parent3d8fd17432ef64ca260e5bd8469b0f636119a8e8 (diff)
YODL
Author: jgg Date: 1998-12-06 05:57:16 GMT YODL
Diffstat (limited to 'buildlib/yodl_manpage.mak')
-rw-r--r--buildlib/yodl_manpage.mak42
1 files changed, 42 insertions, 0 deletions
diff --git a/buildlib/yodl_manpage.mak b/buildlib/yodl_manpage.mak
new file mode 100644
index 000000000..a5f436f60
--- /dev/null
+++ b/buildlib/yodl_manpage.mak
@@ -0,0 +1,42 @@
+# -*- make -*-
+
+# This handles man pages in YODL 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 yodl files are called apt-cache.8.yo
+
+# See defaults.mak for information about LOCAL
+
+# Some local definitions
+ifdef YODL_MAN
+
+LOCAL := yodl-manpage-$(firstword $(SOURCE))
+$(LOCAL)-LIST := $(SOURCE)
+
+# Install generation hooks
+doc: $($(LOCAL)-LIST)
+veryclean: veryclean/$(LOCAL)
+
+$($(LOCAL)-LIST) :: % : %.yo
+ echo Creating man page $@
+ yodl2man -o $@ $<
+
+# Clean rule
+.PHONY: veryclean/$(LOCAL)
+veryclean/$(LOCAL):
+ -rm -rf $($(@F)-LIST)
+
+else
+
+# 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