aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-08-31 06:36:12 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-08-31 06:36:12 +0000
commitf2c2e9d45795a3a2784549fccbf17550722dba30 (patch)
tree7143150043286f8c5614374e05f27880db122b6e /lib
parent7406a91202a3824cb2194cc4c4ec4d5bfcbec94c (diff)
downloadruby-f2c2e9d45795a3a2784549fccbf17550722dba30.tar.gz
mkmf.rb: TARGET_SO_DIR
* ext/extmk.rb: move TARGET_SO_DIR stuffs to mkmf.rb. * lib/mkmf.rb (create_makefile): create target shared object files under $(TARGET_SO_DIR) which is $sodir if it is defined with $extout. [ruby-core:77058] [Bug #12681] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/mkmf.rb12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index c20e431978..b16600de6a 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -2303,9 +2303,13 @@ TIMESTAMP_DIR = #{$extout ? '$(extout)/.timestamp' : '.'}
" #"
# TODO: fixme
install_dirs.each {|d| mfile.print("%-14s= %s\n" % d) if /^[[:upper:]]/ =~ d[0]}
- n = ($extout ? '$(RUBYARCHDIR)/' : '') + '$(TARGET)'
+ sodir = !$extout ? '' :
+ $sodir ? $sodir+target_prefix :
+ '$(RUBYARCHDIR)'
+ n = '$(TARGET_SO_DIR)$(TARGET)'
mfile.print "
-TARGET_SO = #{($extout ? '$(RUBYARCHDIR)/' : '')}$(DLLIB)
+TARGET_SO_DIR =#{(sodir ? " #{sodir}/" : '')}
+TARGET_SO = $(TARGET_SO_DIR)$(DLLIB)
CLEANLIBS = $(TARGET_SO) #{config_string('cleanlibs') {|t| t.gsub(/\$\*/) {n}}}
CLEANOBJS = *.#{$OBJEXT} #{config_string('cleanobjs') {|t| t.gsub(/\$\*/, "$(TARGET)#{deffile ? '-$(arch)': ''}")} if target} *.bak
@@ -2331,7 +2335,7 @@ static: #{$extmk && !$static ? "all" : "$(STATIC_LIB)#{!$extmk ? " install-rb" :
end
dirs = []
mfile.print "install: install-so install-rb\n\n"
- sodir = (dir = "$(RUBYARCHDIR)").dup
+ dir = sodir.dup
mfile.print("install-so: ")
if target
f = "$(DLLIB)"
@@ -2450,7 +2454,7 @@ site-install-rb: install-rb
mfile.print "$(TARGET_SO): "
mfile.print "$(DEFFILE) " if makedef
mfile.print "$(OBJS) Makefile"
- mfile.print " #{timestamp_file('$(RUBYARCHDIR)', target_prefix)}" if $extout
+ mfile.print " #{timestamp_file(sodir, target_prefix)}" if $extout
mfile.print "\n"
mfile.print "\t$(ECHO) linking shared-object #{target_prefix.sub(/\A\/(.*)/, '\1/')}$(DLLIB)\n"
mfile.print "\t-$(Q)$(RM) $(@#{sep})\n"