From 87e0a3cf0f45f9b2029654b8d2ff154137ca78b2 Mon Sep 17 00:00:00 2001
From: Felix Fietkau <nbd@openwrt.org>
Date: Sat, 18 Oct 2008 19:37:34 +0000
Subject: [PATCH] don't overwrite .config if it's a symlink (fixes scripts/env
 problems)

SVN-Revision: 13005
---
 include/toplevel.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/toplevel.mk b/include/toplevel.mk
index 9d0eb25933..ab4448ae10 100644
--- a/include/toplevel.mk
+++ b/include/toplevel.mk
@@ -48,7 +48,7 @@ prepare-tmpinfo: FORCE
 	touch $(TOPDIR)/tmp/.build
 
 .config: ./scripts/config/conf prepare-tmpinfo $(if $(CONFIG_HAVE_DOT_CONFIG),,FORCE)
-	@+if [ \! -f .config ] || ! grep CONFIG_HAVE_DOT_CONFIG .config >/dev/null; then \
+	@+if [ \! -e .config ] || ! grep CONFIG_HAVE_DOT_CONFIG .config >/dev/null; then \
 		[ -e $(HOME)/.openwrt/defconfig ] && cp $(HOME)/.openwrt/defconfig .config; \
 		$(_SINGLE)$(NO_TRACE_MAKE) menuconfig $(PREP_MK); \
 	fi
-- 
2.30.2