aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-03-24 09:48:09 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-03-24 09:48:09 +0000
commit5e23ff603f53c99ac45e331e24498bfa124b4d72 (patch)
treed70368c4ec28cd3e36e0e10958ca815fc36f5b36 /lib
parentd5158a0833e631a4728bf0d70552cd16c8bc25db (diff)
downloadruby-5e23ff603f53c99ac45e331e24498bfa124b4d72.tar.gz
* lib/mkmf.rb ($ruby, $topdir, $hdrdir): should not be affected by
DESTDIR after installed. * lib/mkmf.rb (dummy_makefile): default file lists to be cleaned. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/mkmf.rb20
1 files changed, 13 insertions, 7 deletions
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index ba9f90c4f4..be6062829b 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -45,7 +45,6 @@ $sitedir = CONFIG["sitedir"]
$sitelibdir = CONFIG["sitelibdir"]
$sitearchdir = CONFIG["sitearchdir"]
-$extmk = /extmk\.rb/ =~ $0
$mswin = /mswin/ =~ RUBY_PLATFORM
$bccwin = /bccwin/ =~ RUBY_PLATFORM
$mingw = /mingw/ =~ RUBY_PLATFORM
@@ -79,9 +78,10 @@ def map_dir(dir, map = nil)
end
libdir = File.dirname(__FILE__)
-if libdir == Config::CONFIG["rubylibdir"] and
- File.exist?(Config::CONFIG["archdir"] + "/ruby.h")
- $topdir = $hdrdir = $archdir
+$extmk = libdir != Config::CONFIG["rubylibdir"]
+if not $extmk and File.exist?(Config::CONFIG["archdir"] + "/ruby.h")
+ $topdir = Config::CONFIG["archdir"]
+ $hdrdir = $archdir
elsif File.exist?(($top_srcdir ||= File.dirname(libdir)) + "/ruby.h") and
File.exist?(($topdir ||= Config::CONFIG["topdir"]) + "/config.h")
$hdrdir = $top_srcdir
@@ -740,7 +740,7 @@ SHELL = /bin/sh
srcdir = #{srcdir}
topdir = #{$topdir}
-hdrdir = #{$hdrdir}
+hdrdir = #{$extmk ? $hdrdir : '$(topdir)'}
VPATH = #{vpath.join(CONFIG['PATH_SEPARATOR'])}
}
drive = File::PATH_SEPARATOR == ';' ? /\A\w:/ : /\A/
@@ -799,7 +799,13 @@ INSTALL_DATA = $(RUBY) -run -e install -- -vpm 0644
end
def dummy_makefile(srcdir)
- configuration(srcdir) << "all install install-so install-rb: Makefile\n" << CLEANINGS
+ configuration(srcdir) << <<RULES << CLEANINGS
+CLEANFILES = #{$cleanfiles.join(' ')}
+DISTCLEANFILES = #{$distcleanfiles.join(' ')}
+
+all install install-so install-rb: Makefile
+
+RULES
end
def create_makefile(target, srcprefix = nil)
@@ -1052,7 +1058,7 @@ $configure_args["--topsrcdir"] ||= $srcdir
Config::CONFIG["topdir"] = CONFIG["topdir"] =
$curdir = arg_config("--curdir", Dir.pwd)
$configure_args["--topdir"] ||= $curdir
-$ruby = arg_config("--ruby", File.join(CONFIG["bindir"], CONFIG["ruby_install_name"]))
+$ruby = arg_config("--ruby", File.join(Config::CONFIG["bindir"], CONFIG["ruby_install_name"]))
split = Shellwords.method(:shellwords).to_proc