help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs and parent directory Makefile


From: Jose A. Ortega Ruiz
Subject: Re: Emacs and parent directory Makefile
Date: Sun, 11 Jul 2010 01:08:53 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

On Fri, Jul 09 2010, Stéphane Maniaci wrote:

> Hi,
>
> My project uses non-recursive Makefile, thus there is only (at the
> moment) a single Makefile in my project root tree, that compiles (with
> Autotools) all my sources files, located in the src/ directory.
>
> Now the problem is : when I'm editing my code and tries to compile it
> (M-x compile), I have to use 'make -k -C ../', which works fine, but
> Emacs doesn't know anymore which files contains error. When trying to
> move to last error, it outputs this :

I use the elisp code at

<http://git.hacks-galore.org/gitweb/jao?p=emacs.git;a=blob;f=custom/jao-compile.el;hb=master>

When one calls jao-compile on a source buffer, it looks upwards the
directory tree until it encounters a Makefile, or some other file
indicating that the top dir of the source has been found. Then it puts
itself in the right directory (where, in my case, 'right' means the
corresponding compilation directory, i.e., 'build' because i compile
off-tree).

Perhaps you could adapt the code above (its 'finding the right
directory' logic) to your needs.

HTH,
jao
-- 
Lisp has assisted a number of our most gifted fellow humans in
thinking previously impossible thoughts. —Edsger Dijkstra




reply via email to

[Prev in Thread] Current Thread [Next in Thread]