title: compile large project within emacs
body: <p>A large project may have directory with several level depth. Emacs's default compile command is <code>"make -k"</code>, if I modified a certain source code, then typed <code>"M-x compile RET RET"</code>, it will execute <code>"make -k"</code> under the directory which the source code lies. </p>
  
  <p>I think I can write a function to determine if the Makefile exist under current directory, if yes, keep searching under the parent directory until find the top level directory, then execute the building command, it would be right like my expectation.</p>
  
  <p>However, I'm not very clearly how to start, could anyone give me some hints to start? Like the function or variable I may encounter. Thanks.</p>