Subject: Re: [Boost-build] b2 option parsing
From: Stefan Seefeld (stefan_at_[hidden])
Date: 2016-10-30 22:40:21
On 30.10.2016 22:34, Steven Watanabe wrote:
> On 10/30/2016 08:21 PM, Stefan Seefeld wrote:
>> To illustrate with a use-case: If I want to implement an automatic
>> 'clean' target, I need to know what (other) targets are currently known
>> to the system so I can figure out what files they correspond to (if
>> any), and thus what artefacts need to be removed.
> Boost.Build implements clean by tracking
> targets to clean as they are created.
> In particular, every time we create a target,
> we also run:
> common.Clean clean-all : $(actual-targets) ;
> Trying to use Jam's internal target list
> for this is not a good idea as it will
> include many targets that should not
> be cleaned including:
> - directories
> - NOTFILE targets
> - Targets for pre-existing sources and headers.
> - multiple targets referring to the same file.
> - etc.
I was hoping that I could figure out the above "do not clean" cases by
inspecting the targets' attributes, somehow. (I haven't done any
detailed investigation on this yet, this was just an idea I had that
seemed a good motivation for inspecting the (typed) target list.)
(I'm in general hoping that using a real type system in addition to
Python's introspection support might make many tasks easier than trying
the same with an ad-hoc language.)
-- ...ich hab' noch einen Koffer in Berlin...
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