diff mbox

[1/1] Makefile: fix distclean removal of $(O)

Message ID 1479867782-2666-1-git-send-email-danomimanchego123@gmail.com
State Accepted
Headers show

Commit Message

Danomi Manchego Nov. 23, 2016, 2:23 a.m. UTC
The distclean target no longer removes the "output" directory for
in-tree builds, because $(O) is no longer just "output" in that
case. Change the test to be against "$(CURDIR)/output", to match
the O setting, and a similar test elsewhere in the same Makefile.

Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Thomas Petazzoni Nov. 23, 2016, 10:30 p.m. UTC | #1
Hello,

On Tue, 22 Nov 2016 21:23:02 -0500, Danomi Manchego wrote:
> The distclean target no longer removes the "output" directory for
> in-tree builds, because $(O) is no longer just "output" in that
> case. Change the test to be against "$(CURDIR)/output", to match
> the O setting, and a similar test elsewhere in the same Makefile.
> 
> Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com>
> ---
>  Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to master, thanks.

Thomas
diff mbox

Patch

diff --git a/Makefile b/Makefile
index 37e4bd4..1323961 100644
--- a/Makefile
+++ b/Makefile
@@ -928,7 +928,7 @@  clean:
 		$(LEGAL_INFO_DIR) $(GRAPHS_DIR)
 
 distclean: clean
-ifeq ($(O),output)
+ifeq ($(O),$(CURDIR)/output)
 	rm -rf $(O)
 endif
 	rm -rf $(TOPDIR)/dl $(BR2_CONFIG) $(CONFIG_DIR)/.config.old $(CONFIG_DIR)/..config.tmp \