[Scons-users] global cleanup

Chris BeHanna chris at behanna.org
Thu Aug 23 12:51:59 EDT 2012


On Aug 23, 2012, at 07:33 , Francis Bolduc <fbolduc at gmail.com> wrote:


>> prg = env.Program()

>> env.Clean("clean", [prg, "config.log"])

>

> There is no need to explicitly call "Clean" on files that SCons knows,

> such as the product of a builder like "Program". Since SCons knows

> them, they will be deleted when you invoke "scons -c" at the

> top-level.


Although this is true, and it works, you *do* have to wait for scons to initialize and build the DAG before it starts cleaning. For large builds, this can take awhile.

Personally, I find it far more convenient and expedient to simply use a VariantDir() and do my cleaning via "rm -rf". It's also dead-simple, with this method, to tell your version control system to ignore your build outputs tree and easily see what you've changed without having to have that view cluttered up with derived files.

--
Chris BeHanna
chris at behanna.org


More information about the Scons-users mailing list