@[ -f .config ] || $(NO_TRACE_MAKE) menuconfig
@$< -D .config Config.in &> /dev/null
+.prereq: $(TOPDIR)/include/prereq.mk .pkginfo
+ @$(NO_TRACE_MAKE) -s -f $(TOPDIR)/include/prereq.mk prereq 2>/dev/null || { \
+ echo "Prerequisite check failed. Use FORCE=1 to override."; \
+ false; \
+ }
+ @touch $@
+
+prereq: .prereq FORCE
+
download: .config FORCE
$(MAKE) toolchain/download
$(MAKE) package/download
$(MAKE) target/download
+ifeq ($(FORCE),)
+world: .prereq
+endif
+
world: .config FORCE
$(MAKE) toolchain/install
$(MAKE) target/compile
rm -rf staging_dir_* toolchain_build_*
distclean: dirclean config-clean
- rm -rf dl .*config* .pkg*
+ rm -rf dl .*config* .pkg* .prereq
+
+.SILENT: clean dirclean distclean config-clean download world
.PHONY: FORCE
FORCE: