Skip to contentSkip to conversation

Makefile: fix distclean removal of $(O)

PATCH New Danomi Manchego 2 participants 2 messages Nov 23, 2016 Kbuild

lore
Share & tools
lore
#0 lore raw

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

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.

---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +1 -1
index 37e4bd4..1323961 100644
@@ -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 \
Signature · 1 line
1.9.1
#1 lore raw

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

Hello,

Quoted 9 lines · Danomi Manchego

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.

---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com