summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-05-28 15:20:03 +1000
committerAndrew Bartlett <abartlet@samba.org>2010-05-28 15:20:03 +1000
commit892a4b24e79a71f5fd81bdb631d93615f2345bd9 (patch)
treec94ced8464b68ef294ea09bbc7b9537693f7892b /source3
parent0ca8e2252b14811b9221acc95a510ab6a84f580f (diff)
downloadsamba-892a4b24e79a71f5fd81bdb631d93615f2345bd9.tar.gz
samba-892a4b24e79a71f5fd81bdb631d93615f2345bd9.tar.bz2
samba-892a4b24e79a71f5fd81bdb631d93615f2345bd9.zip
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
Diffstat (limited to 'source3')
-rw-r--r--source3/wscript18
1 files changed, 11 insertions, 7 deletions
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')