use ~/.openwrt/defconfig as default config if it exists
authorFelix Fietkau <nbd@openwrt.org>
Fri, 6 Apr 2007 23:09:06 +0000 (23:09 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Fri, 6 Apr 2007 23:09:06 +0000 (23:09 +0000)
SVN-Revision: 6876

Makefile

index 414a1527896189201db87db8b5c0bcaa9e8b5663..43ed005b8ade32dafec91c54d1693c839a7fbfe3 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -62,7 +62,10 @@ tmp/.config-%.in: tmp/.%info
 
 
 .config: ./scripts/config/conf tmp/.config-target.in tmp/.config-package.in
-       @[ -f .config ] || $(NO_TRACE_MAKE) menuconfig
+       @[ -f .config ] || { \
+               [ -e $(HOME)/.openwrt/defconfig ] && cp $(HOME)/.openwrt/defconfig .config; \
+               $(NO_TRACE_MAKE) menuconfig; \
+       }
        @$< -D .config Config.in &> /dev/null
 
 scripts/config/mconf:
@@ -87,6 +90,8 @@ oldconfig: scripts/config/conf tmp/.config-target.in tmp/.config-package.in FORC
        $< -o Config.in
 
 menuconfig: scripts/config/mconf tmp/.config-target.in tmp/.config-package.in FORCE
+       @[ -f .config ] || \
+               [ -e $(HOME)/.openwrt/defconfig ] && cp $(HOME)/.openwrt/defconfig .config
        $< Config.in
 
 kernel_menuconfig: .config FORCE