2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-16 13:22:11 +00:00

Fix problem missing path when refering to targets at the project root from the project root Jamfile.

Fix multiple inclusion of the Jamrules file(s).


[SVN r19946]
This commit is contained in:
Rene Rivera
2003-09-07 17:42:18 +00:00
parent 6077c464fb
commit fa5a06e4dd
4 changed files with 30 additions and 44 deletions

View File

@@ -1287,25 +1287,24 @@ rule SubDir
# If $(TOP)/Jamrules hasn't been included, do so.
#
if $(PROJECT)
{
gINCLUDED($(gTOP)) = $(gINCLUDED($(PROJECT).TOP)) ;
}
if ! $(gINCLUDED($(gTOP)))
{
# Gated entry.
gINCLUDED($(gTOP)) = TRUE ;
# File is $(TOPRULES) or $(TOP)/Jamrules.
_r = $($(gTOP)RULES) ;
if ! $(_r)
if $(PROJECT)
{
_r = $(JAMRULES:R=$($(gTOP))) ;
gINCLUDED($(PROJECT).TOP) = TRUE ;
}
# Include it.
project-root ;
include $(_r) ;
include $(JAMRULES:R=$($(gTOP))) ;
}
# Get path to current directory from root using SubDir.

View File

@@ -1423,22 +1423,13 @@ rule dependent-include
local gIN_LIB_INCLUDE = TRUE ;
#
local gINCLUDED($(gTOP)) = $(gINCLUDED($(gTOP))) ;
local [ protect-subproject ] ;
local .project-name-and-subdir = [ enter-subproject $(.project-path) ] ;
local .project-name = $(.project-name-and-subdir[1]) ;
local .project-subdir = $(.project-name-and-subdir[2]) ;
local .jamfile-path = [ root-paths $(JAMFILE) : [ root-paths $(.project-subdir) : $(TOP) ] ] ;
if $(.project-name)
{
gINCLUDED($(gTOP)) = $(gINCLUDED($(.project-name):TOP)) ;
}
load-jamfiles $(.jamfile-path) ;
if $(.project-name)
{
gINCLUDED($(.project-name):TOP) = gINCLUDED($(gTOP)) ;
}
}
}
}
@@ -1457,7 +1448,6 @@ rule enter-subproject ( project-path )
TOP = $(.TOP) ;
TOP_TOKENS = $(.TOP_TOKENS) ;
gTOP = $(.gTOP) ;
gINCLUDED($(.gTOP)) = $(gINCLUDED($(.gTOP))) ;
PROJECT = $(.PROJECT) ;
local project-name = [ MATCH "^@([^/]+)" : $(project-path) ] ;
@@ -1468,15 +1458,19 @@ rule enter-subproject ( project-path )
if $(project-name)
{
project-top =
[ split-path $(gPROJECT($(project-name))) ]
[ split-path [ relative-path $(project-subdir) ] ]
[ split-path [ FSubDir [ split-path [ relative-path $(project-subdir) ] ] ] ] ;
project-top = [ split-path $(gPROJECT($(project-name))) ] ;
if $(project-subdir)
{
project-top +=
[ split-path [ relative-path $(project-subdir) ] ]
[ split-path [ FSubDir [ split-path [ relative-path $(project-subdir) ] ] ] ] ;
}
TOP = [ join-path $(project-top) ] ;
TOP_TOKENS = $(project-top) ;
gTOP = TOP ;
PROJECT = $(project-name) ;
}
project-subdir ?= . ;
subproject $(project-subdir) ;

View File

@@ -1287,25 +1287,24 @@ rule SubDir
# If $(TOP)/Jamrules hasn't been included, do so.
#
if $(PROJECT)
{
gINCLUDED($(gTOP)) = $(gINCLUDED($(PROJECT).TOP)) ;
}
if ! $(gINCLUDED($(gTOP)))
{
# Gated entry.
gINCLUDED($(gTOP)) = TRUE ;
# File is $(TOPRULES) or $(TOP)/Jamrules.
_r = $($(gTOP)RULES) ;
if ! $(_r)
if $(PROJECT)
{
_r = $(JAMRULES:R=$($(gTOP))) ;
gINCLUDED($(PROJECT).TOP) = TRUE ;
}
# Include it.
project-root ;
include $(_r) ;
include $(JAMRULES:R=$($(gTOP))) ;
}
# Get path to current directory from root using SubDir.

View File

@@ -1423,22 +1423,13 @@ rule dependent-include
local gIN_LIB_INCLUDE = TRUE ;
#
local gINCLUDED($(gTOP)) = $(gINCLUDED($(gTOP))) ;
local [ protect-subproject ] ;
local .project-name-and-subdir = [ enter-subproject $(.project-path) ] ;
local .project-name = $(.project-name-and-subdir[1]) ;
local .project-subdir = $(.project-name-and-subdir[2]) ;
local .jamfile-path = [ root-paths $(JAMFILE) : [ root-paths $(.project-subdir) : $(TOP) ] ] ;
if $(.project-name)
{
gINCLUDED($(gTOP)) = $(gINCLUDED($(.project-name):TOP)) ;
}
load-jamfiles $(.jamfile-path) ;
if $(.project-name)
{
gINCLUDED($(.project-name):TOP) = gINCLUDED($(gTOP)) ;
}
}
}
}
@@ -1457,7 +1448,6 @@ rule enter-subproject ( project-path )
TOP = $(.TOP) ;
TOP_TOKENS = $(.TOP_TOKENS) ;
gTOP = $(.gTOP) ;
gINCLUDED($(.gTOP)) = $(gINCLUDED($(.gTOP))) ;
PROJECT = $(.PROJECT) ;
local project-name = [ MATCH "^@([^/]+)" : $(project-path) ] ;
@@ -1468,15 +1458,19 @@ rule enter-subproject ( project-path )
if $(project-name)
{
project-top =
[ split-path $(gPROJECT($(project-name))) ]
[ split-path [ relative-path $(project-subdir) ] ]
[ split-path [ FSubDir [ split-path [ relative-path $(project-subdir) ] ] ] ] ;
project-top = [ split-path $(gPROJECT($(project-name))) ] ;
if $(project-subdir)
{
project-top +=
[ split-path [ relative-path $(project-subdir) ] ]
[ split-path [ FSubDir [ split-path [ relative-path $(project-subdir) ] ] ] ] ;
}
TOP = [ join-path $(project-top) ] ;
TOP_TOKENS = $(project-top) ;
gTOP = TOP ;
PROJECT = $(project-name) ;
}
project-subdir ?= . ;
subproject $(project-subdir) ;