rebuild.sh: Fix Darwin build.

This patch fixes the rebuild.sh script to work on Darwin,
and provides the following improvements:

- Fail appropriately when a subshell command fails.
  Despite the fact that 'set -e' is used at the top of
  the script, there is no guarantee that the execution
  of sub-shell commands will stop as soon as possible
  (per Posix, see [1]).

  The unintended consequence was that failure to build
  of the dependent libraries didn't stop the script which
  then tried to build the rest of the project, which of
  course also failed miserably.

- On OS X, do not use a toolchain wrapper, but the host
  toolchain directly. However, use SDKROOT=macosx10.8 to
  ensure the generated binaries run on OS X 10.8

  Note also that SDL 1.5 does not build properly with
  the macosx10.9. Consider switching to SDL 2 instead.
1 file changed
tree: 84a9d1fe74d48ac1b5a350e3482926a2a2df50ea
  1. archive/
  2. scripts/