summaryrefslogtreecommitdiff
path: root/wscript
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2015-12-09 20:08:19 +1100
committerChris Johns <chrisj@rtems.org>2015-12-09 20:08:19 +1100
commitefc4f099b459833cc424f133716824bc0efc060e (patch)
tree683f0eb50e7bcb1f67175fc96d08228740b959ba /wscript
parentc9fa1795616ed8e9e71e7922e0a3fa52aff465f0 (diff)
Add release versioning support.
Support a top level VERSION file that defines an RTEMS release. Fix the install of the python modules including thertems-test. Update the git python module to the RSB version. Fix the options to not call clean and to call dirty. Update the version python module. Fix the rtld C++ support to the VERSION file and the top level waf script.
Diffstat (limited to 'wscript')
-rw-r--r--wscript27
1 files changed, 21 insertions, 6 deletions
diff --git a/wscript b/wscript
index 674b640..654845d 100644
--- a/wscript
+++ b/wscript
@@ -1,6 +1,6 @@
#
# RTEMS Tools Project (http://www.rtems.org/)
-# Copyright 2014, 2015 Chris Johns (chrisj@rtems.org)
+# Copyright 2014-2015 Chris Johns (chrisj@rtems.org)
# All rights reserved.
#
# This file is part of the RTEMS Tools package in 'rtems-tools'.
@@ -28,20 +28,33 @@
# POSSIBILITY OF SUCH DAMAGE.
#
+import os.path
+
subdirs = ['rtemstoolkit',
'linkers',
'tester',
'tools/gdb/python']
+def get_version(ctx):
+ release = '4.12.not_released'
+ if os.path.exists('VERSION'):
+ try:
+ with open('VERSION') as v:
+ release = v.readline().strip()
+ v.close()
+ except:
+ ctx.fatal('cannot access the VERSION file')
+ last_dot = release.rfind('.')
+ if last_dot == -1:
+ ctx.fatal('invalid VERSION file')
+ revision = release[0:last_dot]
+ return revision, release
+
def recurse(ctx):
for sd in subdirs:
ctx.recurse(sd)
def options(ctx):
- ctx.add_option('--rtems-version',
- default = '4.11',
- dest='rtems_version',
- help = 'Set the RTEMS version')
ctx.add_option('--c-opts',
default = '-O2',
dest='c_opts',
@@ -69,12 +82,14 @@ def configure(ctx):
ctx.load("doxygen", tooldir = 'waf-tools')
except:
pass
+ ctx.env.RTEMS_VERSION, ctx.env.RTEMS_RELEASE = get_version(ctx)
ctx.env.C_OPTS = ctx.options.c_opts.split(',')
- ctx.env.RTEMS_VERSION = ctx.options.rtems_version
check_options(ctx, ctx.options.host)
recurse(ctx)
def build(ctx):
+ if os.path.exists('VERSION'):
+ ctx.install_files('${PREFIX}/share/rtems/rtemstoolkit', ['VERSION'])
recurse(ctx)
def install(ctx):