mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-16 13:56:29 +00:00
Bug 1235109 - Remove support for -I in preprocessor and jar maker. r=gps
The last use for this option was removed in bug 1235108.
This commit is contained in:
parent
036949880e
commit
c666e4b0a1
@ -253,21 +253,6 @@ class JarMaker(object):
|
|||||||
)
|
)
|
||||||
return p
|
return p
|
||||||
|
|
||||||
def processIncludes(self, includes):
|
|
||||||
'''Process given includes with the inner PreProcessor.
|
|
||||||
|
|
||||||
Only use this for #defines, the includes shouldn't generate
|
|
||||||
content.
|
|
||||||
'''
|
|
||||||
|
|
||||||
self.pp.out = StringIO()
|
|
||||||
for inc in includes:
|
|
||||||
self.pp.do_include(inc)
|
|
||||||
includesvalue = self.pp.out.getvalue()
|
|
||||||
if includesvalue:
|
|
||||||
logging.info('WARNING: Includes produce non-empty output')
|
|
||||||
self.pp.out = None
|
|
||||||
|
|
||||||
def finalizeJar(self, jardir, jarbase, jarname, chromebasepath, register, doZip=True):
|
def finalizeJar(self, jardir, jarbase, jarname, chromebasepath, register, doZip=True):
|
||||||
'''Helper method to write out the chrome registration entries to
|
'''Helper method to write out the chrome registration entries to
|
||||||
jarfile.manifest or chrome.manifest, or both.
|
jarfile.manifest or chrome.manifest, or both.
|
||||||
@ -560,7 +545,6 @@ def main(args=None):
|
|||||||
jm = JarMaker()
|
jm = JarMaker()
|
||||||
p = jm.getCommandLineParser()
|
p = jm.getCommandLineParser()
|
||||||
(options, args) = p.parse_args(args)
|
(options, args) = p.parse_args(args)
|
||||||
jm.processIncludes(options.I)
|
|
||||||
jm.outputFormat = options.f
|
jm.outputFormat = options.f
|
||||||
jm.sourcedirs = options.s
|
jm.sourcedirs = options.s
|
||||||
jm.topsourcedir = options.t
|
jm.topsourcedir = options.t
|
||||||
|
@ -456,7 +456,6 @@ class Preprocessor:
|
|||||||
options, args = p.parse_args(args=args)
|
options, args = p.parse_args(args=args)
|
||||||
out = self.out
|
out = self.out
|
||||||
depfile = None
|
depfile = None
|
||||||
includes = options.I
|
|
||||||
|
|
||||||
if options.output:
|
if options.output:
|
||||||
out = get_output_file(options.output)
|
out = get_output_file(options.output)
|
||||||
@ -475,10 +474,9 @@ class Preprocessor:
|
|||||||
raise Preprocessor.Error(self, "--depend requires the "
|
raise Preprocessor.Error(self, "--depend requires the "
|
||||||
"mozbuild.makeutil module", None)
|
"mozbuild.makeutil module", None)
|
||||||
depfile = get_output_file(options.depend)
|
depfile = get_output_file(options.depend)
|
||||||
includes.extend(args)
|
|
||||||
|
|
||||||
if includes:
|
if args:
|
||||||
for f in includes:
|
for f in args:
|
||||||
with open(f, 'rU') as input:
|
with open(f, 'rU') as input:
|
||||||
self.processFile(input=input, output=out)
|
self.processFile(input=input, output=out)
|
||||||
if depfile:
|
if depfile:
|
||||||
@ -512,8 +510,6 @@ class Preprocessor:
|
|||||||
def handleSilenceDirectiveWarnings(option, opt, value, parse):
|
def handleSilenceDirectiveWarnings(option, opt, value, parse):
|
||||||
self.setSilenceDirectiveWarnings(True)
|
self.setSilenceDirectiveWarnings(True)
|
||||||
p = OptionParser()
|
p = OptionParser()
|
||||||
p.add_option('-I', action='append', type="string", default = [],
|
|
||||||
metavar="FILENAME", help='Include file')
|
|
||||||
p.add_option('-D', action='callback', callback=handleD, type="string",
|
p.add_option('-D', action='callback', callback=handleD, type="string",
|
||||||
metavar="VAR[=VAL]", help='Define a variable')
|
metavar="VAR[=VAL]", help='Define a variable')
|
||||||
p.add_option('-U', action='callback', callback=handleU, type="string",
|
p.add_option('-U', action='callback', callback=handleU, type="string",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user