Subject: Non-recursive make build systems and M-x compile

From: Reuben Thomas <[email-masked]>
Date: Thu, 18 Aug 2011 19:37:10 +0100

With a non-recursive make-based build system, how do I make M-x
compile work nicely?

If I just run M-x compile when visiting a source file under src/ it
doesn't work, as src/ contains no Makefile.

If I change the build command to make -C .., then Emacs gives errors
in the compile buffer pointing to files like "src/foo.c", but can't
follow those links, I presume because it considers the current dir for
the build to be "src".

Looking through compile.el it seems I ought to be able to set
compile-directory conveniently somehow; I imagine that I wouldn't want
to change the default-directory for my source buffers, though.

(BTW, typo in compile.el: "fone after" → "done after".)

-- 
http://rrt.sc3d.org