[gn] Pass make path explicitly

We've been assuming make is in the user's path for generated Zircon
build rules. This assumption is false for Chromium bots, which are not
provisioned with build-essential and thus this is blocking Tricium
rollout, since that runs on Chromium bots.

Change-Id: I16cc31a282c4973c52012a1200976af3fe1d904a
diff --git a/config/fuchsia/zircon.gni b/config/fuchsia/zircon.gni
index 9fa3099..76df754 100644
--- a/config/fuchsia/zircon.gni
+++ b/config/fuchsia/zircon.gni
@@ -38,6 +38,11 @@
   # by //scripts/fx commands that rebuild Zircon so that they use `-A`
   # again next time.
   zircon_use_asan = false
+
+  # Path to `make` binary. By default, `make` is assumed to be in the
+  # path. Used in the script that generates the Zircon build rules. N.B. this
+  # path is *not* rebased, just used as is.
+  zircon_make_path = "make"
 }
 
 if (zircon_build_dir == "") {
diff --git a/gn/BUILD.gn b/gn/BUILD.gn
index a17cbfd..678bcaa 100644
--- a/gn/BUILD.gn
+++ b/gn/BUILD.gn
@@ -109,6 +109,8 @@
               rebase_path(zircon_build_abi_dir),
               "--zircon-tool-build",
               rebase_path("$zircon_tools_dir/.."),
+              "--make",
+              zircon_make_path,
             ],
             "",
             zircon_files + supporting_templates)
diff --git a/zircon/create_gn_rules.py b/zircon/create_gn_rules.py
index 64af35e..8c2df11 100755
--- a/zircon/create_gn_rules.py
+++ b/zircon/create_gn_rules.py
@@ -470,6 +470,9 @@
     parser.add_argument('--debug',
                         help='Whether to print out debug information',
                         action='store_true')
+    parser.add_argument('--make',
+                        help='Path to make binary',
+                        required=True)
     args = parser.parse_args()
 
     out_dir = os.path.abspath(args.out)
@@ -487,7 +490,7 @@
     if debug:
         print('Building Zircon in: %s' % zircon_dir)
     make_args = [
-        'make',
+        args.make,
         'packages',
         'BUILDDIR=%s' % zircon_dir,
     ]