pkgsrc-Users archive

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

Re: != vs :sh (was: py-Scientific fix)



* 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.

-- 
Jonathan Perkin  -  Joyent, Inc.  -  www.joyent.com


Home | Main Index | Thread Index | Old Index