all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Bastian Beischer <beischer@physik.rwth-aachen.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Emacs and parent directory Makefile
Date: Sat, 10 Jul 2010 12:58:17 +0200	[thread overview]
Message-ID: <AANLkTilFSdgRuXyndAsUSGKWk8Ei8Q6tzhgCSjM5Y439@mail.gmail.com> (raw)
In-Reply-To: <83wrt3akbl.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1687 bytes --]

I have this in my .emacs:

(defun my-compile ()
  "This command is meant to step out of the include/src directories on
compilation. Useful for compiling projects without cd-ing to the correct
Makefile path."
  (interactive)
  (let ((last-directory default-directory))
    (if (string-match "\\(\/src\/\\|\/include\/\\)$" default-directory)
        (cd (replace-regexp-in-string "\\(\/src\/\\|\/include\/\\)$" "/"
default-directory)))
    (call-interactively 'compile)
    (cd last-directory)))

(define-key c++-mode-map (kbd "<f9>") 'my-compile)

Far from perfect, but it's a start and works very well for me.

Cheers
Bastian


On Sat, Jul 10, 2010 at 9:05 AM, Eli Zaretskii <eliz@gnu.org> wrote:

> > Date: Fri, 9 Jul 2010 11:51:19 -0500
> > From: =?ISO-8859-1?Q?St=E9phane_Maniaci?= <stephane.maniaci@gmail.com>
> >
> > 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 :
> >
> > Find this error in (default src/ease-about-dialog.vala):
> ~/build/ease/src/
> >
> > Does anyone have a workaround for this ?
>
> Switch to the buffer that visits your top-level Makefile, before
> typing "M-x compile".
>
>


-- 
Bastian Beischer

I. Physikalisches Institut B (RWTH Aachen)
Sommerfeldstr. 14
52074 Aachen
GERMANY

Office: 28-C-203
Phone: +49 241 - 8027205

[-- Attachment #2: Type: text/html, Size: 2457 bytes --]

  reply	other threads:[~2010-07-10 10:58 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 [this message]
2010-07-10 23:08 ` Jose A. Ortega Ruiz

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=AANLkTilFSdgRuXyndAsUSGKWk8Ei8Q6tzhgCSjM5Y439@mail.gmail.com \
    --to=beischer@physik.rwth-aachen.de \
    --cc=eliz@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.