unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Recursive compilation?
@ 2011-05-31 20:44 Lars Magne Ingebrigtsen
  2011-05-31 21:52 ` Stefan Monnier
  2011-06-01 20:14 ` Dimitri Fontaine
  0 siblings, 2 replies; 16+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-05-31 20:44 UTC (permalink / raw)
  To: emacs-devel

Sometimes after doing a "bzr update", the Emacs Lisp files won't build
because a new macro is needed from a .el file, but the old .elc file
already exists, so it requires the .elc file, and fails compiling the
.el file, and I delete all the .elc files, and then build everything.

Which takes forever!

So I was wondering whether it would be feasible to compile required
files recursively.

Basically, I envision a function like `M-x
byte-compile-file-recursively' which would work just like the normal
one, but would instrument `require' to call
`byte-compile-file-recursively' on all files that it tries to load and
that are older than their .elc counterparts.

The obvious "gotcha" here is that one probably shouldn't try to
(recursively) byte-compile files in directories that we don't have write
access to.  So if somebody has set their load-path to my directory, and
I have an old .elc file there, then this function shouldn't try to
compile that file, too.

The other caveat is that Makefiles typically first mark all files that
are to be compiled, and then compile them.  This would then possibly
lead to some files being compiled twice.  However, that could be worked
around by `byte-compile-file-recursively' not compiling a file that it's
been asked to compile if the .elc file is newer than the .el file.

So...

I have a feeling that this won't be very difficult to implement, but it
needs meddling with the C layer, since `require' is a C function.  But I
think it would make compiling Emacs after a "bzr update" a lot less
likely to break.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2011-06-09 17:51 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-31 20:44 Recursive compilation? Lars Magne Ingebrigtsen
2011-05-31 21:52 ` Stefan Monnier
2011-05-31 22:17   ` Lars Magne Ingebrigtsen
2011-06-01  1:38     ` Stefan Monnier
2011-06-01 11:48       ` Lars Magne Ingebrigtsen
2011-06-01 20:14 ` Dimitri Fontaine
2011-06-03 21:55   ` Lars Magne Ingebrigtsen
2011-06-04  6:29     ` Eli Zaretskii
2011-06-04 15:54       ` Lars Magne Ingebrigtsen
2011-06-04 16:08         ` Eli Zaretskii
2011-06-04 17:50           ` Glenn Morris
2011-06-06 20:05           ` Stefan Monnier
2011-06-09 17:51             ` Lars Magne Ingebrigtsen
2011-06-04 17:48         ` Glenn Morris
2011-06-06 20:46     ` Dimitri Fontaine
2011-06-07  0:23       ` Daniel Colascione

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).