]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
rust-cross-canadian: rename shell variables for easier appends
authorPeter Bergin <peter@berginkonsult.se>
Tue, 23 Aug 2022 11:02:27 +0000 (13:02 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 25 Aug 2022 10:07:33 +0000 (11:07 +0100)
Make unique shell variable names for cargo and rust
setup scripts. This change will make it easier to append to the
scripts in a bbappend file by using the variable for the script.
Before this change it was only possible for the last script as
they shared the same variable name.

Signed-off-by: Peter Bergin <peter@berginkonsult.se>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/rust/rust-cross-canadian.inc

index 77d45a37a317f8b52f960730bac7011ab29932f3..7bf75a4712eb45a3e4364ba5c34af3db8d9fa011 100644 (file)
@@ -37,17 +37,17 @@ do_install () {
 
     ENV_SETUP_DIR=${D}${base_prefix}/environment-setup.d
     mkdir "${ENV_SETUP_DIR}"
-    ENV_SETUP_SH="${ENV_SETUP_DIR}/rust.sh"
+    RUST_ENV_SETUP_SH="${ENV_SETUP_DIR}/rust.sh"
 
-    cat <<- EOF > "${ENV_SETUP_SH}"
+    cat <<- EOF > "${RUST_ENV_SETUP_SH}"
        export RUSTFLAGS="--sysroot=\$OECORE_TARGET_SYSROOT/usr -C link-arg=--sysroot=\$OECORE_TARGET_SYSROOT"
        export RUST_TARGET_PATH="\$OECORE_NATIVE_SYSROOT/usr/lib/${TARGET_SYS}/rustlib"
        EOF
 
     chown -R root.root ${D}
 
-    ENV_SETUP_SH="${ENV_SETUP_DIR}/cargo.sh"
-    cat <<- EOF > "${ENV_SETUP_SH}"
+    CARGO_ENV_SETUP_SH="${ENV_SETUP_DIR}/cargo.sh"
+    cat <<- EOF > "${CARGO_ENV_SETUP_SH}"
        export CARGO_HOME="\$OECORE_TARGET_SYSROOT/home/cargo"
        mkdir -p "\$CARGO_HOME"
         # Init the default target once, it might be otherwise user modified.