Commit 6d8c61f1 authored by Kent Tamura's avatar Kent Tamura Committed by Commit Bot

Qualify #includes in generated event_factory.cc and event_modules_factory.cc.

generate_event_interfaces.py should produce paths relative to the
repository root.

Bug: 836071
Change-Id: Ibcb9fbe2cdb1e6e0e8f46ad1c0caec11c23123f3
Reviewed-on: https://chromium-review.googlesource.com/1038984Reviewed-by: default avatarHitoshi Yoshida <peria@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#555290}
parent 56590e40
......@@ -34,7 +34,7 @@ The event interfaces .json5 file contains a list of all Event interfaces, i.e.,
all interfaces that inherit from Event, including Event itself,
together with certain extended attributes.
Paths are in POSIX format, and relative to Source/.
Paths are in POSIX format, and relative to the repository root.
This list is used in core/ to generate EventFactory and EventNames.
The .json5 format is documented in build/scripts/json5_generator.py.
......@@ -54,7 +54,8 @@ EXPORTED_EXTENDED_ATTRIBUTES = (
'RuntimeEnabled',
)
module_path = os.path.dirname(os.path.realpath(__file__))
source_dir = os.path.normpath(os.path.join(module_path, os.pardir, os.pardir))
REPO_ROOT_DIR = os.path.normpath(os.path.join(module_path, os.pardir, os.pardir,
os.pardir, os.pardir, os.pardir))
def parse_options():
......@@ -75,7 +76,7 @@ def parse_options():
def write_event_interfaces_file(event_idl_files, destination_filename, suffix):
def interface_line(full_path):
relative_dir_local = os.path.dirname(os.path.relpath(full_path, source_dir))
relative_dir_local = os.path.dirname(os.path.relpath(full_path, REPO_ROOT_DIR))
relative_dir_posix = relative_dir_local.replace(os.sep, posixpath.sep)
idl_file_contents = get_file_contents(full_path)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment