Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-06-16 01:12:24


Mark Elston wrote:

> > > warning: using independent target <lib1/msvc/debug>lib1.dll
> > > warning: using independent target <lib1/msvc/debug>lib1.rsp
> > > warning: using independent target <app/msvc/debug>app.rsp
> >
> > In the current version I see only one of those warnings. Anyway,
> > gotta remove the last one too.
>
> I have been having trouble getting the CVS stuff. I get timeout
> errors trying to connect. I will keep trying.
> How have you fixed this? Have you been modifying the tools/msvc.jam
> file? Or is it someplace else?

Actually, that's mostly generators.jam change. Generators in V2 are
abstraction of a build tool: they take some source target and produce some
results. The generators also have declared "result type".

Previously, generators returned only targets of result type. So, generator
which produces EXE would be given some OBJ, IMPLIB and SHARED_LIB, will
create and will create EXE from OBJ and IMPLIB but completely ignore
SHARED_LIB. As a result, the SHARED_LIB target will be seen by jam as created
but never used after that.

Now, generator for EXE will return both EXE target and the SHARED_LIB target
that it was given for source. So, there will be dependency from "all" target
to SHARED_LIB and the warning is not emitted.

I attach the relevant patch to generators.diff. There are some other changes
in other files, but since CVS does not have atomic commits, I have troubles
creating full diff.

HTH,
Volodya
 --Boundary-00=_IT+zAfsMU5RDR1I Content-Type: text/x-diff;
charset="iso-8859-1";
name="generators.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="generators.diff"

Index: generators.jam
===================================================================
RCS file: /cvsroot/boost/boost/tools/build/v2/build/generators.jam,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -r1.67 -r1.68
--- generators.jam 11 Dec 2003 13:46:11 -0000 1.67
+++ generators.jam 9 Jan 2004 11:55:31 -0000 1.68
@@ -451,6 +451,7 @@
for local t in $(targets)
{
$(t).action $(a) ;
+ $(t).set-intermediate true ;
}

return [ sequence.transform virtual-target.register : $(targets) ] ;
@@ -1007,7 +1008,20 @@
{
ensure-type $(sources) ;
}
-
+
+ if ! $(.construct-stack)
+ {
+ local sources2 ;
+ for local s in $(sources)
+ {
+ if ! [ $(s).intermediate ]
+ {
+ sources2 += $(s) ;
+ }
+ }
+ sources = $(sources2) ;
+ }
+
.construct-stack += 1 ;

increase-indent ;
@@ -1037,6 +1051,7 @@

.construct-stack = $(.construct-stack[2-]) ;

+ # For all targets of 'allowed-type', reset the 'intermediate' attribute.
if ! $(.construct-stack) && $(allowed-type) != * # This is first invocation in stack
{
local result2 ;
@@ -1052,14 +1067,12 @@
# checking for unused sources a bit harder.
if $(type) = $(target-type) || [ type.is-derived $(type) $(allowed-type) ]
{
- result2 += $(t) ;
+ $(t).set-intermediate ;
}
}
- return $(result2) ;
}
- else
- {
- return $(result) ;
- }
+
+
+ return $(result) ;
}

 --Boundary-00=_IT+zAfsMU5RDR1I--


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