summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-09-26 14:54:40 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-09-26 14:54:40 +0000
commit3d132526012e4c9bad0389bf97b978cf6159abde (patch)
tree963fbfe59aecf0f1474520c73dd27aa0623cf87b
parentd996ea7a9c27e42e303ee8eebcde1151befb1757 (diff)
* ext/extmk.rb (extmake), lib/mkmf.rb (configuration): top_srcdir
should not prefixed with DESTDIR. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@13525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--ext/extmk.rb1
-rw-r--r--lib/mkmf.rb6
3 files changed, 10 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 9221f42058..530ed259b0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Sep 26 23:54:37 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/extmk.rb (extmake), lib/mkmf.rb (configuration): top_srcdir
+ should not prefixed with DESTDIR.
+
Wed Sep 26 08:36:31 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
* Makefile.in (ext/extinit.o): use $(OUTFLAG) as well as other
diff --git a/ext/extmk.rb b/ext/extmk.rb
index e20667c6d1..a919381adc 100644
--- a/ext/extmk.rb
+++ b/ext/extmk.rb
@@ -135,7 +135,6 @@ def extmake(target)
"topdir" => $topdir,
}
mkconfig = {
- "top_srcdir" => ($hdrdir == top_srcdir) ? top_srcdir : "$(topdir)"+top_srcdir[2..-1],
"hdrdir" => "$(top_srcdir)",
"srcdir" => "$(top_srcdir)/ext/#{$mdir}",
"topdir" => $topdir,
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index c56717c1d6..bf642dc5ec 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -1114,7 +1114,11 @@ def configuration(srcdir)
SHELL = /bin/sh
#### Start of system configuration section. ####
-
+#{
+if $extmk
+ "top_srcdir = " + $top_srcdir.sub(%r"\A#{Regexp.quote($topdir)}/", "$(topdir)/")
+end
+}
srcdir = #{srcdir.gsub(/\$\((srcdir)\)|\$\{(srcdir)\}/) {CONFIG[$1||$2]}.quote}
topdir = #{($extmk ? CONFIG["topdir"] : $topdir).quote}
hdrdir = #{$extmk ? CONFIG["hdrdir"].quote : '$(topdir)'}