2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-17 01:32:12 +00:00

Robustify 'print' module a little: print.text works okay even if empty

list of strings is passed.


[SVN r18799]
This commit is contained in:
Vladimir Prus
2003-06-16 12:13:38 +00:00
parent 7f607820ce
commit 774787a9fb
2 changed files with 12 additions and 6 deletions

View File

@@ -311,13 +311,16 @@ rule text (
}
}
}
else if $(output-target)
# Don't do anything if 'strings' is empty.
# Otherwise, no actions will be created for
# 'body' target, and bjam will say it can't update it
else if $(output-target) && $(strings)
{
local rule get-locate ( ) { return $(LOCATE) ; }
$(output-target).line ?= 0 ;
DEPENDS $(output-target) : $(output-target:G=body) ;
ALWAYS $(output-target:G=body) ;
LOCATE on $(output-target:G=body) = [ on $(output-target) get-locate ] ;
LOCATE on $(output-target:G=body) =
[ on $(output-target) return $(LOCATE) ] ;
while $(strings)
{
local line-v = $(output-target).line.$($(output-target).line) ;

View File

@@ -311,13 +311,16 @@ rule text (
}
}
}
else if $(output-target)
# Don't do anything if 'strings' is empty.
# Otherwise, no actions will be created for
# 'body' target, and bjam will say it can't update it
else if $(output-target) && $(strings)
{
local rule get-locate ( ) { return $(LOCATE) ; }
$(output-target).line ?= 0 ;
DEPENDS $(output-target) : $(output-target:G=body) ;
ALWAYS $(output-target:G=body) ;
LOCATE on $(output-target:G=body) = [ on $(output-target) get-locate ] ;
LOCATE on $(output-target:G=body) =
[ on $(output-target) return $(LOCATE) ] ;
while $(strings)
{
local line-v = $(output-target).line.$($(output-target).line) ;