diff options
author | Anna Henningsen <anna@addaleax.net> | 2018-06-16 22:28:34 +0300 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2018-06-29 23:09:25 +0300 |
commit | 074e7f88aff0244dd9aee412e885194ce3f5a953 (patch) | |
tree | 0e822afafde71ca7ba6d16d35f392d5fd942b4cb /configure | |
parent | bf360d2e151f9025a990e671147117139e596bfe (diff) |
build: remove requirement to re-run ./configure
Instead of requiring `./configure` to be run again after
the file changed, first try to re-run the configure script
with the arguments with which it was originally run.
Usually, those arguments will either contain no flags,
or all flags that were passed are still supported.
PR-URL: https://github.com/nodejs/node/pull/21371
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/configure b/configure index efb92701e26..3a9ab424145 100755 --- a/configure +++ b/configure @@ -28,6 +28,7 @@ if sys.version_info[0] != 2 or sys.version_info[1] not in (6, 7): import errno import optparse import os +import pipes import pprint import re import shlex @@ -38,6 +39,8 @@ import string # If not run from node/, cd to node/. os.chdir(os.path.dirname(__file__) or '.') +original_argv = sys.argv[1:] + # gcc and g++ as defaults matches what GYP's Makefile generator does, # except on OS X. CC = os.environ.get('CC', 'cc' if sys.platform == 'darwin' else 'gcc') @@ -1530,6 +1533,10 @@ pprint.pprint(output, indent=2) write('config.gypi', do_not_edit + pprint.pformat(output, indent=2) + '\n') +write('config.status', '#!/bin/sh\nset -x\nexec ./configure ' + + ' '.join([pipes.quote(arg) for arg in original_argv]) + '\n') +os.chmod('config.status', 0775) + config = { 'BUILDTYPE': 'Debug' if options.debug else 'Release', 'PYTHON': sys.executable, |