From 3ef72aebef3ec06295bc3f14c2a09da91a44ff31 Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 21 Feb 2010 12:20:21 +0000 Subject: * lib/mkmf.rb (create_makefile, install_files): honor srcprefix argument if given. [ruby-dev:40449] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/mkmf.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/mkmf.rb b/lib/mkmf.rb index fc9353e5cd..3b667a68bf 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -624,7 +624,7 @@ end def install_files(mfile, ifiles, map = nil, srcprefix = nil) ifiles or return ifiles.empty? and return - srcprefix ||= '$(srcdir)' + srcprefix ||= "$(srcdir)/#{srcprefix}".chomp('/') RbConfig::expand(srcdir = srcprefix.dup) dirs = [] path = Hash.new {|h, i| h[i] = dirs.push([i])[-1]} @@ -1684,7 +1684,7 @@ def create_makefile(target, srcprefix = nil) target_prefix = "" end - srcprefix = "$(srcdir)/#{srcprefix}".chomp('/') + srcprefix ||= "$(srcdir)/#{srcprefix}".chomp('/') RbConfig.expand(srcdir = srcprefix.dup) ext = ".#{$OBJEXT}" -- cgit v1.2.1