diff options
author | Julien Dessaux | 2023-02-03 18:18:57 +0100 |
---|---|---|
committer | Julien Dessaux | 2023-02-03 18:18:57 +0100 |
commit | 977722ed4f135640b785bc9a4f97a2586712a3bd (patch) | |
tree | 753925774f6825d2325d5ede7880d20f0d1c9c64 /GNUmakefile | |
parent | Fixed makefile (diff) | |
download | jeux-de-mots-977722ed4f135640b785bc9a4f97a2586712a3bd.tar.gz jeux-de-mots-977722ed4f135640b785bc9a4f97a2586712a3bd.tar.bz2 jeux-de-mots-977722ed4f135640b785bc9a4f97a2586712a3bd.zip |
Updated makefile best practices
Diffstat (limited to 'GNUmakefile')
-rw-r--r-- | GNUmakefile | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/GNUmakefile b/GNUmakefile index 069ba64..315e899 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -1,11 +1,21 @@ PATH:=$(PATH):$(PWD)/node_modules/.bin + SHELL:=bash +.SHELLFLAGS := -eu -o pipefail -c +.ONESHELL: +.DELETE_ON_ERROR: +MAKEFLAGS += --warn-undefined-variables +MAKEFLAGS += --no-builtin-rules .PHONY: check check: ## make check # Check syntax of entry points eslint main.js fixtures.js tests/ (cd static; eslint index.js) +.PHONY: help +help: + @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' + .PHONY: init init: ## make init # initialize project dependencies npm install @@ -27,8 +37,4 @@ test: check ## make test # run tests NODE_ENV=test vitest --config .vite.config.ts @rm -f testjdm.db testsessions.db -.PHONY: help -help: - @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' - .DEFAULT_GOAL := help |