summaryrefslogtreecommitdiff
path: root/lib/mkmf.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-09-16 07:06:57 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-09-16 07:06:57 +0000
commit942a1c3ea591724af539b5f40b4991b502e34601 (patch)
tree1069aad14859ecb78d442f42c722d216bfe8bee8 /lib/mkmf.rb
parent119ad2e70d76e4e13a7cb00b3bbbbf9d03a2ca3a (diff)
* Makefile.in, common.in, instruby.rb, ext/extmk.rb, lib/mkmf.rb:
use instruby.rb to install extensions instead of ext/extmk.rb. * instruby.rb: store installed list into the file. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/mkmf.rb')
-rw-r--r--lib/mkmf.rb22
1 files changed, 14 insertions, 8 deletions
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index 6c8ddca0a3..ae27fdac43 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -83,8 +83,8 @@ INSTALL_DIRS = [
def install_dirs(target_prefix = nil)
if $extout
dirs = [
- ['RUBYCOMMONDIR', '$(extout)'],
- ['RUBYLIBDIR', '$(extout)$(target_prefix)'],
+ ['RUBYCOMMONDIR', '$(extout)/common'],
+ ['RUBYLIBDIR', '$(RUBYCOMMONDIR)/$(target_prefix)'],
['RUBYARCHDIR', '$(extout)/$(arch)$(target_prefix)'],
['extout', "#$extout"],
['extout_prefix', "#$extout_prefix"],
@@ -848,7 +848,7 @@ def find_executable0(bin, path = nil)
ext = config_string('EXEEXT')
if File.expand_path(bin) == bin
return bin if File.executable?(bin)
- return file if ext and File.executable?(file = bin + ext)
+ ext and File.executable?(file = bin + ext) and return file
return nil
end
if path ||= ENV['PATH']
@@ -1196,7 +1196,7 @@ def create_makefile(target, srcprefix = nil)
staticlib = target ? "$(TARGET).#$LIBEXT" : ""
mfile = open("Makefile", "wb")
mfile.print configuration(srcprefix)
- mfile.print %{
+ mfile.print "
libpath = #{$LIBPATH.join(" ")}
LIBPATH = #{libpath}
DEFFILE = #{deffile}
@@ -1215,18 +1215,18 @@ TARGET = #{target}
DLLIB = #{dllib}
EXTSTATIC = #{$static || ""}
STATIC_LIB = #{staticlib unless $static.nil?}
-
-}
+#{!$extout && defined?($installed_list) ? "INSTALLED_LIST = #{$installed_list}\n" : ""}
+"
install_dirs.each {|d| mfile.print("%-14s= %s\n" % d) if /^[[:upper:]]/ =~ d[0]}
n = ($extout ? '$(RUBYARCHDIR)/' : '') + '$(TARGET).'
- mfile.print %{
+ mfile.print "
TARGET_SO = #{($extout ? '$(RUBYARCHDIR)/' : '')}$(DLLIB)
CLEANLIBS = #{n}#{CONFIG['DLEXT']} #{n}il? #{n}tds #{n}map
CLEANOBJS = *.#{$OBJEXT} *.#{$LIBEXT} *.s[ol] *.pdb *.exp *.bak
all: #{$extout ? "install" : target ? "$(DLLIB)" : "Makefile"}
static: $(STATIC_LIB)#{$extout ? " install-rb" : ""}
-}
+"
mfile.print CLEANINGS
dirs = []
mfile.print "install: install-so install-rb\n\n"
@@ -1248,6 +1248,9 @@ static: $(STATIC_LIB)#{$extout ? " install-rb" : ""}
dir.gsub!(/(\$\{\w+)(\})/) {$1+sep+$2}
end
mfile.print "\t$(INSTALL_PROG) #{f} #{dir}\n"
+ if defined?($installed_list)
+ mfile.print "\t@echo #{dir}/#{File.basename(f)}>>$(INSTALLED_LIST)\n"
+ end
end
end
mfile.print("install-rb: pre-install-rb install-rb-default\n")
@@ -1275,6 +1278,9 @@ static: $(STATIC_LIB)#{$extout ? " install-rb" : ""}
sep = ""
end
mfile.print("#{f} $(@D#{sep})\n")
+ if defined?($installed_list) and !$extout
+ mfile.print("\t@echo #{dest}>>$(INSTALLED_LIST)\n")
+ end
end
end
end