From efc4f099b459833cc424f133716824bc0efc060e Mon Sep 17 00:00:00 2001 From: Chris Johns Date: Wed, 9 Dec 2015 20:08:19 +1100 Subject: 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. --- linkers/rtems-ld.cpp | 1 + linkers/rtems-ra.cpp | 2 ++ linkers/rtems-rapper.cpp | 2 ++ linkers/rtems-syms.cpp | 2 ++ linkers/rtems-tld.cpp | 1 + linkers/wscript | 23 ++++++++++++----------- 6 files changed, 20 insertions(+), 11 deletions(-) (limited to 'linkers') diff --git a/linkers/rtems-ld.cpp b/linkers/rtems-ld.cpp index e8d79db..92258df 100644 --- a/linkers/rtems-ld.cpp +++ b/linkers/rtems-ld.cpp @@ -212,6 +212,7 @@ main (int argc, char* argv[]) { case 'V': std::cout << "rtems-ld (RTEMS Linker) " << rld::version () + << ", RTEMS revision " << rld::rtems::version () << std::endl; ::exit (0); break; diff --git a/linkers/rtems-ra.cpp b/linkers/rtems-ra.cpp index 7b7a98b..efd4cf9 100644 --- a/linkers/rtems-ra.cpp +++ b/linkers/rtems-ra.cpp @@ -42,6 +42,7 @@ #include #include #include +#include #ifndef HAVE_KILL #define kill(p,s) raise(s) @@ -183,6 +184,7 @@ main (int argc, char* argv[]) { case 'V': std::cout << "rtems-ra (RTEMS Linker) " << rld::version () + << ", RTEMS revision " << rld::rtems::version () << std::endl; ::exit (0); break; diff --git a/linkers/rtems-rapper.cpp b/linkers/rtems-rapper.cpp index e0d27a0..afc301d 100644 --- a/linkers/rtems-rapper.cpp +++ b/linkers/rtems-rapper.cpp @@ -44,6 +44,7 @@ #include #include #include +#include #include @@ -1172,6 +1173,7 @@ main (int argc, char* argv[]) { case 'V': std::cout << "rtems-rap (RTEMS RAP Manager) " << rld::version () + << ", RTEMS revision " << rld::rtems::version () << std::endl; ::exit (0); break; diff --git a/linkers/rtems-syms.cpp b/linkers/rtems-syms.cpp index 3fb7992..c8f54ae 100644 --- a/linkers/rtems-syms.cpp +++ b/linkers/rtems-syms.cpp @@ -43,6 +43,7 @@ #include #include #include +#include #ifndef HAVE_KILL #define kill(p,s) raise(s) @@ -329,6 +330,7 @@ main (int argc, char* argv[]) { case 'V': std::cout << "rtems-syms (RTEMS Symbols) " << rld::version () + << ", RTEMS revision " << rld::rtems::version () << std::endl; ::exit (0); break; diff --git a/linkers/rtems-tld.cpp b/linkers/rtems-tld.cpp index 01c0853..c405f39 100644 --- a/linkers/rtems-tld.cpp +++ b/linkers/rtems-tld.cpp @@ -1736,6 +1736,7 @@ main (int argc, char* argv[]) { case 'V': std::cout << "rtems-trace-ld (RTEMS Trace Linker) " << rld::version () + << ", RTEMS revision " << rld::rtems::version () << std::endl; ::exit (0); break; diff --git a/linkers/wscript b/linkers/wscript index c1c4a61..8f56752 100644 --- a/linkers/wscript +++ b/linkers/wscript @@ -33,10 +33,6 @@ # import sys -version_major = 1 -version_minor = 0 -version_revision = 0 - def options(opt): opt.load('compiler_c') opt.load('compiler_cxx') @@ -45,8 +41,6 @@ def configure(conf): conf.load('compiler_c') conf.load('compiler_cxx') - conf.env.C_OPTS = conf.options.c_opts.split(',') - conf.env.RTEMS_VERSION = conf.options.rtems_version conf.write_config_header('config.h') def build(bld): @@ -84,12 +78,19 @@ def build(bld): # modules = ['rld', 'elf', 'iberty'] + # + # The list of defines + # + defines = ['HAVE_CONFIG_H=1', + 'RTEMS_VERSION=\"%s\"' % (bld.env.RTEMS_VERSION), + 'RTEMS_RELEASE=\"%s\"' % (bld.env.RTEMS_RELEASE)] + # # Build the linker. # bld.program(target = 'rtems-ld', source = ['rtems-ld.cpp'], - defines = ['HAVE_CONFIG_H=1', 'RTEMS_VERSION=' + bld.env.RTEMS_VERSION], + defines = defines, includes = ['.'] + conf['includes'], cflags = conf['cflags'] + conf['warningflags'], cxxflags = conf['cxxflags'] + conf['warningflags'], @@ -101,7 +102,7 @@ def build(bld): # bld.program(target = 'rtems-ra', source = ['rtems-ra.cpp'], - defines = ['HAVE_CONFIG_H=1', 'RTEMS_VERSION=' + bld.env.RTEMS_VERSION], + defines = defines, includes = ['.'] + conf['includes'], cflags = conf['cflags'] + conf['warningflags'], cxxflags = conf['cxxflags'] + conf['warningflags'], @@ -113,7 +114,7 @@ def build(bld): # bld.program(target = 'rtems-tld', source = ['rtems-tld.cpp'], - defines = ['HAVE_CONFIG_H=1', 'RTEMS_VERSION=' + bld.env.RTEMS_VERSION], + defines = defines, includes = ['.'] + conf['includes'], cflags = conf['cflags'] + conf['warningflags'], cxxflags = conf['cxxflags'] + conf['warningflags'], @@ -139,7 +140,7 @@ def build(bld): # bld.program(target = 'rtems-syms', source = ['rtems-syms.cpp'], - defines = ['HAVE_CONFIG_H=1', 'RTEMS_VERSION=' + bld.env.RTEMS_VERSION], + defines = defines, includes = ['.'] + conf['includes'], cflags = conf['cflags'] + conf['warningflags'], cxxflags = conf['cxxflags'] + conf['warningflags'], @@ -151,7 +152,7 @@ def build(bld): # bld.program(target = 'rtems-rap', source = ['rtems-rapper.cpp'], - defines = ['HAVE_CONFIG_H=1', 'RTEMS_VERSION=' + bld.env.RTEMS_VERSION], + defines = defines, includes = ['.'] + conf['includes'], cflags = conf['cflags'] + conf['warningflags'], cxxflags = conf['cxxflags'] + conf['warningflags'], -- cgit v1.2.3