This is my Makefile
:
.SHELLFLAGS: -e -o pipefail -c
.ONESHELL:
all:
echo 1
echo--- 2
echo 3
I run make
and I see this:
$ make
echo 1
echo--- 2
echo 3
1
/bin/sh: line 1: echo---: command not found
3
I don’t want to see echo 3
executed, since the line before it failed. This is how I can fix this (notice the set -e
added), but I want a better solution (maybe Make provides one):
.SHELLFLAGS: -e -o pipefail -c
.ONESHELL:
all:
set -e
echo 1
echo--- 2
echo 3