Skip to content

Commit

Permalink
CONFIGURE: Slightly simplify the engines.awk.out generation
Browse files Browse the repository at this point in the history
There is no need of the she-bang on sourced scripts and eval should be
avoided.
Using a single > allows to not remove the file before writing to it.
  • Loading branch information
lephilousophe committed Dec 8, 2024
1 parent 4339a76 commit 5118a71
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -4126,11 +4126,10 @@ append_var MODULES "backends/platform/$_backend"
# Check if specific components are not used by enabled engines and disable them
#
echo "Checking for unused components..."
rm -f engines.awk.out
awk -f "$_srcdir/engines.awk" -v _pass=pass1 < /dev/null
echo "...check complete"

eval "`. engines.awk.out`"
. ./engines.awk.out

for f in $_features_disabled; do
set_var $(get_var _feature_${f}_settings) "no"
Expand Down
2 changes: 1 addition & 1 deletion engines.awk
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ END {
}
}

print("#!/bin/sh\necho '_features_disabled=\"" _features_disabled "\"'") >> "engines.awk.out"
print("_features_disabled=\"" _features_disabled "\"") > "engines.awk.out"

exit 0
}
Expand Down

0 comments on commit 5118a71

Please sign in to comment.