Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2002-07-01 09:52:23


David Abrahams wrote:
> ----- Original Message -----
> From: "Vladimir Prus" <ghost_at_[hidden]>
>
> > > I hate adding new global variables. Can we do it with ALWAYS and/or
> > > TOUCH/UNTOUCH rules? If that gets too messy, I agree we should just go
>
> with
>
> > > the variable.
> >
> > IMO, we really need to allow changing the set of target where traversal
> > begings. NoUpdate can be used to remove elements from there. But to add
> > elements to the set we'd need either the variable or a new builtin.
>
> OK, fine with me. I trust your judgement on this.

I've almost done with it. I've implemented a new builtin, tentatively called
"UPDATE" which causes target to behave as if they were specified in the
command line. To test, apply the attached patch, and then run

bjam -ftest -d+12 another

You'll see "all" in the dependency graph, while it is not there without
"UPDATE all" line in "test".

I'll commit the change after some more testing.

> > See jam.c, lines 407-410 for the part that should be changed.
>
> Why don't you just go ahead and make the changes?

Was going to do that, actually. I gave the line numbers so that you can refer
to the jam's logic in case you don't remember it.

In fact, I think that Jam's terms are wierd. ALWAYS rule should be called
"TOUCH" while my new UPDATE rule should be called ALWAYS.
But we can't change that, for sure!

> BTW, I'm working on the path minimization stuff now. Give me a couple of
> hours...

This is very good. As for me, I planned to finish getting buld request from
command line today... but spend too long time arguing with a colleague about
proper development process :-)

- Volodya
 --------------Boundary-00=_BZRK9S1NKYSU0IAVS8TS Content-Type: text/x-diff;
charset="koi8-r";
name="update_rule.diff"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="update_rule.diff"

SW5kZXg6IGJ1aWx0aW5zLmMKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PQpSQ1MgZmlsZTogL2N2c3Jvb3QvYm9vc3QvYm9v
c3QvdG9vbHMvYnVpbGQvamFtX3NyYy9idWlsdGlucy5jLHYKcmV0cmlldmluZyByZXZpc2lvbiAx
LjkKZGlmZiAtdSAtcjEuOSBidWlsdGlucy5jCi0tLSBidWlsdGlucy5jCTgg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gICAgIGNoYXIgKip0YXJnZXRzID0gKGNoYXIgKiopbWFsbG9jKHRh
cmdldHNfY291bnQgKiBzaXplb2YoY2hhciAqKSk7CisgICAgICAgIGZvciAoIG47IG4gPCBhcmdj
OyBuKysgKQorICAgICAgICB7CisgICAgICAgICAgICB0YXJnZXRzW25dID0gYXJndltuXTsKKyAg
ICAgICAgfQorICAgICAgICBmb3IgKCA7IGV4dHJhX3RhcmdldHM7IGV4dHJhX3RhcmdldHMgPSBs
aXN0X25leHQoZXh0cmFfdGFyZ2V0cykgKQorICAgICAgICB7CisgICAgICAgICAgICB0YXJnZXRz
W24rK10gPSBleHRyYV90YXJnZXRzLT5zdHJpbmc7CisgICAgICAgIH0KKyAgICAgICAKKyAgICAg
ICAgc3RhdHVzIHw9IG1ha2UoIHRhcmdldHNfY291bnQsIHRhcmdldHMsIGFueWhvdyApOworICAg
ICAgICBmcmVlKHRhcmdldHMpOworICAgIH0KKwogCiAgICAgaWYgKCBERUJVR19QUk9GSUxFICkK
ICAgICAgICAgcHJvZmlsZV9kdW1wKCk7Cg==
 --------------Boundary-00=_BZRK9S1NKYSU0IAVS8TS Content-Type: text/plain;
charset="koi8-r";
name="test"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="test"

Ck5PVEZJTEUgYWxsIGFub3RoZXIgOwpVUERBVEUgYWxsIDs=
 --------------Boundary-00=_BZRK9S1NKYSU0IAVS8TS--


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