Commit 0e58079d authored by Mislav Marohnić's avatar Mislav Marohnić
Browse files

On FreeBSD, stop defaulting to MAKE=gmake

It appears that regular `make` that ships on FreeBSD 10 is compatible
enough to build Rubies. This enables ruby-build on fresh FreeBSD
installs (which don't have `gmake` by default) without having to
explicitly set `MAKE=make`.
parent 29f1a191
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1032,7 +1032,7 @@ if "${CC:-cc}" -x c /dev/null -E -Wno-error=shorten-64-to-32 &>/dev/null; then
fi

if [ -z "$MAKE" ]; then
  if [[ "FreeBSD" = "$(uname -s)" ]]; then
  if [ "FreeBSD" = "$(uname -s)" ] && [ "$(uname -r | grep -o '[0-9]*')" -lt 10 ]; then
    export MAKE="gmake"
  else
    export MAKE="make"
+14 −2
Original line number Diff line number Diff line
@@ -318,10 +318,10 @@ OUT
  assert [ -x ./here/bin/package ]
}

@test "make on FreeBSD defaults to gmake" {
@test "make on FreeBSD 9 defaults to gmake" {
  cached_tarball "ruby-2.0.0"

  stub uname "-s : echo FreeBSD"
  stub uname "-s : echo FreeBSD" "-r : echo 9.1"
  MAKE=gmake stub_make_install

  MAKE= install_fixture definitions/vanilla-ruby
@@ -331,6 +331,18 @@ OUT
  unstub uname
}

@test "make on FreeBSD 10" {
  cached_tarball "ruby-2.0.0"

  stub uname "-s : echo FreeBSD" "-r : echo 10.0-RELEASE"
  stub_make_install

  MAKE= install_fixture definitions/vanilla-ruby
  assert_success

  unstub uname
}

@test "can use RUBY_CONFIGURE to apply a patch" {
  cached_tarball "ruby-2.0.0"