aboutsummaryrefslogtreecommitdiffstats
path: root/tools/Makefile
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2007-08-07 00:04:25 +0000
committerFelix Fietkau <nbd@openwrt.org>2007-08-07 00:04:25 +0000
commitc6bc77ea365704f3f5c79d64aed069792a4e95b1 (patch)
tree28c9265495e6ad751fcae0d27a040b222ff2a215 /tools/Makefile
parent9882253827b16579bbd317f6e8c0deb75b0ca0f3 (diff)
downloadupstream-c6bc77ea365704f3f5c79d64aed069792a4e95b1.tar.gz
upstream-c6bc77ea365704f3f5c79d64aed069792a4e95b1.tar.bz2
upstream-c6bc77ea365704f3f5c79d64aed069792a4e95b1.zip
build system cleanup/restructuring as described in http://lists.openwrt.org/pipermail/openwrt-devel/2007-August/001159.html
SVN-Revision: 8362
Diffstat (limited to 'tools/Makefile')
-rw-r--r--tools/Makefile22
1 files changed, 13 insertions, 9 deletions
diff --git a/tools/Makefile b/tools/Makefile
index 492c027099..d1ca6508f0 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -15,15 +15,19 @@ $(curdir)/builddirs := sed sstrip ipkg-utils ext2fs squashfs mtd-utils lzma mkim
$(curdir)/squashfs/compile := $(curdir)/lzma/install
# preparatory work
-define copy_include
-$(STAGING_DIR)/include-host/.done:
- @mkdir -p $$$$(dirname $$@)
- @cp $(1)/include/*.h $$$$(dirname $$@)/
- @touch $$@
-$(curdir)//prepare = $(STAGING_DIR)/include-host/.done
-$(curdir)//compile = $(STAGING_DIR)/include-host/.done
-endef
-$(eval $(call copy_include,$(curdir)))
+$(STAGING_DIR)/.prepared: $(TMP_DIR)/.build
+ @for dir in $(STAGING_DIR) $(STAGING_DIR_HOST); do ( \
+ set -x; \
+ mkdir -p "$$dir"; \
+ cd "$$dir"; \
+ mkdir -p bin lib include stamp; \
+ ); done
+ mkdir -p $(BUILD_DIR_HOST)/stamp $(BUILD_DIR)/stamp
+ $(INSTALL_DATA) $(TOPDIR)/tools/include/*.h $(STAGING_DIR_HOST)/include/
+ touch $@
+
+$(curdir)//prepare = $(STAGING_DIR)/.prepared
+$(curdir)//compile = $(STAGING_DIR)/.prepared
# prerequisites for the individual targets
$(curdir)/ := .config prereq