4 import SENFSCons, os, re
6 ###########################################################################
8 # Create local_config.h
9 if not env.GetOption('clean') and not os.path.exists("local_config.hh"):
10 Execute(Touch("local_config.hh"))
12 # Ext/SConscript is last so it can depend on env vars set by any other script
13 # (e.g. $PACKET_BUNDLES)
14 SConscript(sorted(list(set(env.Glob("*/SConscript", strings=True)) - set(("Ext/SConscript",)))))
15 SConscript("Ext/SConscript")
17 env.InstallSubdir(target = '$INCLUDEINSTALLDIR',
18 source = sorted(env.Glob("*.hh", strings=True)))
23 svn_info = re.search('.*last changed rev: (\d+).*', os.popen('svn info').read().strip().lower());
25 REV = int(svn_info.groups()[0])
28 env.CreateFile("Version.hh", env.Value(
29 '// auto-generated file.\n\n'
30 '#ifndef HH_SENF_Version\n'
31 '#define HH_SENF_Version\n\n'
32 '// SENF_VERSION %% 100000 is the revision number\n'
33 '// SENF_VERSION / 100000 %% 100 is the minor version\n'
34 '// SENF_VERSION / 10000000 is the major version\n'
35 '#define SENF_VERSION %(MAJOR)d%(MINOR)02d%(REV)05d\n\n'
36 '#define SENF_LIB_VERSION "%(MAJOR)d.%(MINOR)02d"\n\n'
37 '#define SENF_REVISION "%(REV)d"\n\n'
38 '#endif\n' % locals()) )