sam-ba: specify ln -sf to remove existing destination file
authorAxel Lin <axel.lin@ingics.com>
Mon, 14 Oct 2013 13:22:19 +0000 (21:22 +0800)
committerPeter Korsgaard <peter@korsgaard.com>
Mon, 14 Oct 2013 20:00:09 +0000 (22:00 +0200)
This fixes below build error when executing
"make host-sam-ba-dirclean; make host-sam-ba-rebuild".

ln -s ../../opt/sam-ba/sam-ba /opt/test/br-x86/buildroot/output/host/usr/bin/sam-ba
ln: failed to create symbolic link '/opt/test/br-x86/buildroot/output/host/usr/bin/sam-ba': File exists
make: *** [/opt/test/br-x86/buildroot/output/build/host-sam-ba-2.12/.stamp_host_installed] Error 1

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/sam-ba/sam-ba.mk

index e425503f8faf6f2c1a3e66c7d1abff396eadc6d1..8e24fa62f331869b11a25f714daa0147e7d0a0aa 100644 (file)
@@ -24,7 +24,7 @@ endef
 define HOST_SAM_BA_INSTALL_CMDS
        mkdir -p $(HOST_DIR)/opt/sam-ba/
        cp -a $(@D)/* $(HOST_DIR)/opt/sam-ba/
-       ln -s ../../opt/sam-ba/sam-ba $(HOST_DIR)/usr/bin/sam-ba
+       ln -sf ../../opt/sam-ba/sam-ba $(HOST_DIR)/usr/bin/sam-ba
 endef
 
 $(eval $(host-generic-package))