Bug 1304136 - have AccEventGen.py re-use xpidllex.py / xpidlyacc.py; r?chmanchester
MozReview-Commit-ID: 76M0KYAZCmW
--- a/accessible/xpcom/AccEventGen.py
+++ b/accessible/xpcom/AccEventGen.py
@@ -8,17 +8,19 @@ import sys
import os
import buildconfig
import mozpack.path as mozpath
# The xpidl parser is not incorporated in the in-tree virtualenv.
xpidl_dir = mozpath.join(buildconfig.topsrcdir, 'xpcom', 'idl-parser',
'xpidl')
-sys.path.append(xpidl_dir)
+xpidl_cachedir = mozpath.join(buildconfig.topobjdir, 'xpcom', 'idl-parser',
+ 'xpidl')
+sys.path.extend([xpidl_dir, xpidl_cachedir])
import xpidl
# Instantiate the parser.
p = xpidl.IDLParser()
def findIDL(includePath, interfaceFileName):
for d in includePath:
path = mozpath.join(d, interfaceFileName)
@@ -212,15 +214,15 @@ def write_cpp(eventname, iface, fd):
def get_conf(conf_file):
conf = Configuration(conf_file)
inc_dir = [
mozpath.join(buildconfig.topsrcdir, 'accessible', 'interfaces'),
mozpath.join(buildconfig.topsrcdir, 'xpcom', 'base'),
]
return conf, inc_dir
-def gen_header_file(fd, conf_file):
+def gen_header_file(fd, conf_file, xpidllex, xpidlyacc):
conf, inc_dir = get_conf(conf_file)
return print_header_file(fd, conf, inc_dir)
-def gen_cpp_file(fd, conf_file):
+def gen_cpp_file(fd, conf_file, xpidllex, xpidlyacc):
conf, inc_dir = get_conf(conf_file)
return print_cpp_file(fd, conf, inc_dir)
--- a/accessible/xpcom/moz.build
+++ b/accessible/xpcom/moz.build
@@ -54,20 +54,20 @@ else:
GENERATED_FILES += [
'xpcAccEvents.cpp',
'xpcAccEvents.h',
]
xpc_acc_events_h = GENERATED_FILES['xpcAccEvents.h']
xpc_acc_events_h.script = 'AccEventGen.py:gen_header_file'
-xpc_acc_events_h.inputs += ['AccEvents.conf']
+xpc_acc_events_h.inputs += ['AccEvents.conf', '!/xpcom/idl-parser/xpidl/xpidllex.py', '!/xpcom/idl-parser/xpidl/xpidlyacc.py']
xpc_acc_events_cpp = GENERATED_FILES['xpcAccEvents.cpp']
xpc_acc_events_cpp.script = 'AccEventGen.py:gen_cpp_file'
-xpc_acc_events_cpp.inputs += ['AccEvents.conf']
+xpc_acc_events_cpp.inputs += ['AccEvents.conf', '!/xpcom/idl-parser/xpidl/xpidllex.py', '!/xpcom/idl-parser/xpidl/xpidlyacc.py']
FINAL_LIBRARY = 'xul'
include('/ipc/chromium/chromium-config.mozbuild')
if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wno-error=shadow']