|
@@ -71,6 +71,11 @@ $(2)_DOWNLOAD_DEPENDENCIES += host-rustc
|
|
$(2)_DOWNLOAD_POST_PROCESS = cargo
|
|
$(2)_DOWNLOAD_POST_PROCESS = cargo
|
|
$(2)_DL_ENV += CARGO_HOME=$$(HOST_DIR)/share/cargo
|
|
$(2)_DL_ENV += CARGO_HOME=$$(HOST_DIR)/share/cargo
|
|
|
|
|
|
|
|
+# If building in a sub directory, use that to find the Cargo.toml
|
|
|
|
+ifneq ($$($(2)_SUBDIR),)
|
|
|
|
+$(2)_DL_ENV += BR_CARGO_MANIFEST_PATH=$$($(2)_SUBDIR)/Cargo.toml
|
|
|
|
+endif
|
|
|
|
+
|
|
# Due to vendoring, it is pretty likely that not all licenses are
|
|
# Due to vendoring, it is pretty likely that not all licenses are
|
|
# listed in <pkg>_LICENSE.
|
|
# listed in <pkg>_LICENSE.
|
|
$(2)_LICENSE += , vendored dependencies licenses probably not listed
|
|
$(2)_LICENSE += , vendored dependencies licenses probably not listed
|
|
@@ -97,7 +102,7 @@ $(2)_LICENSE += , vendored dependencies licenses probably not listed
|
|
ifndef $(2)_BUILD_CMDS
|
|
ifndef $(2)_BUILD_CMDS
|
|
ifeq ($(4),target)
|
|
ifeq ($(4),target)
|
|
define $(2)_BUILD_CMDS
|
|
define $(2)_BUILD_CMDS
|
|
- cd $$(@D) && \
|
|
|
|
|
|
+ cd $$($$(PKG)_SRCDIR) && \
|
|
$$(TARGET_MAKE_ENV) \
|
|
$$(TARGET_MAKE_ENV) \
|
|
$$(TARGET_CONFIGURE_OPTS) \
|
|
$$(TARGET_CONFIGURE_OPTS) \
|
|
$$(PKG_CARGO_ENV) \
|
|
$$(PKG_CARGO_ENV) \
|
|
@@ -111,7 +116,7 @@ define $(2)_BUILD_CMDS
|
|
endef
|
|
endef
|
|
else # ifeq ($(4),target)
|
|
else # ifeq ($(4),target)
|
|
define $(2)_BUILD_CMDS
|
|
define $(2)_BUILD_CMDS
|
|
- cd $$(@D) && \
|
|
|
|
|
|
+ cd $$($$(PKG)_SRCDIR) && \
|
|
$$(HOST_MAKE_ENV) \
|
|
$$(HOST_MAKE_ENV) \
|
|
RUSTFLAGS="$$(addprefix -C link-args=,$$(HOST_LDFLAGS))" \
|
|
RUSTFLAGS="$$(addprefix -C link-args=,$$(HOST_LDFLAGS))" \
|
|
$$(HOST_CONFIGURE_OPTS) \
|
|
$$(HOST_CONFIGURE_OPTS) \
|
|
@@ -133,7 +138,7 @@ endif # ifndef $(2)_BUILD_CMDS
|
|
#
|
|
#
|
|
ifndef $(2)_INSTALL_TARGET_CMDS
|
|
ifndef $(2)_INSTALL_TARGET_CMDS
|
|
define $(2)_INSTALL_TARGET_CMDS
|
|
define $(2)_INSTALL_TARGET_CMDS
|
|
- cd $$(@D) && \
|
|
|
|
|
|
+ cd $$($$(PKG)_SRCDIR) && \
|
|
$$(TARGET_MAKE_ENV) \
|
|
$$(TARGET_MAKE_ENV) \
|
|
$$(TARGET_CONFIGURE_OPTS) \
|
|
$$(TARGET_CONFIGURE_OPTS) \
|
|
$$(PKG_CARGO_ENV) \
|
|
$$(PKG_CARGO_ENV) \
|
|
@@ -152,7 +157,7 @@ endif
|
|
|
|
|
|
ifndef $(2)_INSTALL_CMDS
|
|
ifndef $(2)_INSTALL_CMDS
|
|
define $(2)_INSTALL_CMDS
|
|
define $(2)_INSTALL_CMDS
|
|
- cd $$(@D) && \
|
|
|
|
|
|
+ cd $$($$(PKG)_SRCDIR) && \
|
|
$$(HOST_MAKE_ENV) \
|
|
$$(HOST_MAKE_ENV) \
|
|
RUSTFLAGS="$$(addprefix -C link-args=,$$(HOST_LDFLAGS))" \
|
|
RUSTFLAGS="$$(addprefix -C link-args=,$$(HOST_LDFLAGS))" \
|
|
$$(HOST_CONFIGURE_OPTS) \
|
|
$$(HOST_CONFIGURE_OPTS) \
|