Index: Source/build/scripts/scripts.gni |
diff --git a/Source/build/scripts/scripts.gni b/Source/build/scripts/scripts.gni |
index 8fdd950dad508ca4850406c6842fabb5bfd79341..15df11436f4d1cf59b02498fd2c5539a4719ad02 100644 |
--- a/Source/build/scripts/scripts.gni |
+++ b/Source/build/scripts/scripts.gni |
@@ -76,7 +76,6 @@ if (is_win) { |
# Templates -------------------------------------------------------------------- |
_blink_gen_dir = "$root_gen_dir/blink" |
-_rel_blink_gen_dir = rebase_path(_blink_gen_dir, root_build_dir) |
# The GYP target make_core_generated has some deps and a bunch of actions on |
# it, which means that the deps will be resolved before the actions run. Here |
@@ -85,7 +84,7 @@ _rel_blink_gen_dir = rebase_path(_blink_gen_dir, root_build_dir) |
# depend on the following deps. |
make_core_generated_deps = [ |
"//third_party/WebKit/Source/core:generated_testing_idls", |
- "//third_party/WebKit/Source/bindings:core_bindings_generated", |
+ "//third_party/WebKit/Source/core:core_event_interfaces", |
] |
# Template to run most of scripts that process "*.in" files. |
@@ -96,7 +95,8 @@ make_core_generated_deps = [ |
# that the contents of "scripts_for_in_files" are included in |
# this list specified since this is how these lists are filled |
# from the GYP build. |
-# outputs: expected results relative to the blink_gen_dir |
+# outputs: expected results. Note that the directory of the 0th item in this |
+# list will be taken to be the output path. |
# other_args: (optional) other arguements to pass to the script. |
template("process_in_files") { |
action(target_name) { |
@@ -108,10 +108,13 @@ template("process_in_files") { |
} else { |
source_prereqs += scripts_for_in_files |
} |
- outputs = rebase_path(invoker.outputs, ".", _blink_gen_dir) |
+ outputs = invoker.outputs |
+ |
+ # Extract the directory to write files to. |
+ output_dir = get_path_info(outputs[0], "dir") |
args = rebase_path(invoker.in_files, root_build_dir) + [ |
- "--output_dir", _rel_blink_gen_dir, |
+ "--output_dir", rebase_path(output_dir, root_build_dir), |
] |
if (defined(invoker.other_args)) { |
args += invoker.other_args |
@@ -124,7 +127,7 @@ template("process_in_files") { |
# Template to run the make_names script. This is a special case of |
# process_in_files. |
# in_files: files to pass to the script |
-# outputs: expected results relative to the blink_gen_dir |
+# outputs: expected results |
template("make_names") { |
process_in_files(target_name) { |
script = "//third_party/WebKit/Source/build/scripts/make_names.py" |
@@ -138,7 +141,7 @@ template("make_names") { |
# Template to run the make_qualified_names script. This is a special case of |
# process_in_files. |
# in_files: list of ".in" files to process. |
-# outputs: list of output files relative to blink_gen_dir. |
+# outputs: list of output files |
template("make_qualified_names") { |
process_in_files(target_name) { |
script = "//third_party/WebKit/Source/build/scripts/make_qualified_names.py" |
@@ -152,7 +155,7 @@ template("make_qualified_names") { |
# Calls the make_event_factory script. This is a special case of |
# process_in_files. |
# in_files: list of ".in" files to process. |
-# outputs: list of output files relative to blink_gen_dir. |
+# outputs: list of output files |
template("make_event_factory") { |
process_in_files(target_name) { |
script = "//third_party/WebKit/Source/build/scripts/make_event_factory.py" |
@@ -164,56 +167,20 @@ template("make_event_factory") { |
# Calls the make_token_matcher script. |
# input_file: The "*-in.cpp" file |
-# output_file: The output file (relative to the build_gen_dir) |
+# output_file: The output file |
template("make_token_matcher") { |
action(target_name) { |
script = "//third_party/WebKit/Source/build/scripts/make_token_matcher.py" |
source_prereqs = scripts_for_in_files + [ invoker.input_file ] |
- outputs = [ |
- rebase_path(invoker.output_file, ".", _blink_gen_dir) |
- ] |
+ outputs = [ invoker.output_file ] |
args = [ |
rebase_path(invoker.input_file, root_build_dir), |
- rebase_path(invoker.output_file, root_build_dir, _blink_gen_dir), |
+ rebase_path(invoker.output_file, root_build_dir), |
] |
deps = make_core_generated_deps |
} |
} |
-# Calls generate_event_interfaces |
-# sources: A list of IDL files to process. |
-# output_file: The .in file to write, relative to the blink_gen_dir. |
-# suffix: (Optional) String to be passed to script via --suffix |
-template("generate_event_interfaces") { |
- action(target_name) { |
- # Write the file list to a unique temp file to avoid blowing out the |
- # command line length limit. |
- idl_files_list = "$target_gen_dir/${target_name}_file_list.tmp" |
- write_file(idl_files_list, |
- rebase_path(invoker.sources, root_build_dir)) |
- |
- source_prereqs = [ |
- "//third_party/WebKit/Source/bindings/scripts/utilities.py", |
- idl_files_list, |
- ] + invoker.sources |
- |
- output_file = "$_blink_gen_dir/" + invoker.output_file |
- outputs = [ output_file ] |
- |
- script = "//third_party/WebKit/Source/bindings/scripts/generate_event_interfaces.py" |
- args = [ |
- "--event-idl-files-list", |
- rebase_path(idl_files_list, root_build_dir), |
- "--event-interfaces-file", |
- rebase_path(output_file, root_build_dir), |
- "--write-file-only-if-changed=1", # Always true for Ninja. |
- ] |
- |
- if (defined(invoker.suffix)) { |
- args += [ "--suffix", invoker.suffix ] |
- } |
- } |
-} |