From 36f219575f7f8ac2ee645b3fb0f759c053d846ba Mon Sep 17 00:00:00 2001 From: vsr Date: Fri, 16 Aug 2013 06:57:57 +0000 Subject: [PATCH] Small improvement: remove redundant "VERSION" variables --- CMakeLists.txt | 6 ++---- KERNEL_version.h.in | 20 +++++++++++++++----- bin/VERSION.in | 4 ++-- doc/docutils/conf.py.in | 6 +++--- doc/salome/gui/static/header.html.in | 2 +- doc/salome/tui/static/header.html.in | 2 +- resources/KERNELCatalog.xml.in | 6 +++--- 7 files changed, 27 insertions(+), 19 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 12157d472..5e62058e2 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,9 +34,7 @@ SET(${PROJECT_NAME_UC}_MINOR_VERSION 2) SET(${PROJECT_NAME_UC}_PATCH_VERSION 0) SET(${PROJECT_NAME_UC}_VERSION ${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION}) - -SET(VERSION ${${PROJECT_NAME_UC}_VERSION}) -SET(VERSION_DEV "0") +SET(${PROJECT_NAME_UC}_VERSION_DEV 1) # Our own set of macros: LIST(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/salome_adm/cmake_files") @@ -169,7 +167,7 @@ ENDIF() # Header configuration # ==================== EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "import sys; t=sys.argv[-1].split(\".\") ; t[:]=(int(elt) for elt in t) ; sys.stdout.write(\"0x%02x%02x%02x\"%tuple(t))" ${${PROJECT_NAME_UC}_VERSION} - OUTPUT_VARIABLE XVERSION) + OUTPUT_VARIABLE ${PROJECT_NAME_UC}_XVERSION) SET(input ${CMAKE_CURRENT_SOURCE_DIR}/KERNEL_version.h.in) SET(output ${CMAKE_CURRENT_BINARY_DIR}/KERNEL_version.h) MESSAGE(STATUS "Creation of ${output}") diff --git a/KERNEL_version.h.in b/KERNEL_version.h.in index 9fa510c38..b16822186 100644 --- a/KERNEL_version.h.in +++ b/KERNEL_version.h.in @@ -27,12 +27,22 @@ #if !defined(__KERNEL_VERSION_H__) #define __KERNEL_VERSION_H__ -/* - KERNEL_VERSION is (major << 16) + (minor << 8) + patch. +/*! + Specify version of SALOME KERNEL module, as follows + + KERNEL_VERSION_MAJOR : (integer) number identifying major version + KERNEL_VERSION_MINOR : (integer) number identifying minor version + KERNEL_VERSION_MAINTENANCE : (integer) number identifying maintenance version + KERNEL_VERSION_STR : (string) complete version number "major.minor.maintenance" + KERNEL_VERSION : (hex) complete version number (major << 16) + (minor << 8) + maintenance + KERNEL_DEVELOPMENT : (integer) indicates development version when set to 1 */ -#define KERNEL_VERSION_STR "@KERNEL_VERSION@" -#define KERNEL_VERSION @XVERSION@ -#define KERNEL_DEVELOPMENT @VERSION_DEV@ +#define KERNEL_VERSION_MAJOR @SALOMEKERNEL_MAJOR_VERSION@ +#define KERNEL_VERSION_MINOR @SALOMEKERNEL_MINOR_VERSION@ +#define KERNEL_VERSION_MAINTENANCE @SALOMEKERNEL_PATCH_VERSION@ +#define KERNEL_VERSION_STR "@SALOMEKERNEL_VERSION@" +#define KERNEL_VERSION @SALOMEKERNEL_XVERSION@ +#define KERNEL_DEVELOPMENT @SALOMEKERNEL_VERSION_DEV@ #endif // __KERNEL_VERSION_H__ diff --git a/bin/VERSION.in b/bin/VERSION.in index 8cc2a5bb4..ab506d68d 100755 --- a/bin/VERSION.in +++ b/bin/VERSION.in @@ -1,2 +1,2 @@ -[SALOME KERNEL] : @VERSION@ -[DEVELOPMENT] : @VERSION_DEV@ +[SALOME KERNEL] : @SALOMEKERNEL_VERSION@ +[DEVELOPMENT] : @SALOMEKERNEL_VERSION_DEV@ diff --git a/doc/docutils/conf.py.in b/doc/docutils/conf.py.in index cea4f5734..f0efca241 100644 --- a/doc/docutils/conf.py.in +++ b/doc/docutils/conf.py.in @@ -46,7 +46,7 @@ source_encoding = 'utf-8' master_doc = 'index' # General information about the project. -project = 'KERNEL python packages' +project = 'SALOME KERNEL python packages' copyright = '2010 EDF R&D' # The version info for the project you're documenting, acts as replacement for @@ -54,9 +54,9 @@ copyright = '2010 EDF R&D' # built documents. # # The short X.Y version. -version = '@VERSION@' +version = '@SALOMEKERNEL_VERSION@' # The full version, including alpha/beta/rc tags. -release = '@VERSION@' +release = '@SALOMEKERNEL_VERSION@' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/doc/salome/gui/static/header.html.in b/doc/salome/gui/static/header.html.in index cd9329091..fe321efa8 100755 --- a/doc/salome/gui/static/header.html.in +++ b/doc/salome/gui/static/header.html.in @@ -19,5 +19,5 @@ $extrastylesheet
-
Version: @VERSION@
+
Version: @SALOMEKERNEL_VERSION@
diff --git a/doc/salome/tui/static/header.html.in b/doc/salome/tui/static/header.html.in index cd9329091..fe321efa8 100755 --- a/doc/salome/tui/static/header.html.in +++ b/doc/salome/tui/static/header.html.in @@ -19,5 +19,5 @@ $extrastylesheet
-
Version: @VERSION@
+
Version: @SALOMEKERNEL_VERSION@
diff --git a/resources/KERNELCatalog.xml.in b/resources/KERNELCatalog.xml.in index 1fdc30ada..5648c41fd 100644 --- a/resources/KERNELCatalog.xml.in +++ b/resources/KERNELCatalog.xml.in @@ -75,7 +75,7 @@ Salome Other NRI - @VERSION@ + @SALOMEKERNEL_VERSION@ GUI Neutral Context 1 @@ -86,7 +86,7 @@ SalomeTestComponent Other NRI - @VERSION@ + @SALOMEKERNEL_VERSION@ GUI Neutral Context 1 'linux' ~ OS @@ -96,7 +96,7 @@ SALOME_TestComponentPy Other NRI - @VERSION@ + @SALOMEKERNEL_VERSION@ GUI Neutral Context 1 'linux' ~ OS -- 2.39.2