Commit a6395eb2 authored by Sam Stephenson's avatar Sam Stephenson
Browse files

Add support for `RUBY_CONFIGURE_OPTS` and `RUBY_MAKE_OPTS`

These variables let you pass Ruby-specific configure and make options
that will not be passed to dependent packages like libyaml.
parent d9bbeb3e
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -137,6 +137,9 @@ process.
  specifying GNU make (`gmake`) on some systems.
* `MAKE_OPTS` (or `MAKEOPTS`) lets you pass additional options to
  `make`.
* `RUBY_CONFIGURE_OPTS` and `RUBY_MAKE_OPTS` allow you to specify
  configure and make options for buildling MRI. These variables will
  be passed to Ruby only, not any dependent packages (e.g. libyaml).

### Checksum verification

+8 −3
Original line number Diff line number Diff line
@@ -305,7 +305,7 @@ build_package() {
  echo "Installing ${package_name}..." >&2

  for command in $commands; do
    "build_package_${command}"
    "build_package_${command}" "$package_name"
  done
}

@@ -318,8 +318,13 @@ build_package_standard() {
    MAKE_OPTS="-j 2"
  fi

  { ./configure --prefix="$PREFIX_PATH" $CONFIGURE_OPTS
    "$MAKE" $MAKE_OPTS
  # Support YAML_CONFIGURE_OPTS, RUBY_CONFIGURE_OPTS, etc.
  local package_var_name="$(echo "${package_name%%-*}" | tr a-z A-Z)"
  local PACKAGE_CONFIGURE_OPTS="${package_var_name}_CONFIGURE_OPTS"
  local PACKAGE_MAKE_OPTS="${package_var_name}_MAKE_OPTS"

  { ./configure --prefix="$PREFIX_PATH" $CONFIGURE_OPTS ${!PACKAGE_CONFIGURE_OPTS}
    "$MAKE" $MAKE_OPTS ${!PACKAGE_MAKE_OPTS}
    "$MAKE" install
  } >&4 2>&1
}