all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Jose A. Ortega Ruiz" <jao@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Emacs and parent directory Makefile
Date: Sun, 11 Jul 2010 01:08:53 +0200	[thread overview]
Message-ID: <87wrt3djei.fsf@newton.homeunix.net> (raw)
In-Reply-To: AANLkTilSjSOkETBVVIoWM4MFPZYd0AS62qluPJo3oOO5@mail.gmail.com

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




      parent reply	other threads:[~2010-07-10 23:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-09 16:51 Emacs and parent directory Makefile Stéphane Maniaci
2010-07-10  5:13 ` Bob Proulx
2010-07-12  2:24   ` Stéphane Maniaci
2010-07-12  9:16     ` Geralt
2010-07-10  7:05 ` Eli Zaretskii
2010-07-10 10:58   ` Bastian Beischer
2010-07-10 23:08 ` Jose A. Ortega Ruiz [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wrt3djei.fsf@newton.homeunix.net \
    --to=jao@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.