From: Yann E. MORIN Date: Tue, 5 Nov 2013 23:28:20 +0000 (+0100) Subject: Makefile: fix out-of-tree builds with multiple targets with 'all' X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=971faf828d8d243141b7a689a787f335864e37c0;p=buildroot.git Makefile: fix out-of-tree builds with multiple targets with 'all' For out-of-tree builds, this use-case fails to build: $ make clean all This is because 'all' is filtered-out in the Makefile wrapper, since the wrapper itself has a 'all' target. The 'all' target is just the usual naming for the default target in a Makefile. In fact, the first target is the default one, so we can name it whatever we want. Rename the Makefile wrapper 'all' target to avoid name-clashing. Fixes #6644. Reported-by: Ryan Barnett Signed-off-by: "Yann E. MORIN" Cc: Ryan Barnett Cc: Thomas Petazzoni Tested-by: Ryan Barnett Signed-off-by: Peter Korsgaard --- diff --git a/support/scripts/mkmakefile b/support/scripts/mkmakefile index cef2ec7070..27b15073f3 100755 --- a/support/scripts/mkmakefile +++ b/support/scripts/mkmakefile @@ -32,16 +32,16 @@ MAKEFLAGS += --no-print-directory .PHONY: all \$(MAKECMDGOALS) -all := \$(filter-out all Makefile,\$(MAKECMDGOALS)) +all := \$(filter-out Makefile,\$(MAKECMDGOALS)) -all: +_all: \$(MAKE) \$(MAKEARGS) \$(all) Makefile:; -\$(all): all +\$(all): _all @: -%/: all +%/: _all @: EOF