tech-toolchain archive

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

Re: bmake: :sh vs :!cmd!



On Sun, Mar 31, 2019 at 07:46:08PM +0200, Edgar Fu? wrote:
 > On the occasion of a discussion of != vs. :sh on tech-pkg/pkgsrc-users, 
 > I remembered I long wanted to ask why bmake has both :sh and :!cmd!, 
 > i.e., what the difference or intended usage is.

:sh works as follows:

   CMD=ls *.c
   build:
           $(CC) -c $(CMD:sh)

and :! like this:

   build:
           $(CC) -c $(WHATEVER:!ls *.c!)

Since the latter ignores the value of $(WHATEVER) it's kinda gross (it
is not the only such "modifier" though) but it avoids needing a
different syntax for command substitutions.

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index