summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-18 12:48:43 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-18 12:48:43 +0000
commitb3b5b5e6b600d52ed429cdcf19144e431ab17296 (patch)
tree63e0b84595985ad41c168a1bbfe1d3dd2f6e291f /lib
parent77ffc8bf3fec9e5b0e5d34b765b2285d4cda2090 (diff)
* eval.c (stack_extend): ignore inline optimization on VC7.
* win32/Makefile.sub (OS, RT): can override. * win32/Makefile.sub (LDFLAGS): ditto. shouldn't use pdb:none option. based on Tietew's patch [ruby-dev:22289] * lib/mkmf.rb (create_makefile): should remove deffile if it's made by miniruby. based on nobu's patch. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/mkmf.rb43
1 files changed, 20 insertions, 23 deletions
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index 080aa051b1..359a7418b1 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -797,30 +797,19 @@ def create_makefile(target, srcprefix = nil)
target = nil if $objs == ""
if target and EXPORT_PREFIX
- origdef = target + '.def'
- deffile = EXPORT_PREFIX + origdef
- unless File.exist? deffile
- if File.exist? File.join(srcdir, deffile)
- deffile = File.join(srcdir, deffile)
- elsif !EXPORT_PREFIX.empty? and File.exist?(origdef = File.join(srcdir, origdef))
- open(origdef) do |d|
- open(deffile, 'wb') do |f|
- d.each do |l|
- f.print l
- break if /^EXPORTS$/i =~ l
- end
- d.each do |l|
- f.print l.sub(/\S/, EXPORT_PREFIX+'\&')
- end
- end
- end
- else
- open(deffile, 'wb') do |f|
- f.print "EXPORTS\n", EXPORT_PREFIX, "Init_", target, "\n"
- end
+ if File.exist?(File.join(srcdir, target + '.def'))
+ deffile = "$(srcdir)/$(TARGET).def"
+ unless EXPORT_PREFIX.empty?
+ makedef = %{-pe "sub!(/^(?=\\w)/,'#{EXPORT_PREFIX}') unless 1../^EXPORTS$/i"}
end
+ else
+ makedef = %{-e "puts 'EXPORTS', '#{EXPORT_PREFIX}Init_$(TARGET)'"}
+ end
+ if makedef
+ $distcleanfiles << '$(DEFFILE)'
+ origdef = deffile
+ deffile = "$(TARGET)-$(arch).def"
end
- $distcleanfiles << deffile unless deffile == origdef
end
libpath = libpathflag(libpath)
@@ -914,7 +903,11 @@ static: $(STATIC_LIB)
end
end
- mfile.print "$(DLLIB): $(OBJS)\n\t"
+ if makedef
+ mfile.print "$(DLLIB): $(OBJS) $(DEFFILE)\n\t"
+ else
+ mfile.print "$(DLLIB): $(OBJS)\n\t"
+ end
mfile.print "@-$(RM) $@\n\t"
mfile.print "@-$(RM) $(TARGET).lib\n\t" if $mswin
mfile.print LINK_SO, "\n\n"
@@ -924,6 +917,10 @@ static: $(STATIC_LIB)
mfile.print "\n\t@-#{ranlib} $(DLLIB) 2> /dev/null || true"
end
mfile.print "\n\n"
+ if makedef
+ mfile.print "$(DEFFILE): #{origdef}\n"
+ mfile.print "\t$(RUBY) #{makedef} #{origdef} > $@\n\n"
+ end
depend = File.join(srcdir, "depend")
if File.exist?(depend)