Skip to content

Commit

Permalink
Make sure we add configured lib paths to the Makefile generated by mkmkf
Browse files Browse the repository at this point in the history
This enables using custom directories that are not standard system
directories where libraries are located. On MRI this is handled by
passing down CONFIGURE_ARGS, but we prefer explicitly configuring this
so we are not bound in our configure options by those used in MRI
extensions.
  • Loading branch information
dbussink committed May 28, 2012
1 parent 4e74bc6 commit 0b1a46c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/18/mkmf.rb
Expand Up @@ -1720,6 +1720,16 @@ def init_mkmf(config = CONFIG)
$LIBRUBYARG_SHARED = config['LIBRUBYARG_SHARED']
$DEFLIBPATH = [$extmk ? "$(topdir)" : "$(libdir)"]
$DEFLIBPATH.unshift(".")

# ---------------------- Changed for Rubinius --------------------------------
# Make sure that we include the lib paths here that we may find libraries so
# that built in extensions will also find them if they have been configured
# at build time for Rubinius.
Rubinius::BUILD_CONFIG[:lib_dirs].each do |lib|
$DEFLIBPATH << lib
end
# ----------------------------------------------------------------------------

$LIBPATH = []
$INSTALLFILES = []
$NONINSTALLFILES = [/~\z/, /\A#.*#\z/, /\A\.#/, /\.bak\z/i, /\.orig\z/, /\.rej\z/, /\.l[ao]\z/, /\.o\z/]
Expand Down
10 changes: 10 additions & 0 deletions lib/19/mkmf.rb
Expand Up @@ -2166,6 +2166,16 @@ def init_mkmf(config = CONFIG, rbconfig = RbConfig::CONFIG)
$LIBRUBYARG_SHARED = config['LIBRUBYARG_SHARED']
$DEFLIBPATH = [$extmk ? "$(topdir)" : "$(libdir)"]
$DEFLIBPATH.unshift(".")

# ---------------------- Changed for Rubinius --------------------------------
# Make sure that we include the lib paths here that we may find libraries so
# that built in extensions will also find them if they have been configured
# at build time for Rubinius.
Rubinius::BUILD_CONFIG[:lib_dirs].each do |lib|
$DEFLIBPATH << lib
end
# ----------------------------------------------------------------------------

$LIBPATH = []
$INSTALLFILES = []
$NONINSTALLFILES = [/~\z/, /\A#.*#\z/, /\A\.#/, /\.bak\z/i, /\.orig\z/, /\.rej\z/, /\.l[ao]\z/, /\.o\z/]
Expand Down

0 comments on commit 0b1a46c

Please sign in to comment.