summaryrefslogtreecommitdiff
path: root/sofort
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2021-06-09 00:02:19 +0000
committermidipix <writeonce@midipix.org>2021-06-09 01:00:26 +0000
commit63e51356bdc18215ff682a100abb171f0b1c98b1 (patch)
treec97e79ad9eb0c4117329a262ae90bec40c8c79b4 /sofort
parentf4071451aa6303eabe20627db99b6b7936a2c474 (diff)
downloadtpax-63e51356bdc18215ff682a100abb171f0b1c98b1.tar.bz2
tpax-63e51356bdc18215ff682a100abb171f0b1c98b1.tar.xz
build system: cfgtest: cfgtest_common_init(): simplify case logic.
Diffstat (limited to 'sofort')
-rw-r--r--sofort/cfgtest/cfgtest.sh20
1 files changed, 4 insertions, 16 deletions
diff --git a/sofort/cfgtest/cfgtest.sh b/sofort/cfgtest/cfgtest.sh
index b044136..8d62a08 100644
--- a/sofort/cfgtest/cfgtest.sh
+++ b/sofort/cfgtest/cfgtest.sh
@@ -257,25 +257,13 @@ cfgtest_common_init()
fi
- if [ -z "$mb_cfgtest_headers" ] || [ "$cfgtest_type" = 'lib' ]; then
- cfgtest_inc=
- cfgtest_src="$cfgtest_code_snippet"
-
- elif [ "$cfgtest_type" = 'macro' ]; then
- cfgtest_inc=
- cfgtest_src="$cfgtest_code_snippet"
-
- elif [ "$cfgtest_type" = 'ldflag' ]; then
- cfgtest_inc=
- cfgtest_src=
-
- elif [ "$cfgtest_type" = 'switch' ]; then
- cfgtest_inc=
- cfgtest_src=
- else
+ if [ -n "$mb_cfgtest_headers" ]; then
cfgtest_inc=$(printf '#include <%s>\n' $mb_cfgtest_headers)
cfgtest_src=$(printf '%s\n_\n' "$cfgtest_inc" \
| m4 -D_="$cfgtest_code_snippet")
+ else
+ cfgtest_inc=
+ cfgtest_src="$cfgtest_code_snippet"
fi