From aafebe23488a442872b9d2810147d9f5b34d8f28 Mon Sep 17 00:00:00 2001 From: Steve Fink Date: Tue, 16 Aug 2016 12:31:41 -0700 Subject: [PATCH] Bug 1295751 - Stop running autoconf in autospider.py, r=glandium MozReview-Commit-ID: 9COvbxsmRf2 --HG-- extra : rebase_source : 2d92101ec23fcb503ece8a8dba184fa390b67cf0 --- js/src/devtools/automation/autospider.py | 30 +++++++----------------- 1 file changed, 8 insertions(+), 22 deletions(-) diff --git a/js/src/devtools/automation/autospider.py b/js/src/devtools/automation/autospider.py index fb7745fbc255..9a7ccc7f26a1 100755 --- a/js/src/devtools/automation/autospider.py +++ b/js/src/devtools/automation/autospider.py @@ -107,21 +107,6 @@ def set_vars_from_script(script, vars): env[var] = "%s;%s" % (env[var], originals[var]) -def call_alternates(binaries, *args, **kwargs): - last_exception = None - for binary in binaries: - try: - # Call through a shell due to Windows portability problems. - rc = subprocess.call(['sh', '-c', binary], *args, **kwargs) - if rc == 127: - raise OSError("command not found: %s" % binary) - return rc - except OSError as e: - # Assume the binary was not found. - last_exception = e - raise last_exception - - def ensure_dir_exists(name, clobber=True): if clobber: shutil.rmtree(name, ignore_errors=True) @@ -142,12 +127,6 @@ if args.variant == 'nonunified': subprocess.check_call(['sed', '-i', 's/UNIFIED_SOURCES/SOURCES/', os.path.join(dirpath, 'moz.build')]) -if not args.nobuild: - autoconfs = ['autoconf-2.13', 'autoconf2.13', 'autoconf213'] - if call_alternates(autoconfs, cwd=DIR.js_src) != 0: - logging.error('autoconf failed') - sys.exit(1) - OBJDIR = os.path.join(DIR.source, args.objdir) OUTDIR = os.path.join(OBJDIR, "out") POBJDIR = posixpath.join(PDIR.source, args.objdir) @@ -275,8 +254,15 @@ for k, v in variant.get('env', {}).items(): if not args.nobuild: CONFIGURE_ARGS += ' --enable-nspr-build' CONFIGURE_ARGS += ' --prefix={OBJDIR}/dist'.format(OBJDIR=POBJDIR) - run_command(['sh', '-c', posixpath.join(PDIR.js_src, 'configure') + ' ' + CONFIGURE_ARGS], check=True) + # Generate a configure script from configure.in. + configure = os.path.join(DIR.js_src, 'configure') + if not os.path.exists(configure): + shutil.copyfile(configure + ".in", configure) + os.chmod(configure, 0755) + + # Run configure; make + run_command(['sh', '-c', posixpath.join(PDIR.js_src, 'configure') + ' ' + CONFIGURE_ARGS], check=True) run_command('%s -s -w %s' % (MAKE, MAKEFLAGS), shell=True, check=True) COMMAND_PREFIX = []