diff --git a/scripts/makefile-getvar b/scripts/makefile-getvar new file mode 100755 index 0000000000..4a07055e68 --- /dev/null +++ b/scripts/makefile-getvar @@ -0,0 +1,24 @@ +#! /bin/sh + +# Get a variable's value from a makefile: +# +# $ makefile-getvar Makefile VARIABLE VARIABLE ... +# +# If multiple variables are specified, they will be printed one per line. +# +# SPDX-FileCopyrightText: Copyright 2024 Arm Limited and/or its affiliates +# SPDX-License-Identifier: GPL-2.0-only + +set -eu + +MAKEFILE=$1 +shift + +for VARIABLE in $*; do + make -f - $VARIABLE.var <