]> git.decadent.org.uk Git - dak.git/blobdiff - tools/dsync-0.0/buildlib/manpage.mak
Added another tool used in dak (and placed nowhere else), dsync
[dak.git] / tools / dsync-0.0 / buildlib / manpage.mak
diff --git a/tools/dsync-0.0/buildlib/manpage.mak b/tools/dsync-0.0/buildlib/manpage.mak
new file mode 100644 (file)
index 0000000..cfa5fc1
--- /dev/null
@@ -0,0 +1,27 @@
+# -*- make -*-
+
+# This installs man pages into the doc directory
+
+# Input
+# $(SOURCE) - The documents to use
+
+# All output is writtin to files in the build doc directory
+
+# See defaults.mak for information about LOCAL
+
+# Some local definitions
+LOCAL := manpage-$(firstword $(SOURCE))
+$(LOCAL)-LIST := $(addprefix $(DOC)/,$(SOURCE))
+
+# Install generation hooks
+doc: $($(LOCAL)-LIST)
+veryclean: veryclean/$(LOCAL)
+
+$($(LOCAL)-LIST) : $(DOC)/% : %
+       echo Installing man page $< to $(@D)
+       cp $< $(@D)
+
+# Clean rule
+.PHONY: veryclean/$(LOCAL)
+veryclean/$(LOCAL):
+       -rm -rf $($(@F)-LIST)