tools: ensure that BIN_DIR is created early
[openwrt/staging/chunkeey.git] / tools / Makefile
index ad8eeb31a4f5d77c63e703b3d65100585855c2a5..686d5294d3e7fbad517a99ce6a3b120456003737 100644 (file)
@@ -125,6 +125,9 @@ define PrepareStaging
        ); done
 endef
 
+$(BIN_DIR):
+       mkdir -p $@
+
 # preparatory work
 $(STAGING_DIR)/.prepared: $(TMP_DIR)/.build
        $(call PrepareStaging,$(STAGING_DIR))
@@ -145,8 +148,8 @@ endif
 
 endif
 
-$(curdir)//prepare = $(STAGING_DIR)/.prepared $(STAGING_DIR_HOST)/.prepared
-$(curdir)//compile = $(STAGING_DIR)/.prepared $(STAGING_DIR_HOST)/.prepared
+$(curdir)//prepare = $(STAGING_DIR)/.prepared $(STAGING_DIR_HOST)/.prepared $(BIN_DIR)
+$(curdir)//compile = $(STAGING_DIR)/.prepared $(STAGING_DIR_HOST)/.prepared $(BIN_DIR)
 
 # prerequisites for the individual targets
 $(curdir)/ := .config prereq