more changes to consolidate version definition into the top level wscript file

This commit is contained in:
Paul Davis 2013-06-11 11:37:52 -04:00
parent ef6366a7cd
commit 2e1e5da78e
3 changed files with 11 additions and 13 deletions

View 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

View 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

View File

@ -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)