1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/extmk.rb, lib/mkmf.rb: rename $outdir to $extout.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2004-02-09 09:20:52 +00:00
parent ec47d11179
commit 3d4b83aaba
2 changed files with 19 additions and 19 deletions

View file

@ -146,7 +146,7 @@ def parse_args()
end end
$destdir = $OPT['dest-dir'] || '' $destdir = $OPT['dest-dir'] || ''
if opt = $OPT['extout'] and !opt.empty? if opt = $OPT['extout'] and !opt.empty?
$outdir = File.expand_path(opt, $topdir) $extout = File.expand_path(opt, $topdir)
end end
$make = $OPT['make'] || $make || 'make' $make = $OPT['make'] || $make || 'make'
mflags = ($OPT['make-flags'] || '').strip mflags = ($OPT['make-flags'] || '').strip
@ -179,9 +179,9 @@ def parse_args()
$destdir = File.expand_path($destdir) $destdir = File.expand_path($destdir)
$mflags.defined?("DESTDIR") or $mflags << "DESTDIR=#{$destdir}" $mflags.defined?("DESTDIR") or $mflags << "DESTDIR=#{$destdir}"
end end
if $outdir if $extout
$mflags << "outdir=#{$outdir.sub(/#{Regexp.quote($topdir)}/, '$(topdir)')}" $mflags << "extout=#{$extout.sub(/#{Regexp.quote($topdir)}/, '$(topdir)')}"
$mflags << "outdir_prefix=#{$outdir_prefix}" $mflags << "extout_prefix=#{$extout_prefix}"
end end
$message = $OPT['message'] $message = $OPT['message']
@ -268,14 +268,14 @@ exts |= Dir.glob("#{ext_prefix}/*/**/MANIFEST").collect {|d|
d d
} unless $extension } unless $extension
if $outdir if $extout
if $install if $install
Config.expand(dest = "#{$destdir}#{$rubylibdir}") Config.expand(dest = "#{$destdir}#{$rubylibdir}")
FileUtils.cp_r($outdir+"/.", dest, :verbose => true, :noop => $dryrun) FileUtils.cp_r($extout+"/.", dest, :verbose => true, :noop => $dryrun)
exit exit
end end
unless $ignore unless $ignore
FileUtils.mkpath($outdir) FileUtils.mkpath($extout)
end end
end end

View file

@ -799,7 +799,7 @@ def create_makefile(target, srcprefix = nil)
target_prefix = "" target_prefix = ""
end end
$outdir_prefix = $outdir ? "$(outdir)$(target_prefix)/" : "" $extout_prefix = $extout ? "$(extout)$(target_prefix)/" : ""
srcprefix ||= '$(srcdir)' srcprefix ||= '$(srcdir)'
Config::expand(srcdir = srcprefix.dup) Config::expand(srcdir = srcprefix.dup)
@ -848,8 +848,8 @@ DEFFILE = #{deffile}
CLEANFILES = #{$cleanfiles.join(' ')} CLEANFILES = #{$cleanfiles.join(' ')}
DISTCLEANFILES = #{$distcleanfiles.join(' ')} DISTCLEANFILES = #{$distcleanfiles.join(' ')}
outdir = #{$outdir.sub(/#{Regexp.quote($topdir)}/, '$(topdir)') if $outdir} extout = #{$extout.sub(/#{Regexp.quote($topdir)}/, '$(topdir)') if $extout}
outdir_prefix = #{$outdir_prefix} extout_prefix = #{$extout_prefix}
target_prefix = #{target_prefix} target_prefix = #{target_prefix}
LOCAL_LIBS = #{$LOCAL_LIBS} LOCAL_LIBS = #{$LOCAL_LIBS}
LIBS = #{$LIBRUBYARG} #{$libs} #{$LIBS} LIBS = #{$LIBRUBYARG} #{$libs} #{$LIBS}
@ -858,11 +858,11 @@ TARGET = #{target}
DLLIB = #{dllib} DLLIB = #{dllib}
STATIC_LIB = #{staticlib} STATIC_LIB = #{staticlib}
} }
if $outdir if $extout
mfile.print %{ mfile.print %{
RUBYCOMMONDIR = $(outdir) RUBYCOMMONDIR = $(extout)
RUBYLIBDIR = $(outdir)$(target_prefix) RUBYLIBDIR = $(extout)$(target_prefix)
RUBYARCHDIR = $(outdir)/$(arch)$(target_prefix) RUBYARCHDIR = $(extout)/$(arch)$(target_prefix)
} }
elsif $extmk elsif $extmk
mfile.print %{ mfile.print %{
@ -878,10 +878,10 @@ RUBYARCHDIR = $(sitearchdir)$(target_prefix)
} }
end end
mfile.print %{ mfile.print %{
CLEANLIBS = #{$outdir_prefix}$(TARGET).* CLEANLIBS = #{$extout_prefix}$(TARGET).*
CLEANOBJS = *.#{$OBJEXT} *.#{$LIBEXT} *.s[ol] *.pdb *.bak CLEANOBJS = *.#{$OBJEXT} *.#{$LIBEXT} *.s[ol] *.pdb *.bak
all: #{target ? $outdir ? "install" : "$(DLLIB)" : "Makefile"} all: #{target ? $extout ? "install" : "$(DLLIB)" : "Makefile"}
static: $(STATIC_LIB) static: $(STATIC_LIB)
} }
@ -894,7 +894,7 @@ static: $(STATIC_LIB)
f = "$(DLLIB)" f = "$(DLLIB)"
dest = "#{dir}/#{f}" dest = "#{dir}/#{f}"
mfile.print "install-so: #{dest}\n" mfile.print "install-so: #{dest}\n"
unless $outdir unless $extout
mfile.print "#{dest}: #{f}\n\t@$(INSTALL_PROG) #{f} #{dir}\n" mfile.print "#{dest}: #{f}\n\t@$(INSTALL_PROG) #{f} #{dir}\n"
end end
end end
@ -942,7 +942,7 @@ site-install-rb: install-rb
end end
end end
mfile.print "$(RUBYARCHDIR)/" if $outdir mfile.print "$(RUBYARCHDIR)/" if $extout
mfile.print "$(DLLIB): ", (makedef ? "$(DEFFILE) " : ""), "$(OBJS)\n\t" mfile.print "$(DLLIB): ", (makedef ? "$(DEFFILE) " : ""), "$(OBJS)\n\t"
mfile.print "@-$(RM) $@\n\t" mfile.print "@-$(RM) $@\n\t"
mfile.print "@-$(RM) $(TARGET).lib\n\t" if $mswin mfile.print "@-$(RM) $(TARGET).lib\n\t" if $mswin
@ -1005,7 +1005,7 @@ def init_mkmf(config = CONFIG)
$cleanfiles = [] $cleanfiles = []
$distcleanfiles = [] $distcleanfiles = []
$outdir ||= nil $extout ||= nil
dir_config("opt") dir_config("opt")
end end