c24d7b157f3b2081feafe011c7ca0de316ecb4c4
[packages/mozjs68.git] / include-configure-script.patch
1 From 4a06a1a6a71293decb83aee7adb74bc709493106 Mon Sep 17 00:00:00 2001
2 From: Philip Chimento <philip.chimento@gmail.com>
3 Date: Wed, 5 Jul 2017 22:57:09 -0700
4 Subject: [PATCH] build: Include configure script, be nicer about options
5
6 A configure script is not included in the SpiderMonkey tarball by
7 default. Also, we have to account for JHbuild passing extra unknown
8 options like --disable-Werror.
9
10 https://bugzilla.mozilla.org/show_bug.cgi?id=1379540
11 ---
12  js/src/configure                               | 9 +++++++++
13  python/mozbuild/mozbuild/configure/__init__.py | 2 +-
14  python/mozbuild/mozbuild/configure/options.py  | 6 +++++-
15  3 files changed, 15 insertions(+), 2 deletions(-)
16  create mode 100755 js/src/configure
17
18 diff --git a/python/mozbuild/mozbuild/configure/__init__.py b/python/mozbuild/mozbuild/configure/__init__.py
19 index 0fe640ca..09b460d3 100644
20 --- a/python/mozbuild/mozbuild/configure/__init__.py
21 +++ b/python/mozbuild/mozbuild/configure/__init__.py
22 @@ -356,7 +356,7 @@ def run(self, path=None):
23          # All options should have been removed (handled) by now.
24          for arg in self._helper:
25              without_value = arg.split('=', 1)[0]
26 -            raise InvalidOptionError('Unknown option: %s' % without_value)
27 +            print('Ignoring', without_value, ': Unknown option')
28  
29          # Run the execution queue
30          for func, args in self._execution_queue:
31 diff --git a/python/mozbuild/mozbuild/configure/options.py b/python/mozbuild/mozbuild/configure/options.py
32 index 4310c862..15bfe425 100644
33 --- a/python/mozbuild/mozbuild/configure/options.py
34 +++ b/python/mozbuild/mozbuild/configure/options.py
35 @@ -402,7 +402,11 @@ def __init__(self, environ=os.environ, argv=sys.argv):
36  
37      def add(self, arg, origin='command-line', args=None):
38          assert origin != 'default'
39 -        prefix, name, values = Option.split_option(arg)
40 +        try:
41 +            prefix, name, values = Option.split_option(arg)
42 +        except InvalidOptionError as e:
43 +            print('Ignoring', arg, ':', e)
44 +            return
45          if args is None:
46              args = self._extra_args
47          if args is self._extra_args and name in self._extra_args:
48
This page took 0.044714 seconds and 2 git commands to generate.