Re: Makefile: Use standard variables and locations

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

 



* 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

- Specify SHELL = /bin/sh

This is the default on Unix-like systems.

--
Jakub Wilk



[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