From 8fcae4dcd1087dc9d07b04e7e8a6369a3efaa5f8 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 21 Oct 2024 00:38:24 +0200 Subject: [PATCH] build(Makefile): introduce custom errors for deprecated targets and common mistakes --- .gnumake/Error.Mak | 28 ++++++++++++++++++++++++++++ Makefile | 3 +++ 2 files changed, 31 insertions(+) create mode 100644 .gnumake/Error.Mak diff --git a/.gnumake/Error.Mak b/.gnumake/Error.Mak new file mode 100644 index 000000000..8cd7bbb0e --- /dev/null +++ b/.gnumake/Error.Mak @@ -0,0 +1,28 @@ +# This Makefile contains targets that are deprecated, commonly mispelled or otherwise "faulty". + +################################ +##### DEPRECATED TARGETS ##### + +# Deprecated since: 2024-10-18 +.PHONY: serve +.PHONY: serve-% +serve-%: serve; +serve: + @echo "The serve targets have been deprecated. Please use the new start (and stop) targets instead." + @exit 1 + +##### DEPRECATED TARGETS ##### +################################ + +############################# +##### COMMON MISTAKES ##### + +.PHONY: build +.PHONY: build-% +build-%: build; +build: + @echo "No recipe for build. Did you mean compile?" + @exit 1 + +##### COMMON MISTAKES ##### +############################# \ No newline at end of file diff --git a/Makefile b/Makefile index 96baa4582..7eef0dcaa 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,5 @@ +include .gnumake/*.Mak + SHELL=bash # MAKE=make -d @@ -408,3 +410,4 @@ i18n-check: --image-run---i18n-check flock -en $@ true .PHONY: --% +.SUFFIXES: # Delete all default suffixes \ No newline at end of file