mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-10 08:14:09 -09:00
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 <rjbarnet@rockwellcollins.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Ryan Barnett <rjbarnet@rockwellcollins.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: Ryan Barnett <rjbarnet@rockwellcollins.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
committed by
Peter Korsgaard
parent
7f02c73f8d
commit
971faf828d
@@ -32,16 +32,16 @@ MAKEFLAGS += --no-print-directory
|
|||||||
|
|
||||||
.PHONY: all \$(MAKECMDGOALS)
|
.PHONY: all \$(MAKECMDGOALS)
|
||||||
|
|
||||||
all := \$(filter-out all Makefile,\$(MAKECMDGOALS))
|
all := \$(filter-out Makefile,\$(MAKECMDGOALS))
|
||||||
|
|
||||||
all:
|
_all:
|
||||||
\$(MAKE) \$(MAKEARGS) \$(all)
|
\$(MAKE) \$(MAKEARGS) \$(all)
|
||||||
|
|
||||||
Makefile:;
|
Makefile:;
|
||||||
|
|
||||||
\$(all): all
|
\$(all): _all
|
||||||
@:
|
@:
|
||||||
|
|
||||||
%/: all
|
%/: _all
|
||||||
@:
|
@:
|
||||||
EOF
|
EOF
|
||||||
|
|||||||
Reference in New Issue
Block a user