Skip to content

Commit

Permalink
Bug 1250294 - Make configure a Python script that invokes the old con…
Browse files Browse the repository at this point in the history
…figure.sh. r=ted

--HG--
rename : js/src/configure.in => js/src/old-configure.in
rename : configure.in => old-configure.in
  • Loading branch information
glandium committed Feb 24, 2016
1 parent 72a83dc commit 7df9087
Show file tree
Hide file tree
Showing 8 changed files with 13,009 additions and 12,854 deletions.
12 changes: 6 additions & 6 deletions Makefile.in
Expand Up @@ -66,19 +66,19 @@ CLOBBER: $(topsrcdir)/CLOBBER
@exit 1
endif

$(topsrcdir)/configure: $(topsrcdir)/configure.in
$(topsrcdir)/js/src/configure: $(topsrcdir)/js/src/configure.in
$(topsrcdir)/configure: $(topsrcdir)/configure.in $(topsrcdir)/old-configure.in
$(topsrcdir)/js/src/configure: $(topsrcdir)/js/src/configure.in $(topsrcdir)/js/src/old-configure.in
$(topsrcdir)/configure $(topsrcdir)/js/src/configure:
@echo 'STOP! $^ has changed, and your configure is out of date.'
@echo 'STOP! $? has changed, and your configure is out of date.'
@echo 'Please rerun autoconf and re-configure your build directory.'
@echo 'To ignore this message, touch "$@",'
@echo 'but your build might not succeed.'
@exit 1

config.status: $(configure_dir)/configure
js/src/config.status: $(topsrcdir)/js/src/configure
config.status: $(configure_dir)/configure $(configure_dir)/old-configure
js/src/config.status: $(topsrcdir)/js/src/configure $(topsrcdir)/js/src/old-configure
config.status js/src/config.status:
@echo 'STOP! $^ has changed and needs to be run again.'
@echo 'STOP! $? has changed and needs to be run again.'
@echo 'Please rerun it.'
@echo 'To ignore this message, touch "$(CURDIR)/$@",'
@echo 'but your build might not succeed.'
Expand Down
17 changes: 16 additions & 1 deletion build/subconfigure.py
Expand Up @@ -303,7 +303,22 @@ def run(objdir):
relobjdir = os.path.relpath(objdir, os.getcwd())

if not skip_configure:
command = [data['shell'], configure]
if mozpath.normsep(relobjdir) == 'js/src':
# Because configure is a shell script calling a python script
# calling a shell script, on Windows, with msys screwing the
# environment, we lose the benefits from our own efforts in this
# script to get past the msys problems. So manually call the python
# script instead, so that we don't do a native->msys transition
# here. Then the python configure will still have the right
# environment when calling the shell configure.
command = [
sys.executable,
os.path.join(os.path.dirname(__file__), '..', 'configure.py'),
]
data['env']['OLD_CONFIGURE'] = os.path.join(
os.path.dirname(configure), 'old-configure')
else:
command = [data['shell'], configure]
for kind in ('target', 'build', 'host'):
if data.get(kind) is not None:
command += ['--%s=%s' % (kind, data[kind])]
Expand Down
2 changes: 2 additions & 0 deletions client.mk
Expand Up @@ -291,8 +291,10 @@ CONFIG_CACHE = $(wildcard $(OBJDIR)/config.cache)

EXTRA_CONFIG_DEPS := \
$(TOPSRCDIR)/aclocal.m4 \
$(TOPSRCDIR)/old-configure.in \
$(wildcard $(TOPSRCDIR)/build/autoconf/*.m4) \
$(TOPSRCDIR)/js/src/aclocal.m4 \
$(TOPSRCDIR)/js/src/old-configure.in \
$(NULL)

$(CONFIGURES): %: %.in $(EXTRA_CONFIG_DEPS)
Expand Down

0 comments on commit 7df9087

Please sign in to comment.