diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-06-26 02:07:30 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-06-26 02:07:30 +0000 |
commit | 4cf1e8654d8f7372d6244054dedfd22d3df3dd88 (patch) | |
tree | 36856c9106ed555f5cec856516cc3a7acb14e8fb /lib/mkmf.rb | |
parent | 89b572762d271b570e98ec91709934c77c8e6ece (diff) | |
download | ruby-4cf1e8654d8f7372d6244054dedfd22d3df3dd88.tar.gz |
* lib/mkmf.rb (libpathflag, find_header, dir_config): quote directory
names if necessary. [ruby-talk:104505]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/mkmf.rb')
-rw-r--r-- | lib/mkmf.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/mkmf.rb b/lib/mkmf.rb index 0561c8bdb6..f132bf31b9 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -252,7 +252,7 @@ end def libpathflag(libpath=$LIBPATH) libpath.map{|x| (x == "$(topdir)" ? LIBPATHFLAG : LIBPATHFLAG+RPATHFLAG) % x - }.join + }.quote.join end def try_link0(src, opt="", &b) @@ -541,10 +541,9 @@ def find_header(header, *paths) else found = false paths.each do |dir| - opt = "-I#{dir}" + opt = "-I#{dir}".quote if try_cpp(cpp_include(header), opt) - $INCFLAGS += " " - $INCFLAGS += opt + $INCFLAGS << " " << opt found = true break end @@ -682,7 +681,7 @@ def dir_config(target, idefault=nil, ldefault=nil) idirs.collect! {|dir| "-I" + dir} idirs -= Shellwords.shellwords($CPPFLAGS) unless idirs.empty? - $CPPFLAGS = (idirs << $CPPFLAGS).join(" ") + $CPPFLAGS = (idirs.quote << $CPPFLAGS).join(" ") end end |