-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmake_config.mak
More file actions
37 lines (27 loc) · 1.21 KB
/
make_config.mak
File metadata and controls
37 lines (27 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Configure make + bash to be faster, more powerful, and more reliable.
# Disable built-in implicit rules for speed and the clarity of explicit rules
MAKEFLAGS += --no-builtin-rules
SUFFIXES :=
.SUFFIXES:
.DELETE_ON_ERROR: # Delete targets that have changed if a recipe fails
.ONESHELL: # Launch one shell per recipe for speed and multiline shell contructs
SHELL=bash
.SHELLFLAGS := $(.SHELLFLAGS) -o errexit -o errtrace -o nounset -o pipefail # nounset: unset variables cause errors; errexit: exit on first errored command; errtrace: ERR trap inherited by functions; pipefail: exit on non-last cmd in a pipeline fails
# Variables to work around make variable definition parsing issues
EMPTY_STRING :=#
SPACE :=$(EMPTY_STRING) # A single space
VERBOSE :=
ifneq ($(VERBOSE),)
.SHELLFLAGS := -x $(.SHELLFLAGS) # -x: trace shell cmds
endif
QUIET := @
TRACE :=
ifeq ($(TRACE),disable)
override TRACE =
else ifeq ($(TRACE),enable)
override TRACE = $(QUIET)echo $(subst .tmp,,$(@F)) # Recursive variable so $(@F) happens when recipe runs
endif
ifneq ($(QUIET),)
# Suppress recipe printing, which include the "rm ..." command output from .INTERMEDATE file cleanup
MAKEFLAGS += --silent --warn-undefined-variables
endif