[source] Remove existing old link before creating a new one

LEDE Commits lede-commits at lists.infradead.org
Mon Jul 25 01:39:29 PDT 2016


nbd pushed a commit to source.git, branch master:
https://git.lede-project.org/?p=source.git;a=commitdiff;h=d0619fb02ce1464ccc0aa75ebf28c3b2e1c5e11e

commit d0619fb02ce1464ccc0aa75ebf28c3b2e1c5e11e
Author: Stefan Weil <sw at weilnetz.de>
AuthorDate: Mon Aug 3 10:54:04 2009 +0200

    Remove existing old link before creating a new one
    
    This is needed after a kernel update, otherwise the
    new link is written as linux/linux-$(LINUX_VERSION).
    
    Signed-off-by: Stefan Weil <sw at weilnetz.de>
---
 toolchain/kernel-headers/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/toolchain/kernel-headers/Makefile b/toolchain/kernel-headers/Makefile
index 68c83a0..fa7d349 100644
--- a/toolchain/kernel-headers/Makefile
+++ b/toolchain/kernel-headers/Makefile
@@ -72,7 +72,8 @@ endef
 
 define Host/Prepare
 	$(call Kernel/Prepare/Default)
-	ln -sf linux-$(LINUX_VERSION) $(BUILD_DIR_TOOLCHAIN)/linux
+	rm -f $(BUILD_DIR_TOOLCHAIN)/linux
+	ln -s linux-$(LINUX_VERSION) $(BUILD_DIR_TOOLCHAIN)/linux
 	$(SED) 's/@expr length/@-expr length/' $(HOST_BUILD_DIR)/Makefile
 endef
 



More information about the lede-commits mailing list