[Scons-dev] Cleaning a target on rebuild

2014-08-20 Thread William Blevins
Is there a way to trigger a Clean for a target when SCons is required to rebuild it (IE. always build this target from clean if the target is not up-to-date)? Example: // variables t = Compile( A.x ) z = Clean( t, some additional clean items ) // workflow if t not up_to_date: execute z

Re: [Scons-dev] Cleaning a target on rebuild

2014-08-20 Thread Bill Deegan
William, You are thinking about order here. The better way to think in SCons is about dependencies and actions. SCons is designed for dependencies and actions and not for forcing order of execution. It seems likely what you really want is to use : AddPreAction(target, action) ,