diff options
author | Luca Barbato <luca.barbato@gmail.com> | 2023-03-09 08:58:16 +0100 |
---|---|---|
committer | Daniel Golle <daniel@makrotopia.org> | 2023-03-10 14:24:16 +0000 |
commit | 44d1d22a16e25b1e06fae86e157718069b7069f6 (patch) | |
tree | c8ffc0bae5ec9debda98ca059a30ed489ffd89fc /lang/rust/rust-package.mk | |
parent | 674bad05591f2c969297576062b9dcba00a30ea7 (diff) |
rust-lang: Apply suggestions from code review
Co-authored-by: Tianling Shen <cnsztl@gmail.com>
Signed-off-by: Luca Barbato <luca.barbato@gmail.com>
Diffstat (limited to 'lang/rust/rust-package.mk')
-rw-r--r-- | lang/rust/rust-package.mk | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lang/rust/rust-package.mk b/lang/rust/rust-package.mk index 3c8b7aaa0..472417a61 100644 --- a/lang/rust/rust-package.mk +++ b/lang/rust/rust-package.mk @@ -8,8 +8,10 @@ include $(rust_mk_path)rust-host.mk # $(1) path to the package # $(2) additional arguments to cargo define Build/Compile/Cargo - cd $(PKG_BUILD_DIR) && \ - export PATH="$(CARGO_HOME)/bin:$(PATH)" && \ - CARGO_HOME=$(CARGO_HOME) TARGET_CFLAGS="$(TARGET_CFLAGS) $(RUST_CFLAGS)" TARGET_CC=$(TARGET_CC_NOCACHE) CC=cc \ - cargo install -v --profile stripped --target $(RUSTC_TARGET_ARCH) --root $(PKG_INSTALL_DIR) --path "$(if $(strip $(1)),$(strip $(1)),.)" $(2) + ( \ + cd $(PKG_BUILD_DIR) ; \ + export PATH="$(CARGO_HOME)/bin:$(PATH)" ; \ + CARGO_HOME=$(CARGO_HOME) TARGET_CFLAGS="$(TARGET_CFLAGS) $(RUST_CFLAGS)" TARGET_CC=$(TARGET_CC_NOCACHE) CC=cc \ + cargo install -v --profile stripped --target $(RUSTC_TARGET_ARCH) --root $(PKG_INSTALL_DIR) --path "$(if $(strip $(1)),$(strip $(1)),.)" $(2) ; \ + ) endef |