mirror of
https://github.com/boostorg/build.git
synced 2026-02-17 01:32:12 +00:00
Permit path-constant with relative path in config files.
Thanks to Johan Nilsson for the bug report. [SVN r57836]
This commit is contained in:
@@ -238,6 +238,12 @@ local rule load-config ( module-name : filename : path + : must-find ? )
|
||||
"$(filename)" "from" $(where) "." ;
|
||||
}
|
||||
|
||||
# Set source location so that path-constant in config files
|
||||
# with relative paths work. This is of most importance
|
||||
# for project-config.jam, but may be used in other
|
||||
# config files as well.
|
||||
local attributes = [ project.attributes $(module-name) ] ;
|
||||
$(attributes).set source-location : $(where:D) : exact ;
|
||||
modules.load $(module-name) : $(filename) : $(path) ;
|
||||
project.load-used-projects $(module-name) ;
|
||||
}
|
||||
|
||||
@@ -485,7 +485,17 @@ class project-target : abstract-target
|
||||
local r ;
|
||||
for local v in $(value)
|
||||
{
|
||||
v = [ path.root [ path.make $(v) ] $(self.location) ] ;
|
||||
local l = $(self.location) ;
|
||||
if ! $(l)
|
||||
{
|
||||
# Project corresponding to config files do not have
|
||||
# 'location' attribute, but do have source location.
|
||||
# It might be more reasonable to make every project have
|
||||
# a location and use some other approach to prevent buildable
|
||||
# targets in config files, but that's for later.
|
||||
l = [ get source-location ] ;
|
||||
}
|
||||
v = [ path.root [ path.make $(v) ] $(l) ] ;
|
||||
# Now make the value absolute path.
|
||||
v = [ path.root $(v) [ path.pwd ] ] ;
|
||||
# Constants should be in platform-native form.
|
||||
|
||||
Reference in New Issue
Block a user