Bug 1175 postfix: only enable vnum if the VERSION matches x.y(.z) dotted number format

This commit is contained in:
Gustavo J. A. M. Carneiro
2011-06-27 14:55:11 +01:00
parent a7faefb63e
commit 9b3579f115
2 changed files with 6 additions and 1 deletions

View File

@@ -119,7 +119,7 @@ def create_ns3_module(bld, name, dependencies=(), test=False):
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.

View File

@@ -67,6 +67,11 @@ APPNAME = 'ns'
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'