diff --git a/python/mozbuild/mozbuild/jar.py b/python/mozbuild/mozbuild/jar.py index 97d366057a8..a53daf0f5f3 100644 --- a/python/mozbuild/mozbuild/jar.py +++ b/python/mozbuild/mozbuild/jar.py @@ -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 diff --git a/python/mozbuild/mozbuild/preprocessor.py b/python/mozbuild/mozbuild/preprocessor.py index 6a49ee87011..8cc35cda711 100644 --- a/python/mozbuild/mozbuild/preprocessor.py +++ b/python/mozbuild/mozbuild/preprocessor.py @@ -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",