+# builddir dependencies
+$(curdir)/pkg-config/compile := $(curdir)/sed/install
+$(curdir)/squashfs/compile := $(curdir)/lzma-old/install
+$(curdir)/squashfs4/compile := $(curdir)/lzma/install
+$(curdir)/quilt/compile := $(curdir)/sed/install $(curdir)/autoconf/install
+$(curdir)/dtc/compile := $(curdir)/bison/install
+$(curdir)/autoconf/compile := $(curdir)/m4/install
+$(curdir)/automake/compile := $(curdir)/m4/install $(curdir)/autoconf/install
+$(curdir)/mpc/compile := $(curdir)/gmp/install
+$(curdir)/mpfr/compile := $(curdir)/gmp/install
+$(curdir)/mtd-utils/compile := $(curdir)/e2fsprogs/install
+$(curdir)/mkimage/compile := $(curdir)/sed/install
+$(curdir)/qemu/compile := $(curdir)/e2fsprogs/install
+$(curdir)/upslug2/compile := $(curdir)/automake/install
+
+$(curdir)/builddirs := $(tools-y) $(tools-dep) $(tools-)
+$(curdir)/builddirs-default := $(tools-y)
+
+ifndef DUMP_TARGET_DB
+define PrepareStaging
+ @for dir in $(1); do ( \
+ set -x; \
+ mkdir -p "$$dir"; \
+ cd "$$dir"; \
+ mkdir -p bin lib include stamp; \
+ ); done
+endef
+
+# preparatory work
+$(STAGING_DIR)/.prepared: $(TMP_DIR)/.build
+ $(call PrepareStaging,$(STAGING_DIR))
+ mkdir -p $(BUILD_DIR)/stamp