Boost logo

Boost-Build :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-04-02 10:09:16


Larry, what are you trying to accomplish here?

If you just want to use classic Jam, stop defining BOOST_ROOT and leave
off the project-root call.

If you're trying to use Boost.Build, you have to accept that the Jamfile
gets processed twice.

Since the Jamfile is getting processed twice, test-rule is invoked
twice. You could write:

-----
project-root ;

actions test-rule
{
echo "action output is" $(<)
touch test.out
}

rule test-rule
{
ECHO "rule output is" $(<) ;
}

if ! $(gIN_LIB_INCLUDE)
{
test-rule always-target ;
}

----- Original Message -----
From: "Larry Evans" <jcampbell3_at_[hidden]>
To: <jamboost_at_[hidden]>
Sent: Tuesday, April 02, 2002 9:59 AM
Subject: [jamboost] why repeated action output?

> David Abrahams wrote ( in
http://groups.yahoo.com/group/jamboost/message/668 ):
>
> >
> > If I invoke
> >
> > jam always-target
> >
> > It does indeed print "action output is ."
>
> When I do that, I get 2 "action output is" outputs:
> <-------- output ------------------
> jam always-target
> rule output is always-target
> ...found 1 target...
> ...updating 1 target...
> test-rule always-target
> action output is always-target
> test-rule always-target
> action output is always-target
> ...updated 1 target...
> >------------------------------
> But I only want 1. Of course this is important in
> real Jamfiles since many actions are compile or link
> commands. I don't think this is how Jam is supposed
> to work; so, obviously I'm missing something again.
> Any suggestions about what that is?
>
> The Jamfile producing the above output is:
> <------ Jamfile ----------------
> project-root
> ;
>
> actions test-rule
> {
> echo "action output is" $(<)
> touch test.out
> }
>
> rule test-rule
> {
> if ( ! $(gIN_LIB_INCLUDE) )
> {
> ECHO "rule output is" $(<) ;
> }
> }
>
> test-rule always-target
> ;
> >---------------------------
>
> One thing that is confusing about the above output
> is the "rule output is always-target" comes first, and
> then the "test-rule always-target" output. I would
> expect that it would be the other way around, at least
> for one of the "test-rule always-target" outputs. I realize
> that this is probably because I'm just used to that being the way
most scripts
> and compiled programs work; however, I'm realizing
> (starting with Rene's post about double inclusion) that
> Jam does things differently. I assume this double inclusion
> is done to avoid storing the whole jam file in an some sort
> of jam AST and using a lot of memory. Is that right?
>
> TIA.
>
>
> ------------------------ Yahoo! Groups
Sponsor ---------------------~-->
> HOT! PRICE BREAKTHROUGH!
> SUPER Tiny Wireless Video Camera UNDER $80 BUCKS --> ORDER NOW!
> http://us.click.yahoo.com/y7toOC/8o6DAA/yigFAA/z3wwlB/TM
> ---------------------------------------------------------------------~
->
>
> To unsubscribe from this group, send an email to:
> jamboost-unsubscribe_at_[hidden]
>
>
>
> Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
>
>

 


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