build(make): Defensive make settings

https://tech.davis-hansson.com/p/make/

Prevents things like silent shell pipeline errors in recipes, unexpected behavior from
undefined variables, etc.
This commit is contained in:
Ross Patterson 2020-09-17 11:54:49 -07:00
parent 4bf79f777e
commit 7a3320f4bb

View File

@ -1,6 +1,16 @@
# NOTE: this Makefile requires GNU make
### Defensive settings for make:
# https://tech.davis-hansson.com/p/make/
SHELL := bash
.ONESHELL:
.SHELLFLAGS := -xeu -o pipefail -c
.SILENT:
.DELETE_ON_ERROR:
MAKEFLAGS += --warn-undefined-variables
MAKEFLAGS += --no-builtin-rules
default:
@echo "no default target"