toolchain: Correct test for external tools symlink creation
authorStany MARCEL <stanypub@gmail.com>
Tue, 1 Nov 2011 00:53:38 +0000 (01:53 +0100)
committerPeter Korsgaard <jacmet@sunsite.dk>
Wed, 2 Nov 2011 10:46:07 +0000 (11:46 +0100)
When the external tools chain is installed in a path that match one of
the first case test, all symlink are created to the external
wrapper. The proposed solution is to test only the base name not the
full path.

Signed-off-by: Stany MARCEL <stanypub@gmail.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
toolchain/toolchain-external/ext-tool.mk

index 828791660af9a8878e77c4b18b7961b87c85bc93..572917ff0b9277309a555d78c2dae507dcfa5f13 100644 (file)
@@ -318,9 +318,9 @@ $(STAMP_DIR)/ext-toolchain-installed: $(TOOLCHAIN_EXTERNAL_DEPENDENCIES)
 $(HOST_DIR)/usr/bin/ext-toolchain-wrapper: $(STAMP_DIR)/ext-toolchain-installed
        mkdir -p $(HOST_DIR)/usr/bin; cd $(HOST_DIR)/usr/bin; \
        for i in $(TOOLCHAIN_EXTERNAL_CROSS)*; do \
-               case "$$i" in \
+               base=$${i##*/}; \
+               case "$$base" in \
                *cc|*cc-*|*++|*++-*|*cpp) \
-                       base=$${i##*/}; \
                        ln -sf $(@F) $$base; \
                        ;; \
                *) \