next(build-package): allow for quoted parameters in build_rfa
The current build approach fails when using more than one parameter
in TFA_FLAGS. For example, if:
TFA_FLAGS="FVP_TRUSTED_SRAM_SIZE=512 ENABLE_RME=1 NEED_BL31=no"
we get:
make -C /home/tomgon01/tfa/trusted-firmware-a/ "FVP_TRUSTED_SRAM_SIZE=512 PLAT=fvp DEBUG=1 BL32=...
/bin/sh: 1: Syntax error: Unterminated quoted string
The shell is splitting the content of the file by whitespace
(newline tabs and space are splitted) as defined in the IFS.
* use `eval` to treat every line as a construct by itself and
concatenate them by separating them with whitespaces. This
stops the shell from splitting what is inside the "" when it
sees a whitespace.
Change-Id: Ifdcb7be2131a6f6be47e3295c189f37e63d8ab2e
Signed-off-by: Tomás González <tomasagustin.gonzalezorlando@arm.com>
diff --git a/script/build_package.sh b/script/build_package.sh
index 758d083..6694a30 100755
--- a/script/build_package.sh
+++ b/script/build_package.sh
@@ -657,8 +657,8 @@
# Build RF-A and TF-A. Since build output is being directed to the build
# log, have descriptor 3 point to the current terminal for build
# wrappers to vent.
- make $make_j_opts $(cat "$config_file") \
- DEBUG="$DEBUG" \
+ eval make $make_j_opts $(cat "$config_file") \
+ DEBUG="$DEBUG" \
$build_targets 3>&1 &>>"$build_log" || fail_build
)
}