Support genrules with multiple tools
To allow genrules with more than one tool, rename the tool property to
tools and make it an array, replace $tool with $(location <label>),
and use $() for other variables for consistency.
Bug: 31948427
Test: compare build.ninja
Change-Id: I3d714f70a2af0dc60faeee10e09b6ed166601f1d
diff --git a/tv/cec/1.0/Android.bp b/tv/cec/1.0/Android.bp
index 4fd1b7e..bb1ae82 100644
--- a/tv/cec/1.0/Android.bp
+++ b/tv/cec/1.0/Android.bp
@@ -2,8 +2,8 @@
genrule {
name: "android.hardware.tv.cec@1.0_genc++",
- tool: "hidl-gen",
- cmd: "$tool -o $genDir -Lc++ -randroid.hardware:hardware/interfaces android.hardware.tv.cec@1.0",
+ tools: ["hidl-gen"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces android.hardware.tv.cec@1.0",
srcs: [
"types.hal",
"IHdmiCec.hal",
@@ -18,8 +18,8 @@
genrule {
name: "android.hardware.tv.cec@1.0_genc++_headers",
- tool: "hidl-gen",
- cmd: "$tool -o $genDir -Lc++ -randroid.hardware:hardware/interfaces android.hardware.tv.cec@1.0",
+ tools: ["hidl-gen"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces android.hardware.tv.cec@1.0",
srcs: [
"types.hal",
"IHdmiCec.hal",
@@ -51,9 +51,9 @@
"libutils",
"libcutils",
],
-export_shared_lib_headers: [
- "libhidl",
- "libhwbinder",
- "libutils",
+ export_shared_lib_headers: [
+ "libhidl",
+ "libhwbinder",
+ "libutils",
],
}