9ee18a build system: cfgtest: cfgtest_common_init(): simplify case logic.

Authored and Committed by midipix 3 years ago
    build system: cfgtest: cfgtest_common_init(): simplify case logic.
    
        
file modified
+4 -16
sofort/cfgtest/cfgtest.sh CHANGED
@@ -257,25 +257,13 @@ cfgtest_common_init()
257
257
fi
258
258
259
259
260
- if [ -z "$mb_cfgtest_headers" ] || [ "$cfgtest_type" = 'lib' ]; then
260
+ if [ -n "$mb_cfgtest_headers" ]; then
261
- cfgtest_inc=
262
- cfgtest_src="$cfgtest_code_snippet"
263
-
264
- elif [ "$cfgtest_type" = 'macro' ]; then
265
- cfgtest_inc=
266
- cfgtest_src="$cfgtest_code_snippet"
267
-
268
- elif [ "$cfgtest_type" = 'ldflag' ]; then
269
- cfgtest_inc=
270
- cfgtest_src=
271
-
272
- elif [ "$cfgtest_type" = 'switch' ]; then
273
- cfgtest_inc=
274
- cfgtest_src=
275
- else
276
261
cfgtest_inc=$(printf '#include <%s>\n' $mb_cfgtest_headers)
277
262
cfgtest_src=$(printf '%s\n_\n' "$cfgtest_inc" \
278
263
| m4 -D_="$cfgtest_code_snippet")
264
+ else
265
+ cfgtest_inc=
266
+ cfgtest_src="$cfgtest_code_snippet"
279
267
fi
280
268
281
269