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 ;
: 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 ] ;
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)
[ 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))
{
}
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 ] ] ;
}