Run Makefile from Finder I often travel using Finder in the source directories of various project (LaTeX articles, programming stuff) for which the compilation is piloted by a Makefile.
I was wondering if there is a simple way (Service menu, Automator whatever) to invoke the corresponding command (make) in the good directory directoly from Finder (right-click something). 

I'm running OS X 10.8. 

Thanks by advance for your suggestions
You could use a function like this:

fmake() {
  cd "$(osascript -e 'tell application "Finder"
      POSIX path of (target of Finder window 1 as alias)
  end tell' 2&gt; /dev/null)"
  make &amp;&amp; make install
}


Or save a function just for the cd command and use history-search-backward to run something like cdf &amp;&amp; make &amp;&amp; make install.

Or open Automator, choose the Service template, set the input type to no input, and add a Run AppleScript action like this:

try
    tell application "Finder"
        POSIX path of (target of Finder window 1 as alias)
    end tell
    tell application "Terminal"
        do script "cd " &amp; quoted form of result &amp; " &amp;&amp; make &amp;&amp; make install"
        activate
    end tell
end


Without the try block Automator would show an error dialog if the script exits with an error.