build(Makefile): introduce custom errors for deprecated targets and common mistakes

This commit is contained in:
Sarah Vaupel 2024-10-21 00:38:24 +02:00
parent 599c35c042
commit 8fcae4dcd1
2 changed files with 31 additions and 0 deletions

28
.gnumake/Error.Mak Normal file
View File

@ -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 #####
#############################

View File

@ -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