more changes to consolidate version definition into the top level wscript file
authorPaul Davis <paul@linuxaudiosystems.com>
Tue, 11 Jun 2013 15:37:52 +0000 (11:37 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Tue, 11 Jun 2013 15:37:52 +0000 (11:37 -0400)
gtk2_ardour/wscript
tools/define_versions.sh
wscript

index bba65c8c0afd27b1c72bfbbed74675f9638c7aa4..5a8ecc771c75849845149cc509e2047cede4c1fe 100644 (file)
@@ -8,12 +8,6 @@ import re
 import time
 from waflib.Task import Task
 
-# Version of this package (even if built as a child)
-MAJOR = '3'
-MINOR = '2'
-
-# Variables for 'waf dist'
-VERSION = "%s.%s" % (MAJOR, MINOR)
 I18N_PACKAGE = 'gtk2_ardour3'
 
 # Mandatory variables
@@ -266,7 +260,7 @@ def configure(conf):
     autowaf.build_version_files(
         path_prefix + 'version.h',
         path_prefix + 'version.cc',
-        'gtk2_ardour', MAJOR, MINOR, 0)
+        'gtk2_ardour', conf.env['MAJOR'], conf.env['MINOR'], 0)
     autowaf.configure(conf)
 
     if re.search ("linux", sys.platform) != None:
@@ -364,6 +358,8 @@ def build_color_scheme(path, prefix):
 
 def build(bld):
 
+    VERSION = "%s.%s" % (bld.env['MAJOR'], bld.env['MINOR'])
+
     if bld.is_defined('WINDOWS_VST_SUPPORT'):
         # If we require VST support we build a stub main() and the FST library
         # here using winegcc, and link it to the GTK front-end library
index 6f5c17773cbdcaec32c404e89b054fcedd11fd89..860414e0a6233af2b066afdefa7662d57b565202 100644 (file)
@@ -2,10 +2,8 @@
 # this is sourced by build and package, and executed from within build/{osx,linux}_packaging
 #
 
-major_version=`grep -m 1 '^MAJOR = ' ../../wscript | awk '{print $3}' | sed "s/'//g"`
-minor_version=`grep -m 1 '^MINOR = ' ../../wscript | awk '{print $3}' | sed "s/'//g"`
-release_version=${major_version}.${minor_version}
-r=`cut -d'"' -f2 < ../../libs/ardour/revision.cc | sed -e 1d -e "s/[0-9][0-9]*\.[0-9][0-9]*-//"`
+release_version=`grep -m 1 '^VERSION = ' ../../wscript | awk '{print $3}' | sed "s/'//g"`
+r=`cut -d'"' -f2 < ../../libs/ardour/revision.cc | sed -e 1d -e "s/$release_version-//"`
 if echo $r | grep -q -e - ; then
     revcount=`echo $r | cut -d- -f1`
 fi
diff --git a/wscript b/wscript
index dc0279be8c60aa0016bf3397d432b241e1a1233b..e5e12754e17605d405bb2b35ff29eac93af0f3da 100644 (file)
--- a/wscript
+++ b/wscript
@@ -7,9 +7,11 @@ import string
 import subprocess
 import sys
 
-VERSION = '3.1'
+MAJOR = '3'
+MINOR = '1'
+VERSION = MAJOR + '.' + MINOR
 
-APPNAME = 'Ardour3'
+APPNAME = 'Ardour' + MAJOR
 
 # Mandatory variables
 top = '.'
@@ -461,6 +463,8 @@ def configure(conf):
     conf.load('compiler_c')
     conf.load('compiler_cxx')
     conf.env['VERSION'] = VERSION
+    conf.env['MAJOR'] = MAJOR
+    conf.env['MINOR'] = MINOR
     conf.line_just = 52
     autowaf.set_recursive()
     autowaf.configure(conf)