]> pd.if.org Git - pdclib/blobdiff - Jamfile
Enable building PDCLib with Watcom. This was surprisingly painless: their C99 mode...
[pdclib] / Jamfile
diff --git a/Jamfile b/Jamfile
index 971e21da8f80a2727673d8e7893a2e36651fe98f..bd9305c5e807a2e9d5b4d1b7554a79b699a5f3bf 100644 (file)
--- a/Jamfile
+++ b/Jamfile
@@ -1,4 +1,8 @@
 SubDir PDCLIB_TOP ;\r
+if $(PDCLIB_PLATFORM) {\r
+    SubInclude PDCLIB_TOP platform $(PDCLIB_PLATFORM) ;\r
+    SubDir PDCLIB_TOP ;\r
+}\r
 PDCLibConfig ;\r
 \r
 PDCLIB_SOURCES = [ RecursiveGlob $(PDCLIB_TOP) : [ FDirName functions ] : *.c ] ;\r
@@ -25,11 +29,12 @@ if ! $(PDCLIB_NO_TEST) {
 \r
         Object $(testfile).o    : $(file) ;\r
         Object $(regtestfile).o : $(file) ;\r
-        MainFromObjects $(testfile)    : $(testfile).o ;\r
+        MainFromObjects $(testfile)    : $(testfile).o $(CRT0) ;\r
         MainFromObjects $(regtestfile) : $(regtestfile).o ;\r
         CCFLAGS on $(testfile).o += -DTEST $(PDCLIB_TEST_CCFLAGS) ;\r
         CCFLAGS on $(regtestfile).o += -DTEST -DREGTEST \r
                                        $(PDCLIB_REGTEST_CCFLAGS) ;\r
+        CCHDRS on $(regtestfile).o = [ FIncludes [ FDirName testing ] ] ;\r
 \r
         LINKFLAGS on $(testfile)$(SUFEXE) += $(PDCLIB_TEST_LINKFLAGS) ;\r
         LINKFLAGS on $(regtestfile)$(SUFEXE) += $(PDCLIB_REGTEST_LINKFLAGS) ;\r
@@ -40,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