Browse Source

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 <phil@nwl.cc>
Phil Sutter 2 years ago
parent
commit
c43037d2ec
1 changed files with 17 additions and 1 deletions
  1. 17 1
      Makefile

+ 17 - 1
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}