From 356fa53c22a5a2602a8989e27a428cc891bc2adb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Ho=C3=9F?= Date: Sat, 20 Aug 2022 11:45:19 +0200 Subject: [PATCH] support different shells in makefile --- Makefile | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index f84d9dc..bbc7e8e 100644 --- a/Makefile +++ b/Makefile @@ -9,10 +9,15 @@ MAKEFLAGS += --no-builtin-rules .ONESHELL: .DELETE_ON_ERROR: .DEFAULT_GOAL := help -SHELL := zsh -.SHELLFLAGS += -e -.SHELLFLAGS += -u -.SHELLFLAGS += -o pipefail +ifneq ($(strip $(shell which zsh)),) + SHELL := zsh + .SHELLFLAGS += -o pipefail +else ifneq ($(strip $(shell which bash)),) + SHELL := bash + .SHELLFLAGS += -o pipefail +else + SHELL := sh +endif ############################################################################### # COMMON RULES #