summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-11-01 23:12:28 -0300
committerJuan Linietsky <reduzio@gmail.com>2017-11-01 23:13:27 -0300
commit79f81b77e2160fd4fb490b9e8e05636de70174bf (patch)
treee1596942656e0e6d9249e3f1921530edc40824fd /SConstruct
parent93a3d1714ee9b1535ac8f902bd7b2b3135712b90 (diff)
-Modules can now add custom version info (added it for Mono)
-Version string takes this version info -Ability to download templates from the interweb (listing does not work yet)
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct20
1 files changed, 14 insertions, 6 deletions
diff --git a/SConstruct b/SConstruct
index c05a4332ab..484368c9b5 100644
--- a/SConstruct
+++ b/SConstruct
@@ -11,7 +11,8 @@ import glob
import sys
import methods
-methods.update_version()
+# moved below to compensate with module version string
+# methods.update_version()
# scan possible build platforms
@@ -87,6 +88,7 @@ env_base.android_appattributes_chunk = ""
env_base.disabled_modules = []
env_base.use_ptrcall = False
env_base.split_drivers = False
+env_base.module_version_string = ""
# To decide whether to rebuild a file, use the MD5 sum only if the timestamp has changed.
# http://scons.org/doc/production/HTML/scons-user/ch06.html#idm139837621851792
@@ -111,6 +113,8 @@ env_base.__class__.android_add_gradle_plugin = methods.android_add_gradle_plugin
env_base.__class__.android_add_gradle_classpath = methods.android_add_gradle_classpath
env_base.__class__.disable_module = methods.disable_module
+env_base.__class__.add_module_version_string = methods.add_module_version_string
+
env_base.__class__.add_source_files = methods.add_source_files
env_base.__class__.use_windows_spawn_fix = methods.use_windows_spawn_fix
env_base.__class__.split_lib = methods.split_lib
@@ -358,11 +362,6 @@ if selected_platform in platform_list:
suffix += env.extra_suffix
- env["PROGSUFFIX"] = suffix + env["PROGSUFFIX"]
- env["OBJSUFFIX"] = suffix + env["OBJSUFFIX"]
- env["LIBSUFFIX"] = suffix + env["LIBSUFFIX"]
- env["SHLIBSUFFIX"] = suffix + env["SHLIBSUFFIX"]
-
sys.path.remove("./platform/" + selected_platform)
sys.modules.pop('detect')
@@ -391,6 +390,15 @@ if selected_platform in platform_list:
sys.path.remove(tmppath)
sys.modules.pop('config')
+ methods.update_version(env.module_version_string)
+
+ suffix += env.module_version_string
+
+ env["PROGSUFFIX"] = suffix + env["PROGSUFFIX"]
+ env["OBJSUFFIX"] = suffix + env["OBJSUFFIX"]
+ env["LIBSUFFIX"] = suffix + env["LIBSUFFIX"]
+ env["SHLIBSUFFIX"] = suffix + env["SHLIBSUFFIX"]
+
if (env.use_ptrcall):
env.Append(CPPFLAGS=['-DPTRCALL_ENABLED'])