Bug 1256622 - Allow to build spidermonkey from the top-level configure
--- a/build/moz.configure/old.configure
+++ b/build/moz.configure/old.configure
@@ -76,33 +76,38 @@ def check_mozconfig_variables():
error(
'You need to add `%s` to the `wanted_mozconfig_variables` '
'list in build/moz.configure/init.configure.' % option.env)
check_mozconfig_variables()
@depends('OLD_CONFIGURE', mozconfig, autoconf, check_build_environment, shell,
- old_configure_assignments)
+ old_configure_assignments, build_project)
@advanced
def prepare_configure(old_configure, mozconfig, autoconf, build_env, shell,
- old_configure_assignments):
+ old_configure_assignments, build_project):
import glob
import itertools
import subprocess
# Import getmtime without overwriting the sandbox os.path.
from os.path import getmtime
from mozbuild.shellutil import quote
# os.path.abspath in the sandbox will ensure forward slashes on Windows,
# which is actually necessary because this path actually ends up literally
# as $0, and backslashes there breaks autoconf's detection of the source
# directory.
old_configure = os.path.abspath(old_configure[0])
+ if build_project == 'js':
+ old_configure_dir = os.path.dirname(old_configure)
+ if not old_configure_dir.endswith('/js/src'):
+ old_configure = os.path.join(old_configure_dir, 'js', 'src',
+ os.path.basename(old_configure))
refresh = True
if os.path.exists(old_configure):
mtime = getmtime(old_configure)
aclocal = os.path.join(build_env['TOPSRCDIR'], 'build', 'autoconf',
'*.m4')
for input in itertools.chain(
(old_configure + '.in',