Linus Torvalds writes: (Summary)
The rule would be very simple:
- if the result of the shell command is a failure, the result is 'n'
- otherwise, the result is the first line of stdout
- if the result is empty, we replace it with 'y'.
So doing $(shell true) would be 100% equivalent to $(shell echo y),
and you could still do that
default $(shell $CC --version | /dev/null)
So it seems to me that there is never any fundamental reason why we'd
want both "shell" and "shell-stdout", since "shell-stdout" is
fundamentally more powerful than "shell", and can always be used as
such (and just renamed to "shell").
↧