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) , env.AddPreAction(target, action) See manpage: http://www.scons.org/doc/2.3.2/HTML/scons-man.html Where the action would be removing whatever files you want cleaned before the target in question is built. -Bill On Wed, Aug 20, 2014 at 6:14 PM, William Blevins <wblevins...@gmail.com> wrote: > 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 (call this clean) > execute t (compile A.x) > > V/R, > William > > _______________________________________________ > Scons-dev mailing list > Scons-dev@scons.org > http://two.pairlist.net/mailman/listinfo/scons-dev > >
_______________________________________________ Scons-dev mailing list Scons-dev@scons.org http://two.pairlist.net/mailman/listinfo/scons-dev