mirror of
https://github.com/boostorg/build.git
synced 2026-02-18 01:52:17 +00:00
Allow "bjam hello.o" to work.
[SVN r28514]
This commit is contained in:
@@ -138,6 +138,8 @@ if "--clean" in [ modules.peek : ARGV ]
|
||||
clean = true ;
|
||||
}
|
||||
|
||||
local bjam-targets ;
|
||||
|
||||
for local id in $(target-ids)
|
||||
{
|
||||
if $(id) = clean
|
||||
@@ -146,10 +148,12 @@ for local id in $(target-ids)
|
||||
}
|
||||
else
|
||||
{
|
||||
local t = [ $(current-project).find $(id) ] ;
|
||||
local t = [ $(current-project).find $(id) : no-error ] ;
|
||||
if ! $(t)
|
||||
{
|
||||
error target $(id) does not exist ;
|
||||
ECHO "notice: could not find main target " $(id) ;
|
||||
ECHO "notice: assuming it's a name of file to create " ;
|
||||
bjam-targets += $(id) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -194,7 +198,11 @@ for t in $(virtual-targets)
|
||||
NOTFILE all ;
|
||||
DEPENDS all : $(actual-targets) ;
|
||||
|
||||
if $(clean)
|
||||
if $(bjam-targets)
|
||||
{
|
||||
UPDATE $(bjam-targets) ;
|
||||
}
|
||||
else if $(clean)
|
||||
{
|
||||
UPDATE clean ;
|
||||
}
|
||||
|
||||
@@ -518,6 +518,14 @@ class file-target : abstract-file-target
|
||||
|
||||
common.MkDir $(d) ;
|
||||
}
|
||||
|
||||
# For real file target, we create gristless target that
|
||||
# depends on the real target. This allows to run
|
||||
#
|
||||
# bjam hello.o
|
||||
#
|
||||
# without trying to guess the name of the real target.
|
||||
DEPENDS $(target:G=) : $(target) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user