Scons: multiple files as a target

I have a script, say, "foo.py" that depends on some file, say, "dep.par", and I would call them as

python foo.py --parameters=dep.par 

If foo.py writes only one output file, "bar.dat", I would say:

 env=Environment() env.Command("bar.dat", "dep.par", "python foo.py --parameters=dep.par") 

However, I need a case where foo.py displays more than one file, say, "bar1.dat, bar2.dat, ..., barN.dat".

I am at a loss, any help would be appreciated, thanks.

+4
source share
1 answer

The target (and / or source) can be a list of goals as follows:

 env=Environment() env.Command(["bar1.dat", "bar2.dat"], "dep.par", "python foo.py --parameters=dep.par") 
+5
source

Source: https://habr.com/ru/post/1447134/


All Articles