From c43037d2ecd33fdd09852d563829f8dfd18dc3af Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Mon, 1 Nov 2021 12:35:43 +0100 Subject: Makefile: Declare accepted targets as PHONY Without this, a call to 'make package=foo package' won't have the desired effect since the directory named 'package' fulfills the requirement. Signed-off-by: Phil Sutter --- Makefile | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index c7954e646..04d2c8b88 100644 --- a/Makefile +++ b/Makefile @@ -4,5 +4,21 @@ # GNU make and BSD make compatible make file wrapper MAKECMDGOALS+= ${.TARGETS} -all v allmodconfig allnoconfig allyesconfig help pkg-help dev-help targethelp kernelconfig savekconfig image menuconfig defconfig oldconfig download clean cleankernel cleansystem cleandir distclean hostclean hostpackage fetch package extract patch dep menu newpackage host-update-patches update-patches info: +PHONY_TARGETS= all v \ + allmodconfig allnoconfig allyesconfig \ + help pkg-help dev-help targethelp \ + kernelconfig savekconfig \ + image \ + menuconfig defconfig oldconfig \ + download \ + clean cleankernel cleansystem cleandir distclean hostclean \ + hostpackage fetch package extract patch \ + dep menu \ + newpackage \ + host-update-patches update-patches \ + info + +${PHONY_TARGETS}: @./scripts/prereq.sh ${MAKECMDGOALS} + +.PHONY: ${PHONY_TARGETS} -- cgit v1.2.3