Hello, On 10/22/07, k wayne <[EMAIL PROTECTED]> wrote: > what i have ended up with ultimately, after quite a long time of > testing, reading manuals and searching the web is the following: > > someTarget: dependencies > <tab> if [ "`/bin/sh -c 'myCommand --options -asdf'`" -eq "5" ]; then fail fi > > however, that does not seem to work and i get an error saying that > /bin/sh misses a fi.
It's not seeing the 'fi' because it's trying to pass 'fi' as an argument to 'fail'. You need to end the 'fail' command with a semicolon. Eg: if [ ... ]; then fail; fi If you wanted to do if/then/else, it would be: if [ ... ]; then foo; else bar; fi Also, is there a reason you want to check against a particular return value? Most commands return 0 on success, and anything else is a failure. If you just want to stop make on a failure, it becomes quite a bit easier to do if you follow that trend. -Mike _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
