2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-17 13:42:14 +00:00

Updated Boost Build's project id handling so that if a project has an id attribute, this id will be automatically registered and usable from that same project just the same as if the id had been specified directly using the 'id' project rule parameter.

Part of the work by Steven Watanabe on fixing the Boost Build trac ticket #13 (http://zigzag.cs.msu.su/boost.build/ticket/13).

[SVN r48318]
This commit is contained in:
Jurko Gospodnetić
2008-08-23 12:25:16 +00:00
parent 341ed058ec
commit e9e9f657d6

View File

@@ -633,8 +633,14 @@ class project-attributes
self.build-dir = [ path.root
[ path.make $(specification) ] $(self.location) ] ;
}
else if ! $(attribute) in "id" "default-build" "location"
"source-location" "parent" "projects-to-build" "project-root"
else if $(attribute) = "id"
{
id = [ path.root $(specification) / ] ;
project.register-id $(id) : $(self.project-module) ;
self.id = $(id) ;
}
else if ! $(attribute) in "default-build" "location" "parent"
"projects-to-build" "project-root" "source-location"
{
errors.error "Invalid project attribute '$(attribute)' specified"
"for project at '$(self.location)'" ;
@@ -873,8 +879,6 @@ module project-rules
local attributes = [ project.attributes $(__name__) ] ;
if $(id)
{
id = [ path.root $(id) / ] ;
project.register-id $(id) : $(__name__) ;
$(attributes).set id : $(id) ;
}
@@ -906,6 +910,9 @@ module project-rules
# or wrong consequences.
if $(location) && $(location) = [ $(attributes).get project-root ]
{
# Re-read the project id, since it might have been changed in
# the project's attributes.
id = [ $(attributes).get id ] ;
# This is Jamroot.
if $(id)
{