Forum: Ruby-core mkmf: Directory names with spaces cause invalid Makefiles to be generated

Posted by mame (Yusuke Endoh) (Guest)
on 2012-12-09 14:20
(Received via mailing list)
Issue #3024 has been updated by mame (Yusuke Endoh).

Priority changed from Normal to High
Target version changed from 1.9.3 to 2.0.0

Nobu, could you check this?

--
Yusuke Endoh <mame@tsg.ne.jp>
----------------------------------------
Bug #3024: mkmf: Directory names with spaces cause invalid Makefiles to 
be generated
https://bugs.ruby-lang.org/issues/3024#change-34561

Author: emerose (Sam Quigley)
Status: Assigned
Priority: High
Assignee: nobu (Nobuyoshi Nakada)
Category:
Target version: 2.0.0
ruby -v: ruby 1.9.1p378 (2010-01-10 revision 26273) [i386-darwin10.2.0]


=begin
 mkmf does not properly quote or escape directory names containing 
spaces, and thus creates invalid Makefiles.  For example, a recent run 
of mkmf created a Makefile containing:

 BINDIR        = $(bindir)
 RUBYCOMMONDIR = $(sitedir)$(target_prefix)
 RUBYLIBDIR = /Users/sq/Code/Third 
Party/flint/vendor/gems/bcrypt-ruby-2.1.2/lib$(target_prefix)
 RUBYARCHDIR = /Users/sq/Code/Third 
Party/flint/vendor/gems/bcrypt-ruby-2.1.2/lib$(target_prefix)

 When make is run, it fails with the following errors:

 [...]
 make
 Makefile:128: warning: overriding commands for target 
`/Users/sq/Code/Third'
 Makefile:122: warning: ignoring old commands for target 
`/Users/sq/Code/Third'
 [...]
 make install
 Makefile:128: warning: overriding commands for target 
`/Users/sq/Code/Third'
 Makefile:122: warning: ignoring old commands for target 
`/Users/sq/Code/Third'
 mkdir -p /Users/sq/Code/Third
 /opt/local/bin/ginstall -c -m 0755 bcrypt_ext.bundle 
/Users/sq/Code/Third Party/flint/vendor/gems/bcrypt-ruby-2.1.2/lib
 /opt/local/bin/ginstall: omitting directory `/Users/sq/Code/Third'
 make: *** 
[Party/flint/vendor/gems/bcrypt-ruby-2.1.2/lib/bcrypt_ext.bundle] Error 
1

 This issue (or something very similar) was reported as Ruby bug #2308 
on 2005-08-25 here: 
http://rubyforge.org/tracker/index.php?func=detail...
=end
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.