Re: Makefile: Use standard variables and locations

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

 



Hi Jakub,

On 3/25/21 11:06 PM, Jakub Wilk wrote:
> * Alejandro Colomar <alx.manpages@xxxxxxxxx>, 2021-03-20, 22:03:
>> - Is '|| exit $$?' really needed?  AFAIK, make exits on error.
> 
> Make catches errors, but shell doesn't by default. So if a recipe
> contains more than a simple command, you need to care of error handling
> yourself. For example:
> 
>   $ printf 'all:\n\tfalse; echo moo\n' > Makefile
> 
>   $ make
>   false; echo moo
>   moo
> 
>   $ echo $?
>   0

Ahh, I see.

> 
>> - Specify SHELL = /bin/sh
> 
> This is the default on Unix-like systems.

Humm, yes, it feels better to not specify it.  I was just following GNU
recommendations, but this one doesn't make much sense.  I'll remove it.

Thanks,

Alex

-- 
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux