From c6bc77ea365704f3f5c79d64aed069792a4e95b1 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Tue, 7 Aug 2007 00:04:25 +0000 Subject: build system cleanup/restructuring as described in http://lists.openwrt.org/pipermail/openwrt-devel/2007-August/001159.html SVN-Revision: 8362 --- tools/Makefile | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'tools/Makefile') 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 -- cgit v1.2.3