all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Richard Stallman <rms@gnu.org>
Cc: bug-cc-mode@gnu.org, emacs-devel@gnu.org
Subject: Re: Compilation order.  Help with makefiles, please!
Date: Sun, 26 Aug 2007 09:38:08 +0000	[thread overview]
Message-ID: <20070826093808.GA3996@muc.de> (raw)
In-Reply-To: <E1IMYuS-00059J-B8@fencepost.gnu.org>

Hi, Richard!

On Sat, Aug 18, 2007 at 08:44:52PM -0400, Richard Stallman wrote:
> Can you do something to make recompilation of the cc files reliable?
> We see problems due to recompilation order over and over.

I didn't realise it was that bad.  But it is a massive pain in the
posterior.  I have been attempting to minimise this problem by giving
specific recipes for order of compilation when, for example, cc-langs.el
is changed.  Clearly more is wanted.

> For instance, if you put the macros etc. into one file whose name
> comes alphabetically before the rest, maybe everything will work
> reliably.

Surely the right tool for this job is the (or a?) makefile?  If we're
going to fix the problem, we might as well fix it properly.

I am attempting to modify ..../lisp/Makefile.  However, I'm still
learning about makefiles, and would welcome tips or general help, or
comments about this approach from people here.  At the moment, this is
what I've added to ..../lisp/Makefile:

#########################################################################
#### NEW STOUGH, 2007-08-25
pr=$(lisp)/progmodes
.PHONY: CC-MODE
CC-MODE: $(pr)/cc-align.elc $(pr)/cc-awk.elc  $(pr)/cc-bytecomp.elc  $(pr)/cc-cmds.elc  $(pr)/cc-compat.elc  $(pr)/cc-defs.elc \ $(pr)/cc-engine.elc  $(pr)/cc-fonts.elc  $(pr)/cc-langs.elc  $(pr)/cc-menus.elc  $(pr)/cc-mode.elc  $(pr)/cc-styles.elc  $(pr)\/cc-subword.elc  $(pr)/cc-vars.elc

# "Top level" CC Mode files:
$(pr)/cc-align.elc \
$(pr)/cc-awk.elc \
$(pr)/cc-cmds.elc \
$(pr)/cc-compat.elc \
$(pr)/cc-menus.elc \
$(pr)/cc-styles.elc \
$(pr)/cc-subword.elc \
$(pr)/cc-vars.elc: \
        $(pr)/cc-defs.elc $(pr)/cc-bytecomp.elc

# CC Mode files which create, initialise, or use the innard of "language
# variables":
$(pr)/cc-mode.elc $(pr)/cc-engine.elc $(pr)/cc-fonts.elc: $(pr)/cc-langs.elc   # <===========================

# CC Mode file which creates language variables:
$(pr)/cc-langs.elc: \
        $(pr)/cc-defs.elc $(pr)/cc-bytecomp.elc

# CC Mode main macro definition file:
$(pr)/cc-defs.elc: $(pr)/cc-bytecomp.elc

#### END OF NEW STOUGH, 2007-08-25
#########################################################################

If I delete cc-langs.elc, then do:

    % make -nf CC-Makefile.mk progmodes/cc-engine.elc

, make reports:

    make: `progmodes/cc-engine.elc' is up to date.

, though I would expect it first to rebuild cc-langs.elc (due to the line
I've marked with <=====).

Thanks in advance for any help!

-- 
Alan Mackenzie (Ittersbach, Germany).

       reply	other threads:[~2007-08-26  9:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1IMYuS-00059J-B8@fencepost.gnu.org>
2007-08-26  9:38 ` Alan Mackenzie [this message]
2007-08-26 10:28   ` Compilation order. Help with makefiles, please! Michaël Cadilhac
2007-08-26 10:55     ` Alan Mackenzie
2007-08-26 22:46   ` Richard Stallman
2007-08-29  9:57 Alan Mackenzie_JWA
2007-08-30  7:15 ` Richard Stallman
2007-08-30 19:45   ` Stefan Monnier
2007-08-31  7:34     ` Richard Stallman
2007-08-31  8:57       ` Alan Mackenzie_JWA
2007-08-31 14:16         ` Stefan Monnier
2007-09-01  4:06         ` Richard Stallman

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=20070826093808.GA3996@muc.de \
    --to=acm@muc.de \
    --cc=bug-cc-mode@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=rms@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.