unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Magne Ingebrigtsen <larsi@gnus.org>
To: emacs-devel@gnu.org
Subject: Recursive compilation?
Date: Tue, 31 May 2011 22:44:09 +0200	[thread overview]
Message-ID: <m362oq7g86.fsf@quimbies.gnus.org> (raw)

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/




             reply	other threads:[~2011-05-31 20:44 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-31 20:44 Lars Magne Ingebrigtsen [this message]
2011-05-31 21:52 ` Recursive compilation? 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

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=m362oq7g86.fsf@quimbies.gnus.org \
    --to=larsi@gnus.org \
    --cc=emacs-devel@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).