sam-ba: fix sam-ba symbolic link
authorJoshua Henderson <joshua.henderson@microchip.com>
Thu, 22 Mar 2018 16:24:26 +0000 (09:24 -0700)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sun, 25 Mar 2018 20:23:12 +0000 (22:23 +0200)
Following the removal of $(HOST_DIR)/usr, the symbolic link from
$(HOST_DIR)/bin/sam-ba/ to $(HOST_DIR)/opt/sam-ba/sam-ba was broken,
so we fix this.

In addition, sam-ba being prebuilt, it comes in two separates
binaries, one for x86 and the other for x86_64, so we take this into
account as well.

Signed-off-by: Joshua Henderson <joshua.henderson@microchip.com>
[Thomas:
 - add spaces around = signs
 - rework commit log.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/sam-ba/sam-ba.mk

index 244ede3ef18deba1af9892d4d24fa20feda1b4e5..a7941459c7352cd202ad357666f0cf1f5cc31bf6 100644 (file)
@@ -23,10 +23,16 @@ endef
 # then create a symbolic link from $(HOST_DIR)/bin to the
 # application binary, for easier usage.
 
+ifeq ($(HOSTARCH),x86_64)
+SAM_BA_BIN_NAME = sam-ba_64
+else
+SAM_BA_BIN_NAME = sam-ba
+endif
+
 define HOST_SAM_BA_INSTALL_CMDS
        mkdir -p $(HOST_DIR)/opt/sam-ba/
        cp -a $(@D)/* $(HOST_DIR)/opt/sam-ba/
-       ln -sf ../../opt/sam-ba/sam-ba $(HOST_DIR)/bin/sam-ba
+       ln -sf ../opt/sam-ba/$(SAM_BA_BIN_NAME) $(HOST_DIR)/bin/sam-ba
 endef
 
 $(eval $(host-generic-package))