[Scons-users] Starting with a clean installation directory

Pico Geyer picogeyer at gmail.com
Mon Oct 21 15:22:23 EDT 2013


On Mon, Oct 21, 2013 at 8:09 PM, Dirk Bächle <tshortik at gmx.de> wrote:


> Hi Pico,

>

>

> On 21.10.2013 19:42, Pico Geyer wrote:

>

>> Hi all.

>>

>> I seem to be struggling with something that should be quite trivial.

>> I would like to delete my installation directory to get rid of any stale

>> files before installing my various targets.

>>

>> [...]

>>

>>

>> What's the simplest way to achieve this?

>>

>

> I think you're looking for

>

> Execute(Delete('../install_**dir'))

>

> which removes the folder at the time when the SConscript is read in, and

> not during the Build process like for Command().

> Please, also have a look in the UserGuide, "12.7. Executing an action

> immediately: the Execute Function".

>


Dirk, Thanks for the response.
However that's not quite what I'm looking for.
Perhaps it was not well illustrated by my simple example.
Let say my build also contained a build of a program bar, I don't want my
installation directory to be deleted just because I tried to build bar.
If however I delete foo.txt from my build and then I run the install
target, I don't want to see foo.txt in the install directory.

So I actually do want the delete target to be a dependency of any of the
install targets. I'm just not sure how to achieve that.

Regards,
Pico
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://four.pairlist.net/pipermail/scons-users/attachments/20131021/de405575/attachment.htm


More information about the Scons-users mailing list