[Scons-users] always up to date when target is a directory

Carnë Draug carandraug+dev at gmail.com
Thu Feb 21 06:06:02 EST 2013


On 20 February 2013 08:50, Dirk Bächle <tshortik at gmx.de> wrote:

> Hi Carnë,

>

> On 20.02.2013 03:11, Carnë Draug wrote:

>>

>> On 15 February 2013 15:19, Dirk Bächle <tshortik at gmx.de> wrote:

>>>

>>> On 15.02.2013 02:45, Carnė Draug wrote:

>>>>

>>>> [...]

>>>>

>>>>

>>>> The files generated by 'extract_sequences.pl' are a bunch of files

>>>> downloaded from an online database, their filenames dependent on their

>>>> IDs and they will change with each run. I can't know their names in

>>>> advance by scanning the source file. The target is the directory since

>>>> it may even be possible (but unlikely) that no file gets downloaded.

>>>> I'm just having the program saving a log file and using it as target

>>>> but could I do if that was not an option?

>>>>

>>>> Thanks,

>>>> Carnë

>>>>

>

> this sounds to me as if you want to *always* run the script and update your

> output directory with it. In this case you could use the AlwaysBuild method

> as follows:

>

> data = env.Command(target = "results/sequences/",

> source = "scripts/extract_sequences.pl"),

> action = "$SOURCE")

> env.AlwaysBuild(data)

>

> Then your target 'results/sequences/' is always regarded as out of date.

> Does this help?


I don't want it to be always out of date because I may be "building"
the other targets that are dependent on this data, but not download it
unless I specify it. I think my set up is a bit atypical. I have 3
targets, data, analysis and publication with each requiring stuff from
the previous.

If I set env.AlwaysBuild(data), and data being a dependency of
analysis, it will always get new data which I don't want to. Does my
problem make sense?

Thank you for your help.

Carnë


More information about the Scons-users mailing list