diff --git a/config/makefiles/xpidl/Makefile.in b/config/makefiles/xpidl/Makefile.in index 6f45864da419..c0495883f0de 100644 --- a/config/makefiles/xpidl/Makefile.in +++ b/config/makefiles/xpidl/Makefile.in @@ -41,7 +41,6 @@ code_gen_deps := $(topsrcdir)/xpcom/reflect/xptinfo/perfecthash.py $(PYTHON_PATH) $(PLY_INCLUDE) -I$(topsrcdir)/xpcom/idl-parser -I$(DEPTH)/xpcom/idl-parser/xpidl \ $(process_py) --cache-dir $(DEPTH)/xpcom/idl-parser/xpidl --depsdir $(idl_deps_dir) \ --bindings-conf $(topsrcdir)/dom/bindings/Bindings.conf \ - $(foreach dir,$($(basename $(notdir $@))_dirs),--input-dir $(dir)) \ $(foreach dir,$(all_idl_dirs),-I $(dir)) \ $(dist_include_dir) $(dist_xpcrs_dir) $(@D) \ $(basename $(notdir $@)) $($(basename $(notdir $@))_deps) diff --git a/python/mozbuild/mozbuild/action/xpidl-process.py b/python/mozbuild/mozbuild/action/xpidl-process.py index bdf0f64761bf..ae9ba873eed4 100755 --- a/python/mozbuild/mozbuild/action/xpidl-process.py +++ b/python/mozbuild/mozbuild/action/xpidl-process.py @@ -28,7 +28,7 @@ from mozbuild.util import FileAvoidWrite def process(input_dirs, inc_paths, bindings_conf, cache_dir, header_dir, - xpcrs_dir, xpt_dir, deps_dir, module, stems): + xpcrs_dir, xpt_dir, deps_dir, module, idl_files): p = IDLParser(outputdir=cache_dir) xpts = [] @@ -43,17 +43,10 @@ def process(input_dirs, inc_paths, bindings_conf, cache_dir, header_dir, # up to date, we will not re-process XPIDL files if the processor changes. rule.add_dependencies(iter_modules_in_path(topsrcdir)) - def read_stem(stem): - idl = '%s.idl' % stem - for p in input_dirs: - idl_file = os.path.join(topsrcdir, p, idl) - if os.path.exists(idl_file): - return idl_file, open(idl_file).read() - - raise Exception('Could not find stem file for %s' % idl) - - for stem in stems: - path, idl_data = read_stem(stem) + for path in idl_files: + basename = os.path.basename(path) + stem, _ = os.path.splitext(basename) + idl_data = open(path).read() idl = p.parse(idl_data, filename=path) idl.resolve(inc_paths, p, webidlconfig) @@ -111,7 +104,7 @@ def main(argv): parser.add_argument('module', help='Final module name to use for linked output xpt file.') parser.add_argument('idls', nargs='+', - help='Source .idl file(s). Specified as stems only.') + help='Source .idl file(s).') parser.add_argument('-I', dest='incpath', action='append', default=[], help='Extra directories where to look for included .idl files.') diff --git a/python/mozbuild/mozbuild/backend/common.py b/python/mozbuild/mozbuild/backend/common.py index 1c4d2e438c54..aaa01ee82f58 100644 --- a/python/mozbuild/mozbuild/backend/common.py +++ b/python/mozbuild/mozbuild/backend/common.py @@ -86,7 +86,7 @@ class XPIDLManager(object): # can be found. Yes, we have XPIDL modules with files from # multiple directories. t = self.modules.setdefault(entry['module'], (set(), set())) - t[0].add(entry['root']) + t[0].add(entry['source']) t[1].add(dirname) class BinariesCollection(object): diff --git a/python/mozbuild/mozbuild/backend/recursivemake.py b/python/mozbuild/mozbuild/backend/recursivemake.py index c27a1414b415..43e7b95c7856 100644 --- a/python/mozbuild/mozbuild/backend/recursivemake.py +++ b/python/mozbuild/mozbuild/backend/recursivemake.py @@ -1056,7 +1056,6 @@ class RecursiveMakeBackend(CommonBackend): sources, directories = modules[module] all_directories |= directories deps = sorted(sources) - directories = sorted(directories) # It may seem strange to have the .idl files listed as # prerequisites both here and in the auto-generated .pp files. @@ -1070,8 +1069,6 @@ class RecursiveMakeBackend(CommonBackend): # an mtime newer than the .xpt, it will trigger xpt generation. mk.add_statement('%s_deps = %s' % (module, ' '.join(deps))) - mk.add_statement('%s_dirs = %s' % (module, ' '.join(directories))) - build_files.add_optional_exists('%s.xpt' % module) mk.add_statement('all_idl_dirs = %s' % ' '.join(sorted(all_directories))) diff --git a/python/mozbuild/mozbuild/backend/tup.py b/python/mozbuild/mozbuild/backend/tup.py index dc99cfc99018..a282a0e47912 100644 --- a/python/mozbuild/mozbuild/backend/tup.py +++ b/python/mozbuild/mozbuild/backend/tup.py @@ -790,7 +790,7 @@ class TupBackend(CommonBackend): all_idl_directories.update(*map(lambda x: x[1], manager.modules.itervalues())) all_xpts = [] - for module, (idls, directories) in sorted(manager.modules.iteritems()): + for module, (idls, _) in sorted(manager.modules.iteritems()): cmd = [ '$(PYTHON_PATH)', '$(PLY_INCLUDE)', @@ -801,8 +801,6 @@ class TupBackend(CommonBackend): '--bindings-conf', '$(topsrcdir)/dom/bindings/Bindings.conf', ] - for d in directories: - cmd.extend(['--input-dir', d]) for d in all_idl_directories: cmd.extend(['-I', d]) @@ -816,9 +814,10 @@ class TupBackend(CommonBackend): all_xpts.append('$(MOZ_OBJ_ROOT)/%s/%s.xpt' % (backend_file.relobjdir, module)) outputs = ['%s.xpt' % module] - outputs.extend(['$(MOZ_OBJ_ROOT)/dist/include/%s.h' % f for f in sorted(idls)]) - outputs.extend(['$(MOZ_OBJ_ROOT)/dist/xpcrs/rt/%s.rs' % f for f in sorted(idls)]) - outputs.extend(['$(MOZ_OBJ_ROOT)/dist/xpcrs/bt/%s.rs' % f for f in sorted(idls)]) + stems = sorted(mozpath.splitext(mozpath.basename(idl))[0] for idl in idls) + outputs.extend(['$(MOZ_OBJ_ROOT)/dist/include/%s.h' % f for f in stems]) + outputs.extend(['$(MOZ_OBJ_ROOT)/dist/xpcrs/rt/%s.rs' % f for f in stems]) + outputs.extend(['$(MOZ_OBJ_ROOT)/dist/xpcrs/bt/%s.rs' % f for f in stems]) backend_file.rule( inputs=[ '$(MOZ_OBJ_ROOT)/xpcom/idl-parser/xpidl/xpidllex.py',