]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/tools/build/src/tools/libpng.jam
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / boost / tools / build / src / tools / libpng.jam
index 46e3cc9ae34f0378f9be3edf8fe1f2ef482f29c2..43f6817633709819d885d1ccab635d05a8d7ad91 100644 (file)
 import project ;
 import ac ;
 import errors ;
+import feature ;
 import "class" : new ;
 import targets ; 
 import path ;
 import modules ;
-import errors ;
 import indirect ;
 import property ;
 import property-set ;
@@ -93,7 +93,10 @@ rule init (
 
     : is-default ?
     # Default configurations are only used when libpng
-    # has not yet been configured.
+    # has not yet been configured.  This option is
+    # deprecated.  A configuration will be treated
+    # as a default when none of <include>, <search>,
+    # <name>, and <source> are present.
     )
 {
     local caller = [ project.current ] ;
@@ -107,23 +110,21 @@ rule init (
         project libpng ;
     }
 
-    local library-path = [ property.select <search> : $(options) ] ;
-    library-path = $(library-path:G=) ;
-    local include-path = [ property.select <include> : $(options) ] ;
-    include-path = $(include-path:G=) ;
-    local source-path = [ property.select <source> : $(options) ] ;
-    source-path = $(source-path:G=) ;
-    local library-name = [ property.select <name> : $(options) ] ;
-    library-name = $(library-name:G=) ;
-    local tag = [ property.select <tag> : $(options) ] ;
-    tag = $(tag:G=) ;
-    local build-name = [ property.select <build-name> : $(options) ] ;
-    build-name = $(build-name:G=) ;
+    local library-path = [ feature.get-values <search> : $(options) ] ;
+    local include-path = [ feature.get-values <include> : $(options) ] ;
+    local source-path = [ feature.get-values <source> : $(options) ] ;
+    local library-name = [ feature.get-values <name> : $(options) ] ;
+    local tag = [ feature.get-values <tag> : $(options) ] ;
+    local build-name = [ feature.get-values <build-name> : $(options) ] ;
+
+    if ! $(library-path) && ! $(include-path) && ! $(source-path) && ! $(library-name)
+    {
+        is-default = true ;
+    }
 
     condition = [ property-set.create $(requirements) ] ;
     condition = [ property-set.create [ $(condition).base ] ] ;
 
-    local no-build-from-source ;
     # Ignore environmental LIBPNG_SOURCE if this initialization
     # requested to search for a specific pre-built library.
     if $(library-path) || $(include-path) || $(library-name)
@@ -134,13 +135,11 @@ rule init (
                 [ property.select <search> <include> <name> : $(options) ] "and"
                 [ property.select <source> <tag> <build-name> : $(options) ] ;
         }
-        else
-        {
-            no-build-from-source = true ;
-        }
     }
-
-    source-path ?= [ modules.peek : LIBPNG_SOURCE ] ;
+    else
+    {
+        source-path ?= [ modules.peek : LIBPNG_SOURCE ] ;
+    }
 
     if $(.configured.$(condition))
     {
@@ -157,12 +156,12 @@ rule init (
         }
         return ;
     }
-    else if $(source-path) && ! $(no-build-from-source)
+    else if $(source-path)
     {
         build-name ?= png ;
         library-id = [ CALC $(library-id) + 1 ] ;
         tag = [ MATCH ^@?(.*)$ : $(tag) ] ;
-        if $(tag) && ! [ MATCH ^([^%]*)%([^%]+)$ : $(tag) ]
+        if $(tag)
         {
             tag = [ indirect.make $(tag) : [ $(caller).project-module ] ] ;
         }