[OpenWrt-Devel] [PATCH] include/toplevel.mk: fix defconfig when ~/.openwrt/defconfig exists

John Crispin john at phrozen.org
Mon Jul 4 05:27:38 EDT 2016


./scripts/feeds update will reset the .config file if ~/.openwrt/defconfig
exists, thus resetting the target to ar71xx.

Signed-off-by: John Crispin <john at phrozen.org>
---

i am not sure if this is correct or if refresh_config() inside scripts
feeds should be called with a paramter to not run defconfig
---
 include/toplevel.mk |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/toplevel.mk b/include/toplevel.mk
index 581083d..398fba7 100644
--- a/include/toplevel.mk
+++ b/include/toplevel.mk
@@ -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 [  \! -e .config -a -e $(HOME)/.openwrt/defconfig ]; then cp $(HOME)/.openwrt/defconfig .config; fi
 	$< --defconfig=.config Config.in
 
 confdefault-y=allyes
-- 
1.7.10.4
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list