gluon/patches/openwrt/0001-tools-Makefile-fix-host-tools-build-dependencies.patch
Matthias Schiffer 7dce74c0f9
Refresh patches
2016-12-20 01:09:53 +01:00

37 lines
1.2 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 d2fe2ffddf4b7207a937ca75efe1c2728e8067aa..c6cded8eccd81c422f99e7ee50754c4bc66decc7 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