only pass -DNSIS_VERSION to files that actually use it
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4067 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
2a45f49a20
commit
7bd448c4ff
1 changed files with 16 additions and 2 deletions
|
@ -72,9 +72,23 @@ conf.Finish()
|
||||||
#env['PCH'] = env.PCH(pch)[0]
|
#env['PCH'] = env.PCH(pch)[0]
|
||||||
#env['PCHSTOP'] = pch
|
#env['PCHSTOP'] = pch
|
||||||
|
|
||||||
##### Defines
|
##### Version define
|
||||||
|
|
||||||
env.Append(CPPDEFINES = ['NSIS_VERSION=v$NSIS_VERSION'])
|
version_env = env.Copy()
|
||||||
|
version_env.Append(CPPDEFINES = ['NSIS_VERSION=v$VERSION'])
|
||||||
|
|
||||||
|
# only pass -DNSIS_VERSION to files that use it to minimize rebuilds
|
||||||
|
|
||||||
|
new_makensis_files = []
|
||||||
|
|
||||||
|
for file in makensis_files:
|
||||||
|
f = File(file).srcnode().abspath
|
||||||
|
if open(f).read().find('NSIS_VERSION') >= 0:
|
||||||
|
new_makensis_files.append(version_env.Object(file))
|
||||||
|
else:
|
||||||
|
new_makensis_files.append(file)
|
||||||
|
|
||||||
|
makensis_files = new_makensis_files
|
||||||
|
|
||||||
##### LZMA specific defines
|
##### LZMA specific defines
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue