Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 12 additions & 21 deletions src/build/project.jam
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,8 @@ PACKAGE_MANAGER_BUILD_INFO ?= $(PACKAGE_MANAGER_BUILD_INFO(CONAN)) ;
rule load-package-manager-build-info ( )
{
# This first variable is the one from the configuration (user, project, etc).
local package-manager-build-info = [ modules.peek [ CALLER_MODULE ] : PACKAGE_MANAGER_BUILD_INFO ] ;
local package-manager-build-info = [
modules.peek [ CALLER_MODULE ] : PACKAGE_MANAGER_BUILD_INFO ] ;
# And this is the rest as it takes it from the settings in the "project" module.
# I.e. the variable assignments above.
package-manager-build-info ?= $(PACKAGE_MANAGER_BUILD_INFO) ;
Expand Down Expand Up @@ -572,7 +573,7 @@ local rule load-jamfile ( dir : jamfile-module : synthesize ? )

local saved-project = $(.current-project) ;

mark-as-user $(jamfile-module) ;
USER_MODULE $(jamfile-module) ;
if $(jamfile-to-load:B) = "@"
{
# Not a real jamfile to load. Synthsize the load.
Expand All @@ -586,7 +587,7 @@ local rule load-jamfile ( dir : jamfile-module : synthesize ? )
: . ;
if [ MATCH ^($(JAMROOT))$ : $(jamfile-to-load:BS) ]
{
jamfile = [ find-jamfile $(dir) : no-errors ] ;
local jamfile = [ find-jamfile $(dir) : no-errors ] ;
if $(jamfile)
{
load-aux $(jamfile-module) : [ path.native $(jamfile) ] ;
Expand Down Expand Up @@ -655,18 +656,9 @@ rule end-load ( previous-project ? )
}


rule mark-as-user ( module-name )
{
if USER_MODULE in [ RULENAMES ]
{
USER_MODULE $(module-name) ;
}
}


rule load-aux ( module-name : file )
{
mark-as-user $(module-name) ;
USER_MODULE $(module-name) ;

module $(module-name)
{
Expand Down Expand Up @@ -714,8 +706,8 @@ rule initialize (
{
if ! [ MATCH ^($(JAMROOT))$ : $(basename) ]
{
# We search for parent/jamroot only if this is a jamfile project, i.e.
# if is not a standalone or a jamroot project.
# We search for parent/jamroot only if this is a jamfile project,
# i.e. if is not a standalone or a jamroot project.
parent-module = [ load-parent $(location) ] ;
}
if ! $(parent-module)
Expand Down Expand Up @@ -985,7 +977,7 @@ class project-attributes
local non-free = [ property.remove free : $(unconditional) ] ;
if $(non-free)
{
import errors : error : errors.error ;
import errors ;
errors.error usage-requirements $(specification) have non-free
properties $(non-free) ;
}
Expand Down Expand Up @@ -1027,7 +1019,7 @@ class project-attributes
else if ! $(attribute) in "default-build" "location" "parent"
"projects-to-build" "project-root" "source-location"
{
import errors : error : errors.error ;
import errors ;
errors.error Invalid project attribute '$(attribute)' specified for
project at '$(self.location)' ;
}
Expand Down Expand Up @@ -1388,7 +1380,7 @@ module project-rules
combine that with the --build-dir option. ;
}
# Strip the leading slash from id.
local rid = [ MATCH ^/(.*) : $(id) ] ;
local rid = [ MATCH ^/(.+) : $(id) ] ;
local p = [ path.join $(global-build-dir) $(rid)
$(explicit-build-dir) ] ;

Expand Down Expand Up @@ -1560,8 +1552,8 @@ module project-rules
}

# This allows one to manually import a package manager build information file.
# The argument can be either a symbolic name of a supported package manager or
# the a glob pattern to load a b2 jam file.
# The argument can be either a symbolic name of a supported package manager
# or a glob pattern to load a b2 jam file.
#
rule use-packages ( name-or-glob-pattern ? )
{
Expand Down Expand Up @@ -1644,7 +1636,6 @@ module project-rules
{
import errors ;
errors.error Unable find project reference '$(reference)'. ;
return ;
}
}
}
Loading