Improve compile.sh error message further

In the error message about not being able to ./compile.sh from
a plain checkout, add full instructions on how to build bazel.
This will hopefully reduce the need for questions about this
error message.

--
Change-Id: I79c280c4c8522cf6f38ec731947365178aef9d58
Reviewed-on: https://cr.bazel.build/7594
PiperOrigin-RevId: 140846434
MOS_MIGRATED_REVID=140846434
diff --git a/scripts/bootstrap/compile.sh b/scripts/bootstrap/compile.sh
index 0ecdcff..1cc5975 100755
--- a/scripts/bootstrap/compile.sh
+++ b/scripts/bootstrap/compile.sh
@@ -163,6 +163,29 @@
   run "$JAR" cmf $output/MANIFEST.MF $output/$name.jar $packages "$@"
 }
 
+HOW_TO_BOOTSTRAP='
+
+--------------------------------------------------------------------------------
+NOTE: This failure is likely occuring if you are trying to bootstrap bazel from
+a developer checkout. Those checkouts do not include the generated output of
+the protoc compiler (as we prefer not to version generated files).
+
+* To build a developer version of bazel, do
+
+    bazel build //src:bazel
+
+* To bootstrap your first bazel binary, please download a dist archive from our
+  release page at https://github.com/bazelbuild/bazel/releases and run
+  compile.sh on the unpacked archive.
+
+The full install instructions to install a release version of bazel can be found
+at https://bazel.build/versions/master/docs/install.html#compiling-from-source
+For a rationale, why the bootstrap process is organized in this way, see
+https://bazel.build/designs/2016/10/11/distribution-artifact.html
+--------------------------------------------------------------------------------
+
+'
+
 if [ -z "${BAZEL_SKIP_JAVA_COMPILATION}" ]; then
 
     if [ -d derived/src/java ]
@@ -173,12 +196,10 @@
     else
 
         [ -n "${PROTOC}" ] \
-            || fail "Must specify PROTOC if not bootstrapping from the distribution artifact;\
- NOTE: development versions are built with 'bazel build //src:bazel'"
+            || fail "Must specify PROTOC if not bootstrapping from the distribution artifact${HOW_TO_BOOTSTRAP}"
 
         [ -n "${GRPC_JAVA_PLUGIN}" ] \
-            || fail "Must specify GRPC_JAVA_PLUGIN if not bootstrapping from the distribution artifact;\
- NOTE: development versions are built with 'bazel build //src:bazel'"
+            || fail "Must specify GRPC_JAVA_PLUGIN if not bootstrapping from the distribution artifact${HOW_TO_BOOTSTRAP}"
 
         [[ -x "${PROTOC-}" ]] \
             || fail "Protobuf compiler not found in ${PROTOC-}"