all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: Compilation order. Help with makefiles, please!
@ 2007-08-29  9:57 Alan Mackenzie_JWA
  2007-08-30  7:15 ` Richard Stallman
  0 siblings, 1 reply; 14+ messages in thread
From: Alan Mackenzie_JWA @ 2007-08-29  9:57 UTC (permalink / raw)
  To: Richard Stallman; +Cc: bug-cc-mode, acm, emacs-devel


[-- 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/

^ permalink raw reply	[flat|nested] 14+ messages in thread
[parent not found: <E1IMYuS-00059J-B8@fencepost.gnu.org>]

end of thread, other threads:[~2007-10-07  0:31 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-29  9:57 Compilation order. Help with makefiles, please! 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
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

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.