]> pd.if.org Git - pdclib.old/blobdiff - Jamfile
Add support for building HTML manual pages to the Jamfile
[pdclib.old] / Jamfile
diff --git a/Jamfile b/Jamfile
index 99441d9b4dffe3fcd56012cfdc3c1671564cd7fd..bd9305c5e807a2e9d5b4d1b7554a79b699a5f3bf 100644 (file)
--- a/Jamfile
+++ b/Jamfile
@@ -45,4 +45,20 @@ if ! $(PDCLIB_NO_TEST) {
         Test    $(test)    : $(testfile) ;\r
         RegTest $(regtest) : $(regtestfile) ;\r
     }\r
+}\r
+\r
+rule HtmlMan { \r
+    DEPENDS htmlman : $(<) ;\r
+    DEPENDS $(<) : $(<:D) ;\r
+    DEPENDS $(<) : $(>) ;\r
+    MkDir $(<:D) ;\r
+}\r
+\r
+actions HtmlMan {\r
+    mandoc -Thtml -Oincludes=../3/%I.html -Oman=../%S/%N.html -Ostyle=../style.css $(>) >$(<)\r
+}\r
+\r
+for manpg in [ GLOB man : *.3 ] {\r
+    local section = [ SPLIT $(manpg:S) : . ] ;\r
+    HtmlMan [ FDirName html $(section) $(manpg:B).html ] : $(manpg) ;\r
 }
\ No newline at end of file