mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/mkmf.rb ($ruby, $topdir, $hdrdir): should not be affected by
DESTDIR after installed. * lib/mkmf.rb (RUBY): / is not recognized as path separator on nmake/bmake. [ruby-list:39388] * lib/mkmf.rb (init_mkmf): $INCFLAGS also should be lazy-evaluated. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c14a860044
commit
6d8b7691a7
2 changed files with 22 additions and 10 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
||||||
|
Wed Mar 24 18:48:26 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* lib/mkmf.rb ($ruby, $topdir, $hdrdir): should not be affected by
|
||||||
|
DESTDIR after installed.
|
||||||
|
|
||||||
|
* lib/mkmf.rb (RUBY): / is not recognized as path separator on
|
||||||
|
nmake/bmake. [ruby-list:39388]
|
||||||
|
|
||||||
|
* lib/mkmf.rb (init_mkmf): $INCFLAGS also should be lazy-evaluated.
|
||||||
|
|
||||||
Wed Mar 24 12:32:56 2004 Dave Thomas <dave@pragprog.com>
|
Wed Mar 24 12:32:56 2004 Dave Thomas <dave@pragprog.com>
|
||||||
|
|
||||||
* lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser::handle_class_module):
|
* lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser::handle_class_module):
|
||||||
|
|
18
lib/mkmf.rb
18
lib/mkmf.rb
|
@ -46,7 +46,6 @@ $sitedir = CONFIG["sitedir"]
|
||||||
$sitelibdir = CONFIG["sitelibdir"]
|
$sitelibdir = CONFIG["sitelibdir"]
|
||||||
$sitearchdir = CONFIG["sitearchdir"]
|
$sitearchdir = CONFIG["sitearchdir"]
|
||||||
|
|
||||||
$extmk = /extmk\.rb/ =~ $0
|
|
||||||
$mswin = /mswin/ =~ RUBY_PLATFORM
|
$mswin = /mswin/ =~ RUBY_PLATFORM
|
||||||
$bccwin = /bccwin/ =~ RUBY_PLATFORM
|
$bccwin = /bccwin/ =~ RUBY_PLATFORM
|
||||||
$mingw = /mingw/ =~ RUBY_PLATFORM
|
$mingw = /mingw/ =~ RUBY_PLATFORM
|
||||||
|
@ -77,15 +76,17 @@ def map_dir(dir, map = nil)
|
||||||
map.inject(dir) {|dir, (orig, new)| dir.gsub(orig, new)}
|
map.inject(dir) {|dir, (orig, new)| dir.gsub(orig, new)}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
libdir = File.dirname(__FILE__)
|
||||||
|
$extmk = libdir != Config::CONFIG["rubylibdir"]
|
||||||
if not $extmk and File.exist? Config::CONFIG["archdir"] + "/ruby.h"
|
if not $extmk and File.exist? Config::CONFIG["archdir"] + "/ruby.h"
|
||||||
|
$topdir = Config::CONFIG["archdir"]
|
||||||
$hdrdir = $archdir
|
$hdrdir = $archdir
|
||||||
elsif File.exist? $srcdir + "/ruby.h"
|
elsif File.exist? $srcdir + "/ruby.h"
|
||||||
|
$topdir = Config::CONFIG["compile_dir"]
|
||||||
$hdrdir = $srcdir
|
$hdrdir = $srcdir
|
||||||
else
|
else
|
||||||
warn "can't find header files for ruby."
|
abort "can't find header files for ruby."
|
||||||
exit 1
|
|
||||||
end
|
end
|
||||||
$topdir = $hdrdir
|
|
||||||
|
|
||||||
OUTFLAG = CONFIG['OUTFLAG']
|
OUTFLAG = CONFIG['OUTFLAG']
|
||||||
CPPOUTFILE = CONFIG['CPPOUTFILE']
|
CPPOUTFILE = CONFIG['CPPOUTFILE']
|
||||||
|
@ -714,7 +715,7 @@ SHELL = /bin/sh
|
||||||
|
|
||||||
srcdir = #{srcdir}
|
srcdir = #{srcdir}
|
||||||
topdir = #{$topdir}
|
topdir = #{$topdir}
|
||||||
hdrdir = #{$hdrdir}
|
hdrdir = #{$extmk ? $hdrdir : '$(topdir)'}
|
||||||
VPATH = #{$mingw && CONFIG['build_os'] == 'cygwin' ? '$(shell cygpath -u $(srcdir))' : '$(srcdir)'}
|
VPATH = #{$mingw && CONFIG['build_os'] == 'cygwin' ? '$(shell cygpath -u $(srcdir))' : '$(srcdir)'}
|
||||||
}
|
}
|
||||||
drive = File::PATH_SEPARATOR == ';' ? /\A\w:/ : /\A/
|
drive = File::PATH_SEPARATOR == ';' ? /\A\w:/ : /\A/
|
||||||
|
@ -750,7 +751,8 @@ RUBY_SO_NAME = #{CONFIG['RUBY_SO_NAME']}
|
||||||
arch = #{CONFIG['arch']}
|
arch = #{CONFIG['arch']}
|
||||||
sitearch = #{CONFIG['sitearch']}
|
sitearch = #{CONFIG['sitearch']}
|
||||||
ruby_version = #{Config::CONFIG['ruby_version']}
|
ruby_version = #{Config::CONFIG['ruby_version']}
|
||||||
RUBY = #{$ruby}
|
ruby = #{$ruby}
|
||||||
|
RUBY = #{($nmake && !$extmk && !$configure_args.has_key?('--ruby')) ? '$(ruby:/=\)' : '$(ruby)'}
|
||||||
RM = $(RUBY) -run -e rm -- -f
|
RM = $(RUBY) -run -e rm -- -f
|
||||||
MAKEDIRS = $(RUBY) -run -e mkdir -- -p
|
MAKEDIRS = $(RUBY) -run -e mkdir -- -p
|
||||||
INSTALL_PROG = $(RUBY) -run -e install -- -vpm 0755
|
INSTALL_PROG = $(RUBY) -run -e install -- -vpm 0755
|
||||||
|
@ -960,7 +962,7 @@ def init_mkmf(config = CONFIG)
|
||||||
$ARCH_FLAG = with_config("arch_flag", arg_config("ARCH_FLAG", config["ARCH_FLAG"])).dup
|
$ARCH_FLAG = with_config("arch_flag", arg_config("ARCH_FLAG", config["ARCH_FLAG"])).dup
|
||||||
$CPPFLAGS = with_config("cppflags", arg_config("CPPFLAGS", config["CPPFLAGS"])).dup
|
$CPPFLAGS = with_config("cppflags", arg_config("CPPFLAGS", config["CPPFLAGS"])).dup
|
||||||
$LDFLAGS = (with_config("ldflags") || "").dup
|
$LDFLAGS = (with_config("ldflags") || "").dup
|
||||||
$INCFLAGS = "-I#{$topdir}"
|
$INCFLAGS = "-I$(topdir)"
|
||||||
$DLDFLAGS = with_config("dldflags", arg_config("DLDFLAGS", config["DLDFLAGS"])).dup
|
$DLDFLAGS = with_config("dldflags", arg_config("DLDFLAGS", config["DLDFLAGS"])).dup
|
||||||
$LIBEXT = config['LIBEXT'].dup
|
$LIBEXT = config['LIBEXT'].dup
|
||||||
$OBJEXT = config["OBJEXT"].dup
|
$OBJEXT = config["OBJEXT"].dup
|
||||||
|
@ -1004,7 +1006,7 @@ $configure_args["--topsrcdir"] ||= $srcdir
|
||||||
Config::CONFIG["topdir"] = CONFIG["topdir"] =
|
Config::CONFIG["topdir"] = CONFIG["topdir"] =
|
||||||
$curdir = arg_config("--curdir", Dir.pwd)
|
$curdir = arg_config("--curdir", Dir.pwd)
|
||||||
$configure_args["--topdir"] ||= $curdir
|
$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
|
split = Shellwords.method(:shellwords).to_proc
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue