chapel-lang/chapel — pull request #814 by thomasvandoren (2014-11-12 19:09:39+00:00)
Title: Squash speculative gmp and re2 builds when they have previously failed.

Before this change, a user would speculatively try to build gmp and re2 over
and over again when they failed. This updates the gmp, re2, and third-party
Makefiles to only attempt the speculative build once per configuration
regardless of whether the speculative build succeeds or fails. The user is
warned that the speculative build is squashed when it has previously failed.

The third-party makefile checks for the presence of the config-specific build
subdir (e.g. build/darwin-clang-native) and only builds when that directory
does not exist. The gmp and re2 makefiles create that directory first, so it
will exist even if the respective build fails.

When the config-specific build subdir does exist, the third-party makefile then
checks for an expected header file in the install subdir (similar to what
util/chplenv/* does to auto-detect gmp and re2). If the header does not exist,
but the build subdir does, the user is warned that the respective speculative
build is squashed due to a previous failure.

Along the way, gmp and re2 makefiles were cleaned up a bit (mostly for my
understanding).