diff options
author | Simon Warta <[email protected]> | 2017-04-05 20:27:54 +0200 |
---|---|---|
committer | Simon Warta <[email protected]> | 2017-04-05 20:29:29 +0200 |
commit | eb0856a64c09e98672cee28a2e3b38ecb74ad9c8 (patch) | |
tree | b80aa723691b004baa44b91e575d428d41b0ce4f /configure.py | |
parent | 45896a06874d5e43714b59d3fbc78dec61fcbf6d (diff) |
Cut absolute path from main configuration executable
Diffstat (limited to 'configure.py')
-rwxr-xr-x | configure.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/configure.py b/configure.py index 69b69526a..59d4e8745 100755 --- a/configure.py +++ b/configure.py @@ -1757,6 +1757,12 @@ def create_template_vars(build_config, options, modules, cc, arch, osinfo): return opts + def configure_command_line(): + # Cut absolute path from main executable (e.g. configure.py or python interpreter) + # to get the same result when configuring the same thing on different machines + main_executable = os.path.basename(sys.argv[0]) + return ' '.join([main_executable] + sys.argv[1:]) + variables = { 'version_major': Version.major, 'version_minor': Version.minor, @@ -1774,7 +1780,7 @@ def create_template_vars(build_config, options, modules, cc, arch, osinfo): 'src_dir': options.src_dir, 'doc_dir': build_config.doc_dir, - 'command_line': ' '.join(sys.argv), + 'command_line': configure_command_line(), 'local_config': slurp_file(options.local_config), 'makefile_style': options.makefile_style or cc.makefile_style, |