Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
ruby-build
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ruby-build
Commits
55bb3423
Commit
55bb3423
authored
Jan 29, 2014
by
Mislav Marohnić
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #493 from eric/add-make-install-opts-variables
Add MAKE_INSTALL_OPTS for packages
parents
be987f2a
37c9a046
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
58 additions
and
5 deletions
+58
-5
README.md
+4
-3
bin/ruby-build
+3
-1
test/build.bats
+51
-1
No files found.
README.md
View file @
55bb3423
...
...
@@ -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
...
...
bin/ruby-build
View file @
55bb3423
...
...
@@ -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
}
...
...
test/build.bats
View file @
55bb3423
...
...
@@ -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 <<OUT
yaml-0.1.4: --prefix=$INSTALL_ROOT
make -j 2
make install
ruby-2.0.0: --prefix=$INSTALL_ROOT
make -j 2
make install
OUT
}
...
...
@@ -94,9 +96,11 @@ OUT
assert_build_log <<OUT
yaml-0.1.4: --prefix=$INSTALL_ROOT
make -j 2
make install
patch -p0 -i -
ruby-2.0.0: --prefix=$INSTALL_ROOT
make -j 2
make install
OUT
}
...
...
@@ -118,6 +122,7 @@ OUT
assert_build_log <<OUT
ruby-2.0.0: --prefix=$INSTALL_ROOT --with-libyaml-dir=$brew_libdir
make -j 2
make install
OUT
}
...
...
@@ -141,6 +146,7 @@ DEF
assert_build_log <<OUT
ruby-2.0.0: --prefix=$INSTALL_ROOT --with-readline-dir=$readline_libdir
make -j 2
make install
OUT
}
...
...
@@ -162,6 +168,7 @@ DEF
assert_build_log <<OUT
ruby-2.0.0: --prefix=$INSTALL_ROOT --with-readline-dir=/custom
make -j 2
make install
OUT
}
...
...
@@ -184,6 +191,7 @@ DEF
assert_build_log <<OUT
ruby-2.0.0: --prefix=$INSTALL_ROOT
make -j 2
make install
OUT
}
...
...
@@ -207,6 +215,47 @@ DEF
assert_build_log <<OUT
ruby-2.0.0: --prefix=$INSTALL_ROOT
make -j 4
make install
OUT
}
@test "setting RUBY_MAKE_INSTALL_OPTS to a multi-word string" {
cached_tarball "ruby-2.0.0"
stub_make_install
export RUBY_MAKE_INSTALL_OPTS="DOGE=\"such wow\""
run_inline_definition <<DEF
install_package "ruby-2.0.0" "http://ruby-lang.org/ruby/2.0/ruby-2.0.0.tar.gz"
DEF
assert_success
unstub make
assert_build_log <<OUT
ruby-2.0.0: --prefix=$INSTALL_ROOT
make -j 2
make install DOGE="such wow"
OUT
}
@test "setting MAKE_INSTALL_OPTS to a multi-word string" {
cached_tarball "ruby-2.0.0"
stub_make_install
export MAKE_INSTALL_OPTS="DOGE=\"such wow\""
run_inline_definition <<DEF
install_package "ruby-2.0.0" "http://ruby-lang.org/ruby/2.0/ruby-2.0.0.tar.gz"
DEF
assert_success
unstub make
assert_build_log <<OUT
ruby-2.0.0: --prefix=$INSTALL_ROOT
make -j 2
make install DOGE="such wow"
OUT
}
...
...
@@ -257,6 +306,7 @@ DEF
apply -p1 -i /my/patch.diff
ruby-2.0.0: --prefix=$INSTALL_ROOT
make -j 2
make install
OUT
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment