Boost logo

Boost-Build :

From: Matthew Herrmann (matthew.herrmann_at_[hidden])
Date: 2006-03-30 01:35:29


Hi,

I've noticed that removing a source file doesn't invalidate the link step when
using 'globbed' sources.

I understand that this is because the build "model" is the current Jamfile, so
the system loses all knowledge of previous sources after files are moved:
since all .o files are up-to-date, it reasons that the linked executable must
be up-to-date too. This is not true if the dependencies going into the link
have changed, however.

I could see this being solved by the following:

- the generator takes in a bunch of .o files and produces a .a and a .parm
file.
- gcc is invoked with a bunch of command-line options, including all the files
to link.
- the .parm file simply contains the command-line options used to produce the
main target (lib or exe).
- when doing an up-to-date check of a target, if the command-line that would
be evoked to produce a target does not match the contents of the .parm file,
delete both files and invalidate the target. Do not simply look at the target
file's timestamp.

Generalising this, #defines could then also be handled safely since these
changes would then be reflected in the parameters to the compiler. Further,
any changes to jamfile link/compile parameters would automatically trigger a
rebuild of the necessary components.

Is such an approach possible? Should I write this up into a ticket for boost
build?

-- 
Matthew Herrmann
matthew.herrmann_at_[hidden]
Vice President, Software Architecture
Zomojo Pty Ltd

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