]> pd.if.org Git - pdclib.old/blobdiff - Jamfile
Merge
[pdclib.old] / Jamfile
diff --git a/Jamfile b/Jamfile
index bd9305c5e807a2e9d5b4d1b7554a79b699a5f3bf..86b2d5f0719e31864015919f071d9c637a1f7713 100644 (file)
--- a/Jamfile
+++ b/Jamfile
@@ -1,64 +1,70 @@
-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
-\r
-if $(PDCLIB_PLATFORM) {\r
-    PDCLIB_PLATFORM_SOURCE_DIR = \r
-        [ FDirName platform $(PDCLIB_PLATFORM) functions ] ;\r
-    PDCLIB_SOURCES += [ RecursiveGlob $(PDCLIB_TOP) : $(PDCLIB_PLATFORM_SOURCE_DIR) : *.c ] ;\r
-}\r
-\r
-for opt in $(PDCLIB_OPTIONS) {\r
-    optdir = [ FDirName opt $(opt) ] ;\r
-    PDCLIB_SOURCES += [ RecursiveGlob $(PDCLIB_TOP) : $(optdir) : *.c ] ;   \r
-}\r
-\r
-Library $(PDCLIB) : $(PDCLIB_SOURCES) ;\r
-\r
-if ! $(PDCLIB_NO_TEST) {\r
-    for file in $(PDCLIB_SOURCES) {\r
-        testfile    = $(file:S=_t) ;\r
-        regtestfile = $(file:S=_r) ;\r
-        test        = $(file:S=-test) ;\r
-        regtest     = $(file:S=-regtest) ;\r
-\r
-        Object $(testfile).o    : $(file) ;\r
-        Object $(regtestfile).o : $(file) ;\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
-        LINKLIBS on $(testfile)$(SUFEXE) += $(PDCLIB_TEST_LINKLIBS) ;\r
-        LINKLIBS on $(regtestfile)$(SUFEXE) += $(PDCLIB_REGTEST_LINKLIBS) ;\r
-        LinkLibraries $(testfile) : $(PDCLIB) ;\r
-\r
-        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
+SubDir PDCLIB_TOP ;
+if $(PDCLIB_PLATFORM) {
+    SubInclude PDCLIB_TOP platform $(PDCLIB_PLATFORM) ;
+    SubDir PDCLIB_TOP ;
+}
+PDCLibConfig ;
+
+PDCLIB_SOURCES = [ RecursiveGlob $(PDCLIB_TOP) : [ FDirName functions ] : *.c ] ;
+
+if $(PDCLIB_PLATFORM) {
+    PDCLIB_PLATFORM_SOURCE_DIR = 
+        [ FDirName platform $(PDCLIB_PLATFORM) functions ] ;
+    PDCLIB_SOURCES += [ RecursiveGlob $(PDCLIB_TOP) : $(PDCLIB_PLATFORM_SOURCE_DIR) : *.c ] ;
+}
+
+for opt in $(PDCLIB_OPTIONS) {
+    optdir = [ FDirName opt $(opt) ] ;
+    PDCLIB_SOURCES += [ RecursiveGlob $(PDCLIB_TOP) : $(optdir) : *.c ] ;   
+}
+
+Library $(PDCLIB) : $(PDCLIB_SOURCES) ;
+
+if ! $(PDCLIB_NO_TEST) {
+    for file in $(PDCLIB_SOURCES) {
+        testfile    = $(file:S=_t) ;
+        regtestfile = $(file:S=_r) ;
+        test        = $(file:S=-test) ;
+        regtest     = $(file:S=-regtest) ;
+
+        Object $(testfile).o    : $(file) ;
+        MainFromObjects $(testfile)    : $(testfile).o $(CRT0) ;
+        CCFLAGS on $(testfile).o += -DTEST $(PDCLIB_TEST_CCFLAGS) ;
+        LINKFLAGS on $(testfile)$(SUFEXE) += $(PDCLIB_TEST_LINKFLAGS) ;
+        LINKLIBS on $(testfile)$(SUFEXE) += $(PDCLIB_TEST_LINKLIBS) ;
+        LinkLibraries $(testfile) : $(PDCLIB) ;
+        Test    $(test)    : $(testfile) ;
+
+        if ! $(PDCLIB_NO_REGTEST) {
+            Object $(regtestfile).o : $(file) ;
+            MainFromObjects $(regtestfile) : $(regtestfile).o ;
+            CCFLAGS on $(regtestfile).o += -DTEST -DREGTEST 
+                                    $(PDCLIB_REGTEST_CCFLAGS) ;
+            CCHDRS on $(regtestfile).o = [ FIncludes [ FDirName testing ] ] $(PDCLIB_REGTEST_CCHDRS) ;
+            LINKFLAGS on $(regtestfile)$(SUFEXE) += $(PDCLIB_REGTEST_LINKFLAGS) ;
+            LINKLIBS on $(regtestfile)$(SUFEXE) += $(PDCLIB_REGTEST_LINKLIBS) ;
+            RegTest $(regtest) : $(regtestfile) ;
+        }
+    }
+
+    Main helloworld : helloworld.c ;
+    LinkLibraries helloworld : $(PDCLIB) ;
+    LINKLIBS on helloworld$(SUFEXE) += $(PDCLIB_TEST_LINKLIBS) ;
+    LINKFLAGS on helloworld$(SUFEXE) += $(PDCLIB_TEST_LINKFLAGS) ;
+}
+
+rule HtmlMan { 
+    DEPENDS htmlman : $(<) ;
+    DEPENDS $(<) : $(<:D) ;
+    DEPENDS $(<) : $(>) ;
+    MkDir $(<:D) ;
+}
+
+actions HtmlMan {
+    mandoc -Thtml -Oincludes=../3/%I.html -Oman=../%S/%N.html -Ostyle=../style.css $(>) >$(<)
+}
+
+for manpg in [ GLOB man3 : *.3 ] {
+    local section = [ SPLIT $(manpg:S) : . ] ;
+    HtmlMan [ FDirName html $(section) $(manpg:B).html ] : $(manpg) ;
 }
\ No newline at end of file