From 892a4b24e79a71f5fd81bdb631d93615f2345bd9 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 28 May 2010 15:20:03 +1000 Subject: waf Read VERSION file inside WAF to set package version This replaces the call to mkversion.sh in both the Samba3 and Samba4 WAF builds. Andrew Bartlett --- source3/wscript | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'source3/wscript') diff --git a/source3/wscript b/source3/wscript index c3d4c433de..0911e85718 100644 --- a/source3/wscript +++ b/source3/wscript @@ -11,6 +11,10 @@ import build.charset import samba_utils import samba3 +version = wafsamba.samba_version_file("./VERSION") + +VERSION=version.STRING + def set_options(opt): opt.BUILTIN_DEFAULT('NONE') opt.BUNDLED_EXTENSION_DEFAULT('s3') @@ -49,15 +53,15 @@ def set_options(opt): def configure(conf): from samba_utils import TO_LIST - conf.define('PACKAGE_NAME', 'Samba') - conf.define('PACKAGE_STRING', 'Samba 3') - conf.define('PACKAGE_TARNAME', 'samba') - conf.define('PACKAGE_URL', '') - conf.define('PACKAGE_VERSION', '3') - conf.define('PACKAGE_BUGREPORT', 'samba-technical@samba.org') + conf.DEFINE('PACKAGE_NAME', 'samba', quote=True) + conf.DEFINE('PACKAGE_STRING', 'Samba ' + version.STRING, quote=True) + conf.DEFINE('PACKAGE_TARNAME', 'samba', quote=True) + conf.DEFINE('PACKAGE_URL', "http://www.samba.org/", quote=True) + conf.DEFINE('PACKAGE_VERSION', version.STRING, quote=True) + conf.DEFINE('PACKAGE_BUGREPORT', 'http://bugzilla.samba.org/', quote=True) conf.DEFINE('CONFIG_H_IS_FROM_SAMBA', 1) - conf.DEFINE('_SAMBA_BUILD_', 3, add_to_cflags=True) + conf.DEFINE('_SAMBA_BUILD_', version.MAJOR, add_to_cflags=True) conf.DEFINE('HAVE_CONFIG_H', 1, add_to_cflags=True) if Options.options.developer: conf.ADD_CFLAGS('-DDEVELOPER -DDEBUG_PASSWORD') -- cgit