tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pkglint: support${CC} inside sed string
Am 21.10.2019 um 10:42 schrieb ng0:
> for wip/nsm I have a not so odd workaround until
> https://github.com/nifty-site-manager/nsm/pull/1/files
> is merged.
> The SUBST_SED does:
> ...
> SUBST_SED.cc+= -e 's,g++,${CXX:Q},g'
> ...
>
> pkglint -Wall . throws this warning:
>
> WARN: Makefile:23: Please move ${CXX:Q} outside of any quoting characters.
> 1 warning found.
> (Run "pkglint -e" to show explanations.)
Did you run pkglint -e, or better "pkglint -Wall -e", as pkglint itself
suggested? It's not that difficult to fix this warning properly.
> however it just works as it should. If it's not too difficult,
> can we add an exception for a situation like this to pkglint?
Yes, it works for you. But since CXX is a user-settable variable of type
ShellCommand, it is not a simple pathname but can also contain
arguments. Some packages really do this, and even the user might want to
set CXX like this:
CXX= /opt/gcc-9.1/bin/g++ -DPKGSRC_USER='"Roland Illig"'
Admitted, it's not very likely that someone does exactly this, but
that's the reason why pkglint is as strict as it is in this regard. I
also know that an additional escaping needs to be added for sed in such
a case, but at least the escaping for the shell is correct then.
Roland
Home |
Main Index |
Thread Index |
Old Index