From bb6cc4950814aeb49714f9a7d32e3948ff6064de Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Mon, 1 Sep 2003 13:57:35 +0000 Subject: [PATCH] Robustify some code. [SVN r19898] --- new/targets.jam | 6 +++--- v2/build/targets.jam | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/new/targets.jam b/new/targets.jam index 2a8912cd4..9fe3f3689 100644 --- a/new/targets.jam +++ b/new/targets.jam @@ -656,7 +656,7 @@ rule find ( id : current-location ) # The project used for finding main targets and for providing base directory # for file paths. local base-project = [ project.find $(project-part) : $(current-location) ] ; - + # Interpret target-part as project-id if ! $(have-project-reference) { @@ -668,7 +668,7 @@ rule find ( id : current-location ) } # Interpret target-name as name of main target - if ! $(target) + if ! $(target) && $(base-project) { local project-target = [ project.target $(base-project) ] ; if [ $(project-target).has-main-target $(target-part) ] @@ -677,7 +677,7 @@ rule find ( id : current-location ) } } - if ! $(target) && ! $(have-project-reference) + if ! $(target) && ! $(have-project-reference) && $(base-project) { local location = [ path.root $(target-part) [ project.attribute $(base-project) source-location ] ] ; diff --git a/v2/build/targets.jam b/v2/build/targets.jam index 2a8912cd4..9fe3f3689 100644 --- a/v2/build/targets.jam +++ b/v2/build/targets.jam @@ -656,7 +656,7 @@ rule find ( id : current-location ) # The project used for finding main targets and for providing base directory # for file paths. local base-project = [ project.find $(project-part) : $(current-location) ] ; - + # Interpret target-part as project-id if ! $(have-project-reference) { @@ -668,7 +668,7 @@ rule find ( id : current-location ) } # Interpret target-name as name of main target - if ! $(target) + if ! $(target) && $(base-project) { local project-target = [ project.target $(base-project) ] ; if [ $(project-target).has-main-target $(target-part) ] @@ -677,7 +677,7 @@ rule find ( id : current-location ) } } - if ! $(target) && ! $(have-project-reference) + if ! $(target) && ! $(have-project-reference) && $(base-project) { local location = [ path.root $(target-part) [ project.attribute $(base-project) source-location ] ] ;