Bug 1175 postfix: only enable vnum if the VERSION matches x.y(.z) dotted number format
authorGustavo J. A. M. Carneiro <gjc@inescporto.pt>
Mon, 27 Jun 2011 14:55:11 +0100
changeset 7320 7334aa839e46
parent 7319 175c382cfab0
child 7321 21678ba057ef
Bug 1175 postfix: only enable vnum if the VERSION matches x.y(.z) dotted number format
src/wscript
wscript
--- a/src/wscript	Sun Jun 26 13:40:27 2011 +0100
+++ b/src/wscript	Mon Jun 27 14:55:11 2011 +0100
@@ -119,7 +119,7 @@
 
     module.is_ns3_module = True
     module.name = 'ns3-' + name
-    module.vnum = wutils.VERSION
+    module.vnum = wutils.VNUM
     # Add the proper path to the module's name.
     module.target = '%s/ns3-%s' % (bld.srcnode.relpath_gen(bld.path), name)
     # Set the libraries this module depends on.  
--- a/wscript	Sun Jun 26 13:40:27 2011 +0100
+++ b/wscript	Mon Jun 27 14:55:11 2011 +0100
@@ -67,6 +67,11 @@
 wutils.VERSION = VERSION
 wutils.APPNAME = APPNAME
 
+if re.match(r"\d+\.\d+(\.\d+)?", VERSION) is not None:
+    wutils.VNUM = VERSION
+else:
+    wutils.VNUM = None
+
 # these variables are mandatory ('/' are converted automatically)
 srcdir = '.'
 blddir = 'build'