kernel: make the kernel build auto-clean the build dir like package builds
[openwrt/openwrt.git] / include / toplevel.mk
index 581083d912dee3a9acdb9c159bd0613bada91f11..e13acafe9c7463a82006a165dc3212eedf9d8eb9 100644 (file)
@@ -110,7 +110,7 @@ config-clean: FORCE
 
 defconfig: scripts/config/conf prepare-tmpinfo FORCE
        touch .config
-       @if [ -e $(HOME)/.openwrt/defconfig ]; then cp $(HOME)/.openwrt/defconfig .config; fi
+       @if [ ! -s .config -a -e $(HOME)/.openwrt/defconfig ]; then cp $(HOME)/.openwrt/defconfig .config; fi
        $< --defconfig=.config Config.in
 
 confdefault-y=allyes