2
0
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:
Vladimir Prus
2005-04-28 14:14:59 +00:00
parent dcf84cf941
commit ee6fbe513e
2 changed files with 19 additions and 3 deletions

View File

@@ -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 ;
}

View File

@@ -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
{