summaryrefslogtreecommitdiff
path: root/include/tree.sh
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2025-10-04 06:13:15 +0100
committerLeah Rowe <leah@libreboot.org>2025-10-04 07:17:42 +0100
commit4f01dc704a1ed0e18fc0efc1500e61b4bc41b0e6 (patch)
tree5f6045ed1662614ad75c9eb46be3867937640450 /include/tree.sh
parent7f8d85140fd229e97e539ca463fbd94545997fd6 (diff)
xbmk: remove even more eval statements
in one or two cases, the use of eval is retained, but modified so as to be safer. Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include/tree.sh')
-rw-r--r--include/tree.sh70
1 files changed, 61 insertions, 9 deletions
diff --git a/include/tree.sh b/include/tree.sh
index 80815465..6d2d2f7c 100644
--- a/include/tree.sh
+++ b/include/tree.sh
@@ -4,11 +4,48 @@
# Copyright (c) 2022 Ferass El Hafidi <vitali64pmemail@protonmail.com>
# Copyright (c) 2023-2025 Leah Rowe <leah@libreboot.org>
-eval "`setvars "" xarch srcdir premake gnatdir xlang mode makeargs elfdir cmd \
- project target target_dir targets xtree _f release bootstrapargs mkhelper \
- autoconfargs listfile autogenargs btype rev build_depend gccdir cmakedir \
- defconfig postmake mkhelpercfg dry dest_dir mdir cleanargs gccver gccfull \
- gnatver gnatfull do_make badhash badtghash tree forcepull`"
+xarch=""
+srcdir=""
+premake=""
+gnatdir=""
+xlang=""
+mode=""
+makeargs=""
+elfdir=""
+cmd=""
+project=""
+target=""
+target_dir=""
+targets=""
+xtree=""
+_f=""
+release=""
+bootstrapargs=""
+mkhelper=""
+autoconfargs=""
+listfile=""
+autogenargs=""
+btype=""
+rev=""
+build_depend=""
+gccdir=""
+cmakedir=""
+defconfig=""
+postmake=""
+mkhelpercfg=""
+dry=""
+dest_dir=""
+mdir=""
+cleanargs=""
+gccver=""
+gccfull=""
+gnatver=""
+gnatfull=""
+do_make=""
+badhash=""
+badtghash=""
+tree=""
+forcepull=""
trees()
{
@@ -172,7 +209,10 @@ handle_defconfig()
return 0
fi
- chkvars tree
+ if [ -z "$tree" ]; then
+ err "$configdir: 'tree' not set" "handle_defconfig" "$@"
+ fi
+
srcdir="src/$project/$tree"
if [ "$mode" = "${mode%clean}" ] && [ ! -d "$srcdir" ]; then
@@ -209,9 +249,21 @@ handle_defconfig()
configure_project()
{
- eval "`setvars "" cleanargs build_depend autoconfargs xtree postmake \
- makeargs btype mkhelper bootstrapargs premake release xlang xarch \
- badhash badtghash`"
+ cleanargs=""
+ build_depend=""
+ autoconfargs=""
+ xtree=""
+ postmake=""
+ makeargs=""
+ btype=""
+ mkhelper=""
+ bootstrapargs=""
+ premake=""
+ release=""
+ xlang=""
+ xarch=""
+ badhash=""
+ badtghash=""
_tcfg="$1/target.cfg"