Hi Steven,

I'm investigating an issue with bjam's handling of temporaries. It seems I'm still not understanding how bjam handles them. Consider this code snippet:

actions make {
  touch $(<)
}

actions cat {
  cat $(>) > $(<)
}

make A ;
cat B : A ;
cat C : A ;
cat D : B C ;

TEMPORARY B ;

DEPENDS B : A ;
DEPENDS D : B C ;

UPDATE D ;


Running `bjam` on this the first time creates A, B, C, and D, as expected. Calling it again updates D again, and I don't understand why. If I remove the TEMPORARY flag on B, D isn't updated, so this forceful update of D seems to be caused by B being a temp.

The second issue seems even more serious: if I remove B, and call bjam again, nothing is updated, as expected. But if I remove B and C and call bjam, I get an error as D is attempted to be updated after C is remade, but B wasn't updated (it's marked "temporary stable" in the debug output). Why isn't B updated first ?

The logic in make.c suggest's that, despite B's binding is set to PARENT (i.e., D), its fate is determined before that of D, and thus is found to be stable, even though a little later D's fate is set to update. Shouldn't a temporary's fate be determined *after* its parent ?

What am I missing ?

Thanks,


Stefan
-- 

      ...ich hab' noch einen Koffer in Berlin...