mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-04-03 04:52:54 +00:00
Bug 857557 - Avoid autoconf.mk being modified for new other-platform-specific variables. r=gps
This commit is contained in:
parent
c4689f2cfc
commit
db0e799a83
@ -89,7 +89,10 @@ class ConfigEnvironment(object):
|
||||
and another additional subst variable from all the other substs:
|
||||
- ALLSUBSTS contains the substs in the form NAME = VALUE, in sorted
|
||||
order, for use in autoconf.mk. It includes ACDEFINES, but doesn't
|
||||
include ALLDEFINES.
|
||||
include ALLDEFINES. Only substs with a VALUE are included, such that
|
||||
the resulting file doesn't change when new empty substs are added.
|
||||
This results in less invalidation of build dependencies in the case
|
||||
of autoconf.mk..
|
||||
|
||||
ConfigEnvironment expects a "top_srcdir" subst to be set with the top
|
||||
source directory, in msys format on windows. It is used to derive a
|
||||
@ -109,7 +112,7 @@ class ConfigEnvironment(object):
|
||||
self.substs['ACDEFINES'] = ' '.join(['-D%s=%s' % (name,
|
||||
shell_escape(self.defines[name])) for name in global_defines])
|
||||
self.substs['ALLSUBSTS'] = '\n'.join(sorted(['%s = %s' % (name,
|
||||
self.substs[name]) for name in self.substs]))
|
||||
self.substs[name]) for name in self.substs if self.substs[name]]))
|
||||
self.substs['ALLDEFINES'] = '\n'.join(sorted(['#define %s %s' % (name,
|
||||
self.defines[name]) for name in global_defines]))
|
||||
|
||||
|
@ -30,7 +30,8 @@ class TestEnvironment(unittest.TestCase):
|
||||
('abc', 'def'), ('extra', 'foobar') ],
|
||||
non_global_defines = ['extra', 'ignore'],
|
||||
substs = [ ('FOO', 'bar'), ('ABC', 'def'),
|
||||
('bar', 'baz qux'), ('zzz', '"abc def"') ])
|
||||
('bar', 'baz qux'), ('zzz', '"abc def"'),
|
||||
('qux', '') ])
|
||||
# non_global_defines should be filtered out in ACDEFINES and
|
||||
# ALLDEFINES.
|
||||
# Original order of the defines need to be respected in ACDEFINES
|
||||
|
Loading…
x
Reference in New Issue
Block a user