Skip to contentSkip to conversation

tools/build: fix distclean

PATCH New Roger Pau Monne 1 participant 1 message Apr 13, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools/build: fix distclean

distclean removed config/Tools.mk which was needed by tools/Rules.mk, thus preventing distclean from running properly in the tools directory. This patch only enforces config/Tools.mk presence when not performing a clean/distclean target

---
 tools/Rules.mk |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
tools/Rules.mk +4 -3
index 202c0dd..a2a1a58 100644
@@ -4,7 +4,7 @@
 all:
 
 include $(XEN_ROOT)/Config.mk
-include $(XEN_ROOT)/config/Tools.mk
+-include $(XEN_ROOT)/config/Tools.mk
 
 export _INSTALL := $(INSTALL)
 INSTALL = $(XEN_ROOT)/tools/cross-install
@@ -109,6 +109,7 @@ subdir-all-% subdir-clean-% subdir-install-%: .phony
 subdir-distclean-%: .phony
 	$(MAKE) -C $* clean
 
+ifeq (,$(findstring clean,$(MAKECMDGOALS)))
 $(XEN_ROOT)/config/Tools.mk:
-	@echo "You have to run ./configure before building or installing the tools"
-	@exit 1
+	$(error You have to run ./configure before building or installing the tools)
+endif
Signature · 1 line
1.7.2.5