summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2021-04-19 16:30:44 +0000
committermidipix <writeonce@midipix.org>2021-04-19 16:31:41 +0000
commit4c567b9fc9b7423ece008e5b4d48e197b88fd150 (patch)
treeeaa8cee69a4950047b525bb2dfe64731327539ba
parentd82279a7953dc0b33b7e4eae3bb8e2adabe9c9bc (diff)
downloadmmglue-4c567b9fc9b7423ece008e5b4d48e197b88fd150.tar.bz2
mmglue-4c567b9fc9b7423ece008e5b4d48e197b88fd150.tar.xz
build system: cfgtest framework: handle quotes in $mb_cfgtest_cflags.
-rw-r--r--sofort/cfgtest/cfgtest.sh60
1 files changed, 30 insertions, 30 deletions
diff --git a/sofort/cfgtest/cfgtest.sh b/sofort/cfgtest/cfgtest.sh
index 233cb2f..9c13b67 100644
--- a/sofort/cfgtest/cfgtest.sh
+++ b/sofort/cfgtest/cfgtest.sh
@@ -184,10 +184,10 @@ cfgtest_header_presence()
"$mb_cfgtest_cc" "$mb_cfgtest_cflags" \
'--include='"${1}")
- $(printf '%s' "$cfgtest_cmd") \
- < /dev/null \
- > /dev/null 2>&3 \
- || cfgtest_epilog 'header' '-----' \
+ eval $(printf '%s' "$cfgtest_cmd") \
+ < /dev/null \
+ > /dev/null 2>&3 \
+ || cfgtest_epilog 'header' '-----' \
|| return
mb_internal_str=$(printf '%s%s' '-DHAVE_' "${1}" \
@@ -224,10 +224,10 @@ cfgtest_header_absence()
"$mb_cfgtest_cc" "$mb_cfgtest_cflags" \
'--include='"${1}")
- $(printf '%s' "$cfgtest_cmd") \
- < /dev/null \
- > /dev/null 2>&3 \
- && cfgtest_epilog 'header' "${1}" \
+ eval $(printf '%s' "$cfgtest_cmd") \
+ < /dev/null \
+ > /dev/null 2>&3 \
+ && cfgtest_epilog 'header' "${1}" \
&& return
mb_internal_str=$(printf '%s%s' '-DHAVE_NO_' "$@" \
@@ -273,14 +273,14 @@ cfgtest_interface_presence()
printf '\n\n' >&3
- cfgtest_cmd=$(printf '%s -S -xc - -o - %s %s' \
- "$mb_cfgtest_cc" "$mb_cfgtest_cflags" \
+ cfgtest_cmd=$(printf '%s -S -xc - -o - %s %s' \
+ "$mb_cfgtest_cc" "$mb_cfgtest_cflags" \
"$mb_internal_cflags")
- printf '%s' "$cfgtest_code_snippet" \
- | $(printf '%s' "$cfgtest_cmd") \
- > /dev/null 2>&3 \
- || cfgtest_epilog 'interface' '(error)' \
+ printf '%s' "$cfgtest_code_snippet" \
+ | eval $(printf '%s' "$cfgtest_cmd") \
+ > /dev/null 2>&3 \
+ || cfgtest_epilog 'interface' '(error)' \
|| return
mb_internal_str=$(printf '%s%s' '-DHAVE_' "$@" \
@@ -332,10 +332,10 @@ cfgtest_decl_presence()
"$mb_cfgtest_cc" "$mb_cfgtest_cflags" \
"$mb_internal_cflags")
- printf '%s' "$cfgtest_code_snippet" \
- | $(printf '%s' "$cfgtest_cmd") \
- > /dev/null 2>&3 \
- || cfgtest_epilog 'decl' '(error)' \
+ printf '%s' "$cfgtest_code_snippet" \
+ | eval $(printf '%s' "$cfgtest_cmd") \
+ > /dev/null 2>&3 \
+ || cfgtest_epilog 'decl' '(error)' \
|| return
# does the argument solely consist of the macro or enum member name?
@@ -386,11 +386,11 @@ cfgtest_type_size()
"$mb_internal_type" \
"$mb_internal_guess")
- printf '%s' "$mb_internal_str" \
- | $mb_cfgtest_cc -S -xc - -o - \
- $mb_cfgtest_cflags \
- $mb_internal_cflags \
- > /dev/null 2>/dev/null \
+ printf '%s' "$mb_internal_str" \
+ | eval $mb_cfgtest_cc -S -xc - -o - \
+ $mb_cfgtest_cflags \
+ $mb_internal_cflags \
+ > /dev/null 2>/dev/null \
&& mb_internal_size=$mb_internal_guess
fi
done
@@ -433,11 +433,11 @@ cfgtest_code_snippet()
mb_internal_cflags="$mb_internal_cflags --include=$mb_header"
done
- printf '%s' "$mb_internal_test" \
- | $mb_cfgtest_cc -S -xc - -o - \
- $mb_cfgtest_cflags \
- $mb_internal_cflags \
- > /dev/null 2>/dev/null \
+ printf '%s' "$mb_internal_test" \
+ | eval $mb_cfgtest_cc -S -xc - -o - \
+ $mb_cfgtest_cflags \
+ $mb_internal_cflags \
+ > /dev/null 2>/dev/null \
|| return 1
return 0
@@ -457,7 +457,7 @@ cfgtest_code_snippet_asm()
done
printf '%s' "$mb_internal_test" \
- | $mb_cfgtest_cc -c -xc - \
+ | eval $mb_cfgtest_cc -c -xc - \
-o $cfgtest_tmp \
$mb_cfgtest_cflags \
$mb_internal_cflags \
@@ -507,7 +507,7 @@ cfgtest_library_presence()
"$mb_cfgtest_ldflags" "$cfgtest_libs")
printf '%s' "$cfgtest_code_snippet" \
- | $(printf '%s' "$cfgtest_cmd") \
+ | eval $(printf '%s' "$cfgtest_cmd") \
> /dev/null 2>&3 \
|| cfgtest_epilog 'library' '-----' \
|| return 1