tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Escaping quotes in CFLAGS



On Tue, Dec 14, 2010 at 01:05:17AM +0200, Aleksey Cheusov wrote:
> > Building print/luatex fails (at least with clang) because of the following 
> > definition in Makefile:
> > CFLAGS+=        -DLUA_ROOT=\"${PREFIX}/\"
> > changing that to
> > CFLAGS+=        -DLUA_ROOT='"${PREFIX}/"'
> > seems to work but I'm unsure whether this is the right fix.
> 
> As PREFIX doesn't contain spaces
> 
>   CFLAGS+=        -DLUA_ROOT=${PREFIX}/
> 
> whould be enough. For other variables consider using :Q variable modifier.

The assumption is incorrect. On a number of platforms, ${PREFIX}
could contain spaces. This is not to say that you wouldn't lose
elsewhere because of this, of course; however, as these lists
get indexed by the search engines, the less proliferation that
invalid assumptions get, the better.

As joerg notes as well, this isn't a valid C string.
 
Regards,
Alistair


Home | Main Index | Thread Index | Old Index