fix make clean for unconfigured build trees
[openwrt-10.03/.git] / include / toplevel.mk
index ba5cb33759b828f361266449832631aa4de6f738..040ff51249d5e057de22ece99ebc7380b906615e 100644 (file)
@@ -22,6 +22,7 @@ else
   endif
 endif
 export OPENWRTVERSION
+export IS_TTY=$(shell tty -s && echo 1 || echo 0)
 
 ifeq ($(FORCE),)
   .config scripts/config/conf scripts/config/mconf: tmp/.prereq-build
@@ -97,7 +98,7 @@ download: .config FORCE
        $(MAKE) -j1 package/download
        $(MAKE) -j1 target/download
 
-clean dirclean:
+clean dirclean: .config
        @$(MAKE) $@ 
 
 prereq:: .config