How to make SCons update installed files inside a directory that have changed?
-
03-07-2019 - |
Question
I'm doing:
data = env.InstallAs('$PREFIX/share/odysi', 'data')
env.Alias('install', data)
Which works fine the first time. But if I change something inside the 'data' folder and do scons -Q install
again, it says ``install' is up to date.` even though a file has changed and needs to be reinstalled.
There are a lot of files in the directory (and sub directories) so if I can avoid explicitly listing them, that would be best. Tips?
Solution
This should do the trick:
files = Glob('data/*.*')
data = env.Install('$PREFIX/share/odysi', files)
env.Alias('install', data)
It needs at least SCons 1.0.1 for Glob support.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow