pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: != vs :sh (was: py-Scientific fix)
Am 28.03.2019 um 10:33 schrieb Jonathan Perkin:
> * On 2019-03-28 at 09:22 GMT, Edgar Fuß wrote:
>
>>> Yes, joerg's right, :sh is preferable.
>> Could someone please elaborate why it is?
>
> It defers evaluation of the command until it is used. So with a
> Makefile like the following:
>
> UNAME_EXCLAM!= uname
> UNAME_CMD= uname
>
> exclam:
> @echo ${UNAME_EXCLAM}
>
> cmd:
> @echo ${UNAME_CMD:sh}
>
> UNAME_EXCLAM will be executed for every invocation of the Makefile,
> whereas UNAME_CMD will only be executed when the "cmd" target is
> called.
Thank you for this explanation. After the 2019Q1 branch, pkglint will
warn about cases like this and provide an even more detailed explanation.
Roland
Home |
Main Index |
Thread Index |
Old Index