summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/Makefile b/tools/Makefile
index 6b846f8..b167a60 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -74,6 +74,10 @@ $(foreach tool, $(tools-y), $(eval $(curdir)/$(tool)/compile += $(curdir)/ccache
tools-y += ccache
endif
+# in case there is no patch tool on the host we need to make patch tool a
+# dependency for tools which have patches directory
+$(foreach tool, $(tools-y), $(if $(wildcard $(curdir)/$(tool)/patches),$(eval $(curdir)/$(tool)/compile += $(curdir)/patch/install)))
+
$(curdir)/builddirs := $(tools-y) $(tools-dep) $(tools-)
$(curdir)/builddirs-default := $(tools-y)