2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-14 12:42:11 +00:00

Improve error reporting for bad target references.

This commit is contained in:
Vladimir Prus
2014-08-12 11:41:04 +04:00
parent a035bb74fb
commit 1b7ca464ae

View File

@@ -394,7 +394,7 @@ class project-target : abstract-target
if ! [ path.is-rooted $(project-part) ]
{
local rooted = [ path.root $(project-part) / ] ;
if [ project.is-registered-id $(rooted) ]
if $(rooted) && [ project.is-registered-id $(rooted) ]
{
extra-error-message += - possibly missing a leading
slash ('/') character. ;
@@ -830,6 +830,10 @@ rule resolve-reference ( target-reference : project )
# Separate target name from properties override.
local split = [ MATCH "^([^<]*)(/(<.*))?$" : $(target-reference) ] ;
local id = $(split[1]) ;
if ! $(split) || ! $(id)
{
error "Malformed target reference $(target-reference)" ;
}
local sproperties = ;
if $(split[3])
{