Skip to content

Commit 4a1646b

Browse files
authored
RHOAIENG-16149: chore(Makefile): implement advice from https://tech.davis-hansson.com/p/make/ (opendatahub-io#778)
This way the Makefile will run even when /bin/sh is not Bash, and there are event more smaller benefits.
1 parent 56a49e2 commit 4a1646b

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Makefile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
# https://tech.davis-hansson.com/p/make/
2+
SHELL := bash
3+
# todo: do not set .ONESHELL: for now
4+
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
5+
#.SHELLFLAGS := -eu -o pipefail -c
6+
.DELETE_ON_ERROR:
7+
MAKEFLAGS += --warn-undefined-variables
8+
MAKEFLAGS += --no-builtin-rules
9+
10+
# todo: leave the default recipe prefix for now
11+
ifeq ($(origin .RECIPEPREFIX), undefined)
12+
$(error This Make does not support .RECIPEPREFIX. Please use GNU Make 4.0 or later)
13+
endif
14+
.RECIPEPREFIX =
15+
116
IMAGE_REGISTRY ?= quay.io/opendatahub/workbench-images
217
RELEASE ?= 2024b
318
# additional user-specified caching parameters for $(CONTAINER_ENGINE) build

0 commit comments

Comments
 (0)