package/pkg-golang.mk: postpone evaluation of TARGET_DIR and HOST_DIR
authorTian Yuanhao <tianyuanhao@aliyun.com>
Fri, 18 Dec 2020 05:58:56 +0000 (13:58 +0800)
committerYann E. MORIN <yann.morin.1998@free.fr>
Sat, 19 Dec 2020 11:25:08 +0000 (12:25 +0100)
When BR2_PER_PACKAGE_DIRECTORIES=y, $(TARGET_DIR) is evaluated as
$(BASE_DIR)/target, but $$(TARGET_DIR) is evaluated as
$(BASE_DIR)/per-package/$(PKG)_NAME/target.

Signed-off-by: Tian Yuanhao <tianyuanhao@aliyun.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
package/pkg-golang.mk

index 3813e1c40615dd1d188275b10be8bbdb3b9efa24..d07242310d1e7e857acce7c6da3d977563fa9e61 100644 (file)
@@ -121,7 +121,7 @@ endif
 ifndef $(2)_INSTALL_TARGET_CMDS
 define $(2)_INSTALL_TARGET_CMDS
        $$(foreach d,$$($(2)_INSTALL_BINS),\
-               $(INSTALL) -D -m 0755 $$(@D)/bin/$$(d) $(TARGET_DIR)/usr/bin/$$(d)
+               $(INSTALL) -D -m 0755 $$(@D)/bin/$$(d) $$(TARGET_DIR)/usr/bin/$$(d)
        )
 endef
 endif
@@ -130,7 +130,7 @@ endif
 ifndef $(2)_INSTALL_CMDS
 define $(2)_INSTALL_CMDS
        $$(foreach d,$$($(2)_INSTALL_BINS),\
-               $(INSTALL) -D -m 0755 $$(@D)/bin/$$(d) $(HOST_DIR)/bin/$$(d)
+               $(INSTALL) -D -m 0755 $$(@D)/bin/$$(d) $$(HOST_DIR)/bin/$$(d)
        )
 endef
 endif