QNX RTOS v4 Knowledge Base
QNX RTOS v4 Knowledge Base
Title |
IF statements return true under bash but false under QNX ksh |
Ref. No. |
QNX.000009672 |
Category(ies) |
Utilities, Development, Configuration |
Issue |
While working on a port of TCL 8.2.3, we think we found a bug in Make. Here is our output: Installing libtcl8.2g.a chmod +x /usr/local/src/tcl8.2.3/unix/install-sh if test "" != ""; then echo "Installing "; /usr/local/src/tcl8.2.3./unix/install-sh -c -m 644 /usr/local/tk8.2.3./lib; fi make: *** [install-binaries] Error 1
Now, shouldn't the test: if test "" != ""; then evaluate to false and NOT execute the innter statements?
|
Solution |
The result of an if statement is true in bash when the test evaluates to false, but is false in QNX ksh when the test is false. Whenever this happens try: SHELL=/bin/bash ./configure or hack the makefile to use /bin/bash. |
|