I have a makefile to build some transducers using Xerox' finite state tools (xfst in this case), which I invoke in my makefile like so (except with a hard tab instead of spaces in the actual makefile, of course):
latin.fst: nouns.fst verbs.fst
xfst -f build/latin.fst.build
On my laptop (a Mac with OS X 10.6.2) this works just fine, but on my university's Linux machines I get this error:
make: xfst: Command not found
make: *** [nouns.fst] Error 127
After some debugging I've found two ways to fix this problem. The first is to quote the -f
argument to xfst: "-f"
, the other is to say SHELL=/bin/bash
at the top of the makefile.
From the second fix (and how make works) it looks like the problem is with how /bin/sh executes the command. Now, /bin/sh is linked to /bin/bash, so it's not because of some kind of weird shell being installed as /bin/sh. Also, invoking /bin/sh and running the commands, or invoking /bin/sh -c "xfst -f build/latin.fst.build"
works just dandy.
Make is GNU Make 3.81, bash is GNU bash, version 3.2.25(1)-release.
Does anyone have any idea what's going on here?