Skip to content

Commit

Permalink
support different shells in makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Hoß authored and sebhoss committed Aug 20, 2022
1 parent c46b3b6 commit 356fa53
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 #
Expand Down

0 comments on commit 356fa53

Please sign in to comment.