diff --git a/README.md b/README.md index a1c246eb..f6092382 100644 --- a/README.md +++ b/README.md @@ -119,9 +119,10 @@ You can set certain environment variables to control the build process. * `MAKE` lets you override the command to use for `make`. Useful for 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). +* `MAKE_INSTALL_OPTS` lets you pass additional options to `make install`. +* `RUBY_CONFIGURE_OPTS`, `RUBY_MAKE_OPTS` and `RUBY_MAKE_INSTALL_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). ### Applying patches to Ruby before compiling diff --git a/bin/ruby-build b/bin/ruby-build index 71e1650f..534f3ab1 100755 --- a/bin/ruby-build +++ b/bin/ruby-build @@ -398,6 +398,8 @@ build_package_standard() { local PACKAGE_CONFIGURE_OPTS_ARRAY="${package_var_name}_CONFIGURE_OPTS_ARRAY[@]" local PACKAGE_MAKE_OPTS="${package_var_name}_MAKE_OPTS" local PACKAGE_MAKE_OPTS_ARRAY="${package_var_name}_MAKE_OPTS_ARRAY[@]" + local PACKAGE_MAKE_INSTALL_OPTS="${package_var_name}_MAKE_INSTALL_OPTS" + local PACKAGE_MAKE_INSTALL_OPTS_ARRAY="${package_var_name}_MAKE_INSTALL_OPTS_ARRAY[@]" local PACKAGE_CFLAGS="${package_var_name}_CFLAGS" [ "$package_var_name" = "RUBY" ] && use_homebrew_readline || true @@ -409,7 +411,7 @@ build_package_standard() { ) >&4 2>&1 { "$MAKE" $MAKE_OPTS ${!PACKAGE_MAKE_OPTS} "${!PACKAGE_MAKE_OPTS_ARRAY}" - "$MAKE" install + "$MAKE" install $MAKE_INSTALL_OPTS ${!PACKAGE_MAKE_INSTALL_OPTS} "${!PACKAGE_MAKE_INSTALL_OPTS_ARRAY}" } >&4 2>&1 } diff --git a/test/build.bats b/test/build.bats index ec43019b..f1660a66 100644 --- a/test/build.bats +++ b/test/build.bats @@ -47,7 +47,7 @@ OUT stub_make_install() { stub "$MAKE" \ " : echo \"$MAKE \$@\" >> build.log" \ - "install : cat build.log >> '$INSTALL_ROOT/build.log'" + "install : echo \"$MAKE \$@\" >> build.log && cat build.log >> '$INSTALL_ROOT/build.log'" } assert_build_log() { @@ -71,8 +71,10 @@ assert_build_log() { assert_build_log <