echo "CFLAGS=-DNUMBER=123" > config.omk
needs_valid_CC
make||error "Can't compile"
-[ $OMK_RULES != linux ] && canttest "Should work only with Linux rules"
-_compiled/bin/test|grep 123 || error "Custom CFLAGS didn't influence the output"
+if [ $OMK_RULES = linux ]; then
+ # The following should work only with Linux rules
+ _compiled/bin/test|grep 123 || error "Custom CFLAGS didn't influence the output"
+fi
touch config.omk-default
needs_valid_CC
make CFLAGS="-DNONSENSE=abc -DNUMBER=123"||error "Can't compile"
-[ $OMK_RULES != linux ] && canttest "Should work only with Linux rules"
-_compiled/bin/test|grep 123 || error "Custom CFLAGS didn't influence the output"
+if [ $OMK_RULES = linux ]; then
+ # The following should work only with Linux rules
+ _compiled/bin/test|grep 123 || error "Custom CFLAGS didn't influence the output"
+fi
echo "DEFS=-DNUMBER=123" > config.omk
needs_valid_CC
make||error "Can't compile"
-[ $OMK_RULES != linux ] && canttest "Should work only with Linux rules"
-_compiled/bin/test|grep 123 || error "Variable DEFS didn't influence the output"
+if [ $OMK_RULES = linux ]; then
+ # The following should work only with Linux rules
+ _compiled/bin/test|grep 123 || error "Variable DEFS didn't influence the output"
+fi