mirror of
https://github.com/boostorg/build.git
synced 2026-02-16 01:12:13 +00:00
Remove support for using project-root.jam in place of Jamfile.
* new/project-roots.jam (project-root-context.project): Remove. * new/project.jam (find): Simplify. (find-jamfile): Optimize. [SVN r20432]
This commit is contained in:
@@ -300,19 +300,7 @@ module project-root-context
|
||||
return $(.project-root) ;
|
||||
}
|
||||
}
|
||||
|
||||
# First, makes this project-root.jam module acts as project, which, in
|
||||
# particular means that project-context rules will be imported in the
|
||||
# current module.
|
||||
# Second, invokes 'project' again --- this time it will be rule
|
||||
# from project-context.
|
||||
rule project ( * : * )
|
||||
{
|
||||
import project ;
|
||||
project.act-as-jamfile $(__name__) : [ project-root get-location ] ;
|
||||
project $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;
|
||||
}
|
||||
|
||||
|
||||
# Declare and set a project global constant. Project global constants are
|
||||
# normal variables but should not be changed. They are applied to each
|
||||
# Jamfile that is loaded under it's corresponding project-root.
|
||||
|
||||
@@ -117,21 +117,10 @@ rule find ( name : current-location )
|
||||
# root, willing to act as Jamfile. In that case, project-root
|
||||
# must be placed in the directory referred by id.
|
||||
|
||||
local root-location =
|
||||
[ project-roots.find-project-root $(location) ] ;
|
||||
if $(root-location)
|
||||
if [ find-jamfile $(location) ]
|
||||
{
|
||||
root-location = [ path.parent $(root-location) ] ;
|
||||
}
|
||||
|
||||
if $(location) in $(.project-location) ||
|
||||
[ find-jamfile $(location) ] && [ load $(location) ] ||
|
||||
$(root-location) = $(location) && [ project-roots.load $(location) ]
|
||||
{
|
||||
# We've managed to find or load project. Returns the module
|
||||
# name
|
||||
project-module = [ module-name $(location) ] ;
|
||||
}
|
||||
project-module = [ load $(location) ] ;
|
||||
}
|
||||
}
|
||||
|
||||
return $(project-module) ;
|
||||
@@ -176,12 +165,21 @@ local rule find-jamfile (
|
||||
local jamfile-glob = ;
|
||||
if $(parent-root)
|
||||
{
|
||||
jamfile-glob =
|
||||
[ path.glob-in-parents $(dir) : $(JAMFILE) : $(parent-root) ] ;
|
||||
if ! $(.parent-jamfile.$(dir))
|
||||
{
|
||||
.parent-jamfile.$(dir) =
|
||||
[ path.glob-in-parents $(dir) : $(JAMFILE) : $(parent-root) ] ;
|
||||
}
|
||||
jamfile-glob = $(.parent-jamfile.$(dir)) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
jamfile-glob = [ path.glob $(dir) : $(JAMFILE) ] ;
|
||||
if ! $(.jamfile.$(dir))
|
||||
{
|
||||
.jamfile.$(dir) = [ path.glob $(dir) : $(JAMFILE) ] ;
|
||||
}
|
||||
jamfile-glob = $(.jamfile.$(dir)) ;
|
||||
|
||||
}
|
||||
|
||||
return $(jamfile-glob) ;
|
||||
|
||||
@@ -10,7 +10,8 @@ from BoostBuild import Tester, List
|
||||
|
||||
t = Tester()
|
||||
|
||||
t.write("project-root.jam", """
|
||||
t.write("project-root.jam", "")
|
||||
t.write("Jamfile", """
|
||||
project ;
|
||||
|
||||
exe hello : hello.cpp a.c ;
|
||||
|
||||
21
test/project-test3/lib3/Jamfile
Normal file
21
test/project-test3/lib3/Jamfile
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
# This project-root.jam also serves the role of Jamfile
|
||||
project lib3 ;
|
||||
|
||||
use-project /lib2/helper : ../lib2/helper ;
|
||||
|
||||
import property ;
|
||||
|
||||
rule mfc-compile ( target : sources * : property-set * )
|
||||
{
|
||||
PROPERTIES on $(target) = [
|
||||
property.as-path [ property.remove incidental : $(property-set) ] ] ;
|
||||
}
|
||||
|
||||
actions mfc-compile
|
||||
{
|
||||
echo $(PROPERTIES) > $(<)
|
||||
echo $(>) >> $(<)
|
||||
}
|
||||
|
||||
make f.obj : f.cpp /lib2/helper//e.obj : mfc-compile ;
|
||||
@@ -1,21 +0,0 @@
|
||||
|
||||
# This project-root.jam also serves the role of Jamfile
|
||||
project lib3 ;
|
||||
|
||||
use-project /lib2/helper : ../lib2/helper ;
|
||||
|
||||
import property ;
|
||||
|
||||
rule mfc-compile ( target : sources * : property-set * )
|
||||
{
|
||||
PROPERTIES on $(target) = [
|
||||
property.as-path [ property.remove incidental : $(property-set) ] ] ;
|
||||
}
|
||||
|
||||
actions mfc-compile
|
||||
{
|
||||
echo $(PROPERTIES) > $(<)
|
||||
echo $(>) >> $(<)
|
||||
}
|
||||
|
||||
make f.obj : f.cpp /lib2/helper//e.obj : mfc-compile ;
|
||||
|
||||
@@ -10,7 +10,8 @@ from BoostBuild import Tester, List
|
||||
# Test that free property inside
|
||||
t = Tester()
|
||||
|
||||
t.write("project-root.jam", """
|
||||
t.write("project-root.jam", "")
|
||||
t.write("Jamfile", """
|
||||
project ;
|
||||
|
||||
variant debug-AA : debug : <define>AA ;
|
||||
|
||||
@@ -300,19 +300,7 @@ module project-root-context
|
||||
return $(.project-root) ;
|
||||
}
|
||||
}
|
||||
|
||||
# First, makes this project-root.jam module acts as project, which, in
|
||||
# particular means that project-context rules will be imported in the
|
||||
# current module.
|
||||
# Second, invokes 'project' again --- this time it will be rule
|
||||
# from project-context.
|
||||
rule project ( * : * )
|
||||
{
|
||||
import project ;
|
||||
project.act-as-jamfile $(__name__) : [ project-root get-location ] ;
|
||||
project $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;
|
||||
}
|
||||
|
||||
|
||||
# Declare and set a project global constant. Project global constants are
|
||||
# normal variables but should not be changed. They are applied to each
|
||||
# Jamfile that is loaded under it's corresponding project-root.
|
||||
|
||||
@@ -117,21 +117,10 @@ rule find ( name : current-location )
|
||||
# root, willing to act as Jamfile. In that case, project-root
|
||||
# must be placed in the directory referred by id.
|
||||
|
||||
local root-location =
|
||||
[ project-roots.find-project-root $(location) ] ;
|
||||
if $(root-location)
|
||||
if [ find-jamfile $(location) ]
|
||||
{
|
||||
root-location = [ path.parent $(root-location) ] ;
|
||||
}
|
||||
|
||||
if $(location) in $(.project-location) ||
|
||||
[ find-jamfile $(location) ] && [ load $(location) ] ||
|
||||
$(root-location) = $(location) && [ project-roots.load $(location) ]
|
||||
{
|
||||
# We've managed to find or load project. Returns the module
|
||||
# name
|
||||
project-module = [ module-name $(location) ] ;
|
||||
}
|
||||
project-module = [ load $(location) ] ;
|
||||
}
|
||||
}
|
||||
|
||||
return $(project-module) ;
|
||||
@@ -176,12 +165,21 @@ local rule find-jamfile (
|
||||
local jamfile-glob = ;
|
||||
if $(parent-root)
|
||||
{
|
||||
jamfile-glob =
|
||||
[ path.glob-in-parents $(dir) : $(JAMFILE) : $(parent-root) ] ;
|
||||
if ! $(.parent-jamfile.$(dir))
|
||||
{
|
||||
.parent-jamfile.$(dir) =
|
||||
[ path.glob-in-parents $(dir) : $(JAMFILE) : $(parent-root) ] ;
|
||||
}
|
||||
jamfile-glob = $(.parent-jamfile.$(dir)) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
jamfile-glob = [ path.glob $(dir) : $(JAMFILE) ] ;
|
||||
if ! $(.jamfile.$(dir))
|
||||
{
|
||||
.jamfile.$(dir) = [ path.glob $(dir) : $(JAMFILE) ] ;
|
||||
}
|
||||
jamfile-glob = $(.jamfile.$(dir)) ;
|
||||
|
||||
}
|
||||
|
||||
return $(jamfile-glob) ;
|
||||
|
||||
@@ -10,7 +10,8 @@ from BoostBuild import Tester, List
|
||||
|
||||
t = Tester()
|
||||
|
||||
t.write("project-root.jam", """
|
||||
t.write("project-root.jam", "")
|
||||
t.write("Jamfile", """
|
||||
project ;
|
||||
|
||||
exe hello : hello.cpp a.c ;
|
||||
|
||||
21
v2/test/project-test3/lib3/Jamfile
Normal file
21
v2/test/project-test3/lib3/Jamfile
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
# This project-root.jam also serves the role of Jamfile
|
||||
project lib3 ;
|
||||
|
||||
use-project /lib2/helper : ../lib2/helper ;
|
||||
|
||||
import property ;
|
||||
|
||||
rule mfc-compile ( target : sources * : property-set * )
|
||||
{
|
||||
PROPERTIES on $(target) = [
|
||||
property.as-path [ property.remove incidental : $(property-set) ] ] ;
|
||||
}
|
||||
|
||||
actions mfc-compile
|
||||
{
|
||||
echo $(PROPERTIES) > $(<)
|
||||
echo $(>) >> $(<)
|
||||
}
|
||||
|
||||
make f.obj : f.cpp /lib2/helper//e.obj : mfc-compile ;
|
||||
@@ -1,21 +0,0 @@
|
||||
|
||||
# This project-root.jam also serves the role of Jamfile
|
||||
project lib3 ;
|
||||
|
||||
use-project /lib2/helper : ../lib2/helper ;
|
||||
|
||||
import property ;
|
||||
|
||||
rule mfc-compile ( target : sources * : property-set * )
|
||||
{
|
||||
PROPERTIES on $(target) = [
|
||||
property.as-path [ property.remove incidental : $(property-set) ] ] ;
|
||||
}
|
||||
|
||||
actions mfc-compile
|
||||
{
|
||||
echo $(PROPERTIES) > $(<)
|
||||
echo $(>) >> $(<)
|
||||
}
|
||||
|
||||
make f.obj : f.cpp /lib2/helper//e.obj : mfc-compile ;
|
||||
|
||||
@@ -10,7 +10,8 @@ from BoostBuild import Tester, List
|
||||
# Test that free property inside
|
||||
t = Tester()
|
||||
|
||||
t.write("project-root.jam", """
|
||||
t.write("project-root.jam", "")
|
||||
t.write("Jamfile", """
|
||||
project ;
|
||||
|
||||
variant debug-AA : debug : <define>AA ;
|
||||
|
||||
Reference in New Issue
Block a user