This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: GCC / make escaping differences


Achim Gratz writes:
> Denis Washington <denis <at> denisw.de> writes:
> > I suspected that this had something to do with the gcc command defined in
> the Makefile, which includes
> > backslashes to escape quotes in -D values like this:
> >
> >     -DNOKOGIRI_LIBXML2_PATH\=\"/home/.../2.9.2\"
> -----------------------------^
> 
> I'd rather suspect the problem here.

Maybe, but in my eyes that wouldn't explain why this is a GCC compilation error at the line where NOKOGIRI_LIBXML2_PATH is expanded, rather than an shell syntax error. Also, \= seems to cause no problem when passed to bash, as explained.

FYI, my understanding from looking at Nokogiri's extconf.rb (which generates the Makefile) is that the escaping is the result of calling Ruby's Shellwords#shellescape method [1] on the string '-DNOKOGIRI="/home/.../2.9.2"', so I guess one can assume that the result is valid bourne shell syntax.

Regards,
Denis

[1] http://ruby-doc.org/stdlib-1.9.3/libdoc/shellwords/rdoc/Shellwords.html#method-c-shellescape


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]