diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-01-19 19:14:22 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-01-19 19:14:22 +0000 |
commit | 8f83a02eef7af0425d00549d77d6656808a7ec90 (patch) | |
tree | 80862f1e4cd4897d04981ce287a916bff40e5b3a | |
parent | c76581b31585302a68e0842cc74613f9a92de1d1 (diff) | |
download | ruby-8f83a02eef7af0425d00549d77d6656808a7ec90.tar.gz ruby-8f83a02eef7af0425d00549d77d6656808a7ec90.tar.xz ruby-8f83a02eef7af0425d00549d77d6656808a7ec90.zip |
* lib/mkmf.rb (egrep_cpp): use inspect to show options.
* lib/mkmf.rb (dir_config): prior configured directories to
defaults.
* lib/mkmf.rb (dir_config): extract first word to determin
make command type.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | lib/mkmf.rb | 13 |
2 files changed, 18 insertions, 5 deletions
@@ -1,3 +1,13 @@ +Mon Jan 20 04:14:17 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net> + + * lib/mkmf.rb (egrep_cpp): use inspect to show options. + + * lib/mkmf.rb (dir_config): prior configured directories to + defaults. + + * lib/mkmf.rb (dir_config): extract first word to determin + make command type. + Mon Jan 20 02:15:53 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net> * ext/aix_mksym.rb: no longer used. diff --git a/lib/mkmf.rb b/lib/mkmf.rb index 0be7b7327..8479da5df 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -279,7 +279,7 @@ def egrep_cpp(pat, src, opt="") create_tmpsrc(src) xpopen(cpp_command('', opt)) do |f| if Regexp === pat - puts(" ruby -ne 'print if /#{pat.source}/'") + puts(" ruby -ne 'print if #{pat.inspect}'") f.grep(pat) {|l| puts "#{f.lineno}: #{l}" return true @@ -513,11 +513,13 @@ def dir_config(target, idefault=nil, ldefault=nil) if idir idircflag = "-I" + idir - $CPPFLAGS += " " + idircflag unless $CPPFLAGS.split.include?(idircflag) + unless Shellwords.shellwords($CPPFLAGS).include?(idircflag) + $CPPFLAGS = idircflag + " " + $CPPFLAGS + end end if ldir - $LIBPATH << ldir unless $LIBPATH.include?(ldir) + $LIBPATH.unshift(ldir) unless $LIBPATH.include?(ldir) end [idir, ldir] @@ -814,12 +816,13 @@ init_mkmf dir_config("opt") $make = with_config("make-prog", ENV["MAKE"] || "make") +make, = Shellwords.shellwords($make) $nmake = nil case when $mswin - $nmake = ?m if /nmake/i =~ $make + $nmake = ?m if /nmake/i =~ make when $bccwin - $nmake = ?b if /Borland/i =~ `#$make -h` + $nmake = ?b if /Borland/i =~ `#{make} -h` end Config::CONFIG["srcdir"] = CONFIG["srcdir"] = |