This is the mail archive of the
cygwin
mailing list for the Cygwin project.
RE: GCC / make escaping differences
- From: Denis Washington <denis at denisw dot de>
- To: Achim Gratz <Stromeko at NexGo dot DE>, "cygwin at cygwin dot com" <cygwin at cygwin dot com>
- Date: Fri, 13 Mar 2015 11:20:08 +0000
- Subject: RE: GCC / make escaping differences
- Authentication-results: sourceware.org; auth=none
- Authentication-results: NexGo.DE; dkim=none (message not signed) header.d=none;
- References: <DB3PR05MB0763302D3CA95D5946191175A2070 at DB3PR05MB0763 dot eurprd05 dot prod dot outlook dot com> <loom dot 20150313T105904-476 at post dot gmane dot org>
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