]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/tools/build/src/build/ac.jam
update sources to v12.2.3
[ceph.git] / ceph / src / boost / tools / build / src / build / ac.jam
index c6e36c6a5011da12950baef588e31c62efbad330..c01dc59973e28c213dcdd401f49c2993c535734e 100644 (file)
@@ -76,14 +76,6 @@ rule construct-library ( name : property-set : provided-path ? )
 rule find-library ( properties : names + : provided-path ? )
 {
     local result ;
-    if ! $(.main.cpp)
-    {
-        local a = [ class.new action : ac.generate-main :
-                    [ property-set.empty ] ] ;
-        .main.cpp = [ virtual-target.register
-            [ class.new file-target main.cpp exact
-                : CPP : $(.project) : $(a) ] ] ;
-    }
     if [ $(properties).get <link> ] = shared
     {
         link-opts = <link>shared <link>static ;
@@ -100,8 +92,12 @@ rule find-library ( properties : names + : provided-path ? )
         {
             local name = $(names-iter[1]) ;
             local lib = [ construct-library $(name) : $(properties) : $(provided-path) ] ;
+            local a = [ class.new action : ac.generate-main :
+                [ property-set.empty ] ] ;
+            local main.cpp = [ virtual-target.register
+                [ class.new file-target main-$(name).cpp exact : CPP : $(.project) : $(a) ] ] ;
             local test = [ generators.construct $(.project) $(name) : EXE
-                : [ $(properties).add $(lib[1]) ] : $(.main.cpp) $(lib[2-])
+                : [ $(properties).add $(lib[1]) ] : $(main.cpp) $(lib[2-])
                 : true ] ;
             local jam-targets ;
             for t in $(test[2-])