aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2015-09-10 11:06:42 +0000
committerFelix Fietkau <nbd@openwrt.org>2015-09-10 11:06:42 +0000
commitbf4abb45301b5f6b362cf3c298a58661a3269863 (patch)
treec7907e8c2c7da2bdb376ff7f1f39338193b302fe
parent185b399e751025259c671c9a6b4cc41ea6069d79 (diff)
downloadmaster-187ad058-bf4abb45301b5f6b362cf3c298a58661a3269863.tar.gz
master-187ad058-bf4abb45301b5f6b362cf3c298a58661a3269863.tar.bz2
master-187ad058-bf4abb45301b5f6b362cf3c298a58661a3269863.zip
imagebuilder: run build prereq checks before building image to set up host commands properly
Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46840 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--target/imagebuilder/files/Makefile17
1 files changed, 16 insertions, 1 deletions
diff --git a/target/imagebuilder/files/Makefile b/target/imagebuilder/files/Makefile
index 8f25c4a12f..479fa0e850 100644
--- a/target/imagebuilder/files/Makefile
+++ b/target/imagebuilder/files/Makefile
@@ -85,6 +85,21 @@ endef
include $(INCLUDE_DIR)/target.mk
+staging_dir/host/.prereq-build: include/prereq-build.mk
+ mkdir -p tmp
+ rm -f tmp/.host.mk
+ @$(_SINGLE)$(NO_TRACE_MAKE) -j1 -r -s -f $(TOPDIR)/include/prereq-build.mk prereq 2>/dev/null || { \
+ echo "Prerequisite check failed. Use FORCE=1 to override."; \
+ false; \
+ }
+ ifneq ($(realpath $(TOPDIR)/include/prepare.mk),)
+ @$(_SINGLE)$(NO_TRACE_MAKE) -j1 -r -s -f $(TOPDIR)/include/prepare.mk prepare 2>/dev/null || { \
+ echo "Preparation failed."; \
+ false; \
+ }
+ endif
+ touch $@
+
_call_info: FORCE
echo 'Current Target: "$(BOARD)$(if $(SUBTARGET), ($(BOARDNAME)))"'
echo 'Default Packages: $(DEFAULT_PACKAGES)'
@@ -96,7 +111,7 @@ BUILD_PACKAGES:=$(sort $(DEFAULT_PACKAGES) $(USER_PACKAGES) $($(USER_PROFILE)_PA
BUILD_PACKAGES:=$(filter-out $(filter -%,$(BUILD_PACKAGES)) $(patsubst -%,%,$(filter -%,$(BUILD_PACKAGES))),$(BUILD_PACKAGES))
PACKAGES:=
-_call_image:
+_call_image: staging_dir/host/.prereq-build
echo 'Building images for $(BOARD)$(if $($(USER_PROFILE)_NAME), - $($(USER_PROFILE)_NAME))'
echo 'Packages: $(BUILD_PACKAGES)'
echo