-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
31 lines (26 loc) · 715 Bytes
/
Makefile
File metadata and controls
31 lines (26 loc) · 715 Bytes
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
# Require variable helper
require-%:
@if [ -z "$(${*})" ]; then \
echo "Error: missing required argument '$*'"; \
echo "Usage: make $*=<value> <target>"; \
exit 1; \
fi
# Include all sub-makefiles FIRST
include make/*.mk
# Default goal
.DEFAULT_GOAL := help
help: ## Show help
@echo "Available targets:"
@grep -E '^[a-zA-Z0-9_-]+:.*?##' $(MAKEFILE_LIST) | \
awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-20s\033[0m %s\n", $$1, $$2}'
# Environment
## If direnv exists, allow it
ifneq ($(shell which direnv 2>/dev/null),)
DIR_ENV_ALLOWED := $(shell direnv allow .)
endif
## Choose shell
ifeq ($(shell test -x /bin/zsh && echo yes),yes)
SHELL := /bin/zsh
else
SHELL := /bin/bash
endif