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:
Mike Hommey 2015-12-25 10:06:23 +09:00
parent 110878ccbd
commit 71fcc5fb34
2 changed files with 2 additions and 22 deletions

View File

@ -253,21 +253,6 @@ class JarMaker(object):
)
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):
'''Helper method to write out the chrome registration entries to
jarfile.manifest or chrome.manifest, or both.
@ -560,7 +545,6 @@ def main(args=None):
jm = JarMaker()
p = jm.getCommandLineParser()
(options, args) = p.parse_args(args)
jm.processIncludes(options.I)
jm.outputFormat = options.f
jm.sourcedirs = options.s
jm.topsourcedir = options.t

View File

@ -456,7 +456,6 @@ class Preprocessor:
options, args = p.parse_args(args=args)
out = self.out
depfile = None
includes = options.I
if options.output:
out = get_output_file(options.output)
@ -475,10 +474,9 @@ class Preprocessor:
raise Preprocessor.Error(self, "--depend requires the "
"mozbuild.makeutil module", None)
depfile = get_output_file(options.depend)
includes.extend(args)
if includes:
for f in includes:
if args:
for f in args:
with open(f, 'rU') as input:
self.processFile(input=input, output=out)
if depfile:
@ -512,8 +510,6 @@ class Preprocessor:
def handleSilenceDirectiveWarnings(option, opt, value, parse):
self.setSilenceDirectiveWarnings(True)
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",
metavar="VAR[=VAL]", help='Define a variable')
p.add_option('-U', action='callback', callback=handleU, type="string",