Boost logo

Boost-Build :

From: Daniel Schlyder (daniel_at_[hidden])
Date: 2006-06-15 15:23:56


(This passed through moderation over 24 hours ago, but has so far failed
to reach the list (is that normal?), so I'm resending. Apologies if you
get this twice.)

I have a file tag.jam that contains a rule my-tag that I'd like to use
throughout my projects jamfiles. In an about six months old version of
Boost.Build v2, I could just

import tag : my-tag

and put

<tag>@my-tag

in project requirements. With CVS HEAD, this fails. my-tag is available
in the import caller, but <tag> requires that it be qualified. I've
found two work-arounds. I can either define a local rule

rule my-tag-wrapper ( name : type ? : property-set )
{
     return [ my-tag name : type : property-set ] ;
}

and use

<tag>@my-tag-wrapper

or use path-constant:

path-constant tag_module_path : tag ;
import $(tag_module_path) : my-tag ;

and then

<tag>@$(tag_module_path).my-tag

I could also use the module name directly, of course, but some of my
jamfiles import the module using path containing ".." and I'd prefer a
consistent solution. ("<tag>@../bbext/tag.my-tag" doesn't work, for
example.)

Should I just go ahead and modify all my jamfiles to use one of these
work-arounds, or is there a better solution? Is this a BB bug?

This is the error I get:

E:/libs/boost/tools/build/v2/kernel\modules.jam:66: in modules.call-in
rule Jamfile</E:/projects/libdasc/wc2>.my-tag unknown in module
Jamfile</E:/projec
ts/libdasc/wc2>.
E:/libs/boost/tools/build/v2/util\indirect.jam:82: in indirect.call
E:/libs/boost/tools/build/v2/build\virtual-target.jam:418: in _adjust-name
E:/libs/boost/tools/build/v2/build\virtual-target.jam:214: in
abstract-file-target
.__init__
E:/libs/boost/tools/build/v2/build\virtual-target.jam:511: in
object(file-target)@
427.__init__
E:/libs/boost/tools/build/v2/kernel\class.jam:92: in class.new
E:/libs/boost/tools/build/v2/build\generators.jam:437: in generated-targets
E:/libs/boost/tools/build/v2/build\generators.jam:358: in construct-result
E:/libs/boost/tools/build/v2/build\generators.jam:324: in run-really
E:/libs/boost/tools/build/v2/build\generators.jam:295: in
object(C-compiling-gener
ator)@22.run
E:/libs/boost/tools/build/v2/build\generators.jam:820: in
try-one-generator-really

E:/libs/boost/tools/build/v2/build\generators.jam:867: in try-one-generator
E:/libs/boost/tools/build/v2/build\generators.jam:1075: in construct-really
E:/libs/boost/tools/build/v2/build\generators.jam:1156: in
generators.construct
E:/libs/boost/tools/build/v2/build\targets.jam:1339: in construct
E:/libs/boost/tools/build/v2/build\targets.jam:1185: in
object(typed-target)@46.ge
nerate
E:/libs/boost/tools/build/v2/build\targets.jam:759: in generate-really
E:/libs/boost/tools/build/v2/build\targets.jam:735: in
object(main-target)@236.gen
erate
E:/libs/boost/tools/build/v2/build\targets.jam:252: in
object(project-target)@42.g
enerate
E:/libs/boost/tools/build/v2\build-system.jam:297: in load
E:\libs\boost\tools\build\v2/kernel\modules.jam:261: in import
E:\libs\boost\tools\build\v2/kernel/bootstrap.jam:132: in boost-build
E:\libs\boost\tools\build\v2\boost-build.jam:2: in module scope


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk