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: I898d8e1f6fe9c8293dc7c2cddc26236f08303aad
(cherry picked from commit 75dd8795f0d97e8742366fa7af617b470a175ce3)
diff --git a/Android.bp b/Android.bp
index f7d69e1..223839b 100644
--- a/Android.bp
+++ b/Android.bp
@@ -18,8 +18,8 @@
genrule {
name: "android.hidl.manager@1.0_genc++",
- tool: "hidl-gen",
- cmd: "$tool -o $genDir -Lc++ -randroid.hidl:system/libhidl android.hidl.manager@1.0",
+ tools: ["hidl-gen"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hidl:system/libhidl android.hidl.manager@1.0",
srcs: [
"manager/1.0/IServiceManager.hal",
],
@@ -30,8 +30,8 @@
genrule {
name: "android.hidl.manager@1.0_genc++_headers",
- tool: "hidl-gen",
- cmd: "$tool -o $genDir -Lc++ -randroid.hidl:system/libhidl android.hidl.manager@1.0",
+ tools: ["hidl-gen"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hidl:system/libhidl android.hidl.manager@1.0",
srcs: [
"manager/1.0/IServiceManager.hal",
],