diff options
author | lloyd <[email protected]> | 2011-06-30 16:53:22 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2011-06-30 16:53:22 +0000 |
commit | b16bd4ad156f954dbcd4299e298765eececac19d (patch) | |
tree | b8a88bd8c225d6f5fe5a45c12cff9f48571d4585 /configure.py | |
parent | edc9ad3a1f0ecf32a49ad44866172398079aa184 (diff) |
Tick to 1.10.1 unreleased.
Try to detect the mtn revision (by shelling out to mtn automate), and
including it in build.h as BOTAN_VERSION_VC_REVISION.
Diffstat (limited to 'configure.py')
-rwxr-xr-x | configure.py | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/configure.py b/configure.py index 44b42a193..134e6c513 100755 --- a/configure.py +++ b/configure.py @@ -40,6 +40,19 @@ import botan_version def flatten(l): return sum(l, []) +def get_vc_revision(): + mtn = subprocess.Popen(['mtn', 'automate', 'heads'], + stdout=subprocess.PIPE, + stderr=subprocess.PIPE) + + (stdout, stderr) = mtn.communicate() + + if(stderr != ''): + #logging.debug('Error getting rev from monotone - %s' % (stderr)) + return 'unknown' + + return 'mtn:' + stdout.strip() + class BuildConfigurationInformation(object): """ @@ -52,6 +65,7 @@ class BuildConfigurationInformation(object): version_datestamp = botan_version.release_datestamp + version_vc_rev = get_vc_revision() version_string = '%d.%d.%d' % (version_major, version_minor, version_patch) """ @@ -1039,11 +1053,12 @@ def create_template_vars(build_config, options, modules, cc, arch, osinfo): return normal_flags return { - 'version_major': build_config.version_major, - 'version_minor': build_config.version_minor, - 'version_patch': build_config.version_patch, - 'so_abi_rev': build_config.version_so_rev, - 'version': build_config.version_string, + 'version_major': build_config.version_major, + 'version_minor': build_config.version_minor, + 'version_patch': build_config.version_patch, + 'version_vc_rev': build_config.version_vc_rev, + 'so_abi_rev': build_config.version_so_rev, + 'version': build_config.version_string, 'distribution_info': options.distribution_info, |