make package prereq checks behave more like build prereq checks (first check all...
authorFelix Fietkau <nbd@openwrt.org>
Mon, 4 Aug 2008 23:15:17 +0000 (23:15 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Mon, 4 Aug 2008 23:15:17 +0000 (23:15 +0000)
SVN-Revision: 12106

Makefile

index 72b24d14e7c71a952fd57360015e3f2ab2b44e0a..7e43b443219fda97ed5f4363e04d680cea337599 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -56,8 +56,19 @@ dirclean: clean
        rm -rf $(STAGING_DIR) $(STAGING_DIR_HOST) $(STAGING_DIR_TOOLCHAIN) $(TOOLCHAIN_DIR) $(BUILD_DIR_HOST)
        rm -rf $(TMP_DIR)
 
+tmp/.prereq_packages: .config
+       unset ERROR; \
+       for package in $(sort $(prereq-y) $(prereq-m)); do \
+               $(NO_TRACE_MAKE) -s -r -C package/$$package prereq || ERROR=1; \
+       done; \
+       if [ -n "$$ERROR" ]; then \
+               echo "Package prerequisite check failed."; \
+               false; \
+       fi
+       touch $@
+
 # check prerequisites before starting to build
-prereq: $(package/stamp-prereq) $(target/stamp-prereq) ;
+prereq: $(target/stamp-prereq) tmp/.prereq_packages
 
 prepare: .config $(tools/stamp-install) $(toolchain/stamp-install)
 world: prepare $(target/stamp-compile) $(package/stamp-cleanup) $(package/stamp-compile) $(package/stamp-install) $(package/stamp-rootfs-prepare) $(target/stamp-install) FORCE