gluon/patches/openwrt/0001-tools-Makefile-fix-host-tools-build-dependencies.patch
2015-05-22 01:09:19 +02:00

37 lines
1.1 KiB
Diff

From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Sat, 26 Jul 2014 06:10:23 +0200
Subject: tools/Makefile: fix host tools build dependencies
diff --git a/tools/Makefile b/tools/Makefile
index 2f516d2..9416069 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -95,10 +95,16 @@ define PrepareStaging
endef
# preparatory work
+ifneq ($(ARCH),)
+staging_prepared = $(STAGING_DIR)/.prepared
+
$(STAGING_DIR)/.prepared: $(TMP_DIR)/.build
$(call PrepareStaging,$(STAGING_DIR))
mkdir -p $(BUILD_DIR)/stamp
touch $@
+else
+staging_prepared :=
+endif
$(STAGING_DIR_HOST)/.prepared: $(TMP_DIR)/.build
$(call PrepareStaging,$(STAGING_DIR_HOST))
@@ -110,8 +116,8 @@ $(STAGING_DIR_HOST)/.prepared: $(TMP_DIR)/.build
endif
-$(curdir)//prepare = $(STAGING_DIR)/.prepared $(STAGING_DIR_HOST)/.prepared
-$(curdir)//compile = $(STAGING_DIR)/.prepared $(STAGING_DIR_HOST)/.prepared
+$(curdir)//prepare = $(staging_prepared) $(STAGING_DIR_HOST)/.prepared
+$(curdir)//compile = $(staging_prepared) $(STAGING_DIR_HOST)/.prepared
# prerequisites for the individual targets
$(curdir)/ := .config prereq