clean up console output even more
[openwrt-10.03/.git] / Makefile
index 5c218f155f761ad163748febcd733d805af4fbc4..27526d09a85b140b65d35f411b1641783af26c89 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -41,16 +41,16 @@ ifneq ($(shell ./scripts/timestamp.pl -p .pkginfo package Makefile),.pkginfo)
 endif
 
 .config.in: .pkginfo
 endif
 
 .config.in: .pkginfo
-       ./scripts/gen_menuconfig.pl < $< > $@ || rm -f $@
+       @./scripts/gen_menuconfig.pl < $< > $@ || rm -f $@
 
 pkginfo-clean: FORCE
        -rm -f .pkginfo .config.in
 
 ./scripts/config/mconf: .config.in
 
 pkginfo-clean: FORCE
        -rm -f .pkginfo .config.in
 
 ./scripts/config/mconf: .config.in
-       $(MAKE) -C scripts/config all
+       @$(MAKE) -C scripts/config all
 
 ./scripts/config/conf: .config.in
 
 ./scripts/config/conf: .config.in
-       $(MAKE) -C scripts/config conf
+       @$(MAKE) -C scripts/config conf
 
 config: ./scripts/config/conf FORCE
        $< Config.in
 
 config: ./scripts/config/conf FORCE
        $< Config.in
@@ -79,13 +79,26 @@ toolchain/%: FORCE
 
 .config: ./scripts/config/conf FORCE
        @[ -f .config ] || $(NO_TRACE_MAKE) menuconfig
 
 .config: ./scripts/config/conf FORCE
        @[ -f .config ] || $(NO_TRACE_MAKE) menuconfig
-       $< -D .config Config.in >/dev/null 2>/dev/null
+       @$< -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
 
 
 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
 world: .config FORCE
        $(MAKE) toolchain/install
        $(MAKE) target/compile
@@ -100,7 +113,9 @@ dirclean: clean
        rm -rf staging_dir_* toolchain_build_*
 
 distclean: dirclean config-clean
        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:
 .PHONY: FORCE
 FORCE: