write all defines to sconf.h which is included by config.h instead of passing them on the command line

write the freaquently changing NSIS_VERSION to a separate file named version.h so only files that really need it will include it


git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4535 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2006-02-24 19:10:42 +00:00
parent 2af8b64f00
commit 7a5163ea59
3 changed files with 3 additions and 21 deletions

View file

@ -64,10 +64,9 @@ if env['PLATFORM'] == 'win32':
AddAvailableLibs(env, libs)
##### Configuration defines
##### Defines
env.Append(CPPDEFINES = ['_WIN32_IE=0x0500'])
env.Append(CPPDEFINES = env['NSIS_CPPDEFINES'])
##### Set PCH
@ -75,24 +74,6 @@ env.Append(CPPDEFINES = env['NSIS_CPPDEFINES'])
#env['PCH'] = env.PCH(pch)[0]
#env['PCHSTOP'] = pch
##### Version define
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_env = env.Copy()