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/example/extension/light/2.0/Android.bp b/example/extension/light/2.0/Android.bp
index 5d58512..4cdbc66 100644
--- a/example/extension/light/2.0/Android.bp
+++ b/example/extension/light/2.0/Android.bp
@@ -2,8 +2,8 @@
 
 genrule {
     name: "android.hardware.example.extension.light@2.0_genc++",
-    tool: "hidl-gen",
-    cmd: "$tool -o $genDir -Lc++ -randroid.hardware:hardware/interfaces android.hardware.example.extension.light@2.0",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces android.hardware.example.extension.light@2.0",
     srcs: [
         "types.hal",
         "IExtLight.hal",
@@ -16,8 +16,8 @@
 
 genrule {
     name: "android.hardware.example.extension.light@2.0_genc++_headers",
-    tool: "hidl-gen",
-    cmd: "$tool -o $genDir -Lc++ -randroid.hardware:hardware/interfaces android.hardware.example.extension.light@2.0",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces android.hardware.example.extension.light@2.0",
     srcs: [
         "types.hal",
         "IExtLight.hal",