diff options
author | midipix <writeonce@midipix.org> | 2021-06-09 00:02:19 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2021-06-09 01:00:25 +0000 |
commit | 4190b30d936d834de2ce6492472745df36767bde (patch) | |
tree | ffbbb095d00d63f7d1e00a69c5079cda60c60b99 | |
parent | 0fb5ca5e3a68c69356ca29e97572d004bdb41bc6 (diff) | |
download | sofort-4190b30d936d834de2ce6492472745df36767bde.tar.bz2 sofort-4190b30d936d834de2ce6492472745df36767bde.tar.xz |
build system: cfgtest: cfgtest_common_init(): simplify case logic.
-rw-r--r-- | sofort/cfgtest/cfgtest.sh | 20 |
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 |