From: Alan Mackenzie_JWA <alan.mackenzie_jwa@nxp.com>
To: Richard Stallman <rms@gnu.org>
Cc: bug-cc-mode@gnu.org, acm@muc.de, emacs-devel@gnu.org
Subject: Re: Compilation order. Help with makefiles, please!
Date: Wed, 29 Aug 2007 11:57:14 +0200 [thread overview]
Message-ID: <OFD7E23881.DC2C55C6-ONC1257346.0028AE65-C1257346.003698F2@philips.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 2303 bytes --]
Hi, Richard!
On Sunday 26th August 2007 you wrote:
> > 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.
>A fix in the makefile is better than no fix, but it is troublesome
>because it would require major changes in something which is now very
>simple.
Is "major" not an exaggeration? The sort of change I suggested (recording
the precise dependencies between the cc-*.elc files) would be fairly
localised in effect. It could set a precedent for further changes,
though.
I think the makefile is simple because it doesn't reflect the inherent
complexity of Emacs (or, at least, of CC Mode), and this is why compiling
CC Mode is troublesome.
>Practically speaking, we would be much better off if you could
>solve this by changes in the cc-mode files themselves.
I can't see how this can be done. The case I am thinking about is when a
change happens in cc-langs.el, say the introduction of a new language
variable c-foo - this is what I changed in a bug fix last week. The
sequence of compilations now needed is this:
(i) Compile cc-langs.el; this puts the details of c-foo into a macro in
cc-langs.elc.
(ii) Compile cc-engine.el and cc-mode.el; from the cc-langs macro, the
first generates
(defvar c-foo "Doc string.")
in cc-engine.elc. The second generates (in effect), the following in
CC Mode's initialisation in cc-mode.elc:
(setq cc-foo
(cond
((eq major mode 'c-mode) "c-foo")
((eq major mode 'c++-mode) "c++-foo")
.....))
0 1 2 3 4 5 6 7 3
Thus changing cc-langs.el makes a recompiliation of cc-{mode,engine}.el
necessary. I can't see how this can be done sensibly within the CC Mode
files. Possibly, cc-{mode,engine}.el could, at compilation time, get the
timestamps for cc-langs.el{,c}, compare them, and recursively compile
cc-langs.el if necessary. But this is a horrible idea.
Or were you thinking of a different troublesome case?
--
Alan Mackenzie (Nuremberg, Germany).
[-- Attachment #1.2: Type: text/html, Size: 4081 bytes --]
[-- Attachment #2: Type: text/plain, Size: 315 bytes --]
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
next reply other threads:[~2007-08-29 9:57 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-29 9:57 Alan Mackenzie_JWA [this message]
2007-08-30 7:15 ` Compilation order. Help with makefiles, please! 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
2007-10-05 21:54 ` Compilation order. Tentative patch Alan Mackenzie
2007-10-06 5:38 ` Mathias Megyei
2007-10-07 0:31 ` Richard Stallman
[not found] <E1IMYuS-00059J-B8@fencepost.gnu.org>
2007-08-26 9:38 ` Compilation order. Help with makefiles, please! Alan Mackenzie
2007-08-26 10:28 ` Michaël Cadilhac
2007-08-26 10:55 ` Alan Mackenzie
2007-08-26 22:46 ` 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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=OFD7E23881.DC2C55C6-ONC1257346.0028AE65-C1257346.003698F2@philips.com \
--to=alan.mackenzie_jwa@nxp.com \
--cc=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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).