I have my own program called automake which I originally wrote on an Ubuntu machine and recently wanted to get working on my machine running OSX Lion.
I've compiled it up, copied it into my /Users/andrew/bin
directory which is one of the first directories listed in my PATH
variable:
bash-3.2$ echo $PATH | tr : '\n'
.
/Users/andrew/bin
/opt/local/bin
/opt/local/sbin
/Users/andrew/Library/Application Support/GoodSync
/Users/andrew/.rvm/gems/ruby-1.9.3-p194/bin
/Users/andrew/.rvm/gems/ruby-1.9.3-p194@global/bin
/Users/andrew/.rvm/rubies/ruby-1.9.3-p194/bin
/Users/andrew/.rvm/bin
.
/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/bin
/usr/X11/bin
/Users/andrew/.rvm/bin
/Users/andrew/bin
/Users/andrew/.rvm/bin
However, when I try to run automake it is clearly running a different automake program. I think it's one of the xcode developer tools:
bash-3.2$ automake game.cpp
automake: error: no Automake input file found for 'game.cpp'
automake: error: no input file found among supplied arguments
This version of automake is located in /opt/local/bin
. What I don't understand is how this is possible when my automake is located in an earlier directory in my PATH
variable. Indeed, the unix which
program displays the path to my automake:
bash-3.2$ which automake
/Users/andrew/bin/automake
What sorcery is this?