include/toplevel.mk: fix defconfig when ~/.openwrt/defconfig exists
authorJohn Crispin <john@phrozen.org>
Mon, 4 Jul 2016 09:08:58 +0000 (11:08 +0200)
committerJohn Crispin <john@phrozen.org>
Wed, 6 Jul 2016 07:07:25 +0000 (09:07 +0200)
./scripts/feeds update will reset the .config file if ~/.openwrt/defconfig
exists, thus resetting the target to ar71xx.

Signed-off-by: John Crispin <john@phrozen.org>
include/toplevel.mk

index 581083d912dee3a9acdb9c159bd0613bada91f11..3844f3cfc1414ebf7a1a33c8725e99071c3bcb5b 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