]> git.lyx.org Git - features.git/commitdiff
Define LYX_(MAJOR|MINOR)_VERSION also for scons build
authorPavel Sanda <sanda@lyx.org>
Wed, 16 Feb 2011 17:15:51 +0000 (17:15 +0000)
committerPavel Sanda <sanda@lyx.org>
Wed, 16 Feb 2011 17:15:51 +0000 (17:15 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37697 a592a061-630c-0410-9148-cb99ea01b6c8

development/scons/SConstruct

index de73df293606a02318ee0c83dfb0fe03e0944fe9..e018fa9db688e68649b571ff633ff7685f62bc13 100644 (file)
@@ -49,6 +49,13 @@ EnsureSConsVersion(0, 97)
 # get version number from configure.ac so that JMarc does
 # not have to change SConstruct during lyx release
 package_version, majmin_ver, lyx_date = utils.getVerFromConfigure(top_src_dir)
+try:
+    lyx_major_version = package_version.split('.')[0]
+    lyx_minor_version = package_version.split('.')[1]
+except IndexError, e:
+    lyx_major_version = majmin_ver[0]
+    lyx_minor_version = majmin_ver[1]
+
 package_cygwin_version = '%s-1' % package_version
 boost_version = ['1_34']
 
@@ -1024,6 +1031,10 @@ result = utils.createConfigFile(conf,
             'Define to the one symbol short name of this package.'),
         ('#define PACKAGE_VERSION "%s"' % package_version,
             'Define to the version of this package.'),
+        ('#define LYX_MAJOR_VERSION %d' % int(lyx_major_version),
+            'Define to the major version of this package.'),
+        ('#define LYX_MINOR_VERSION %d' % int(lyx_minor_version),
+            'Define to the minor version of this package.'),
         ('#define VERSION_INFO "%s"' % env['VERSION_INFO'].replace('\n', '\\n'),
             'Full version info'),
         ('#define LYX_DIR_VER "LYX_DIR_%sx"' % majmin_ver,