all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: rgm@gnu.org, emacs-devel@gnu.org
Subject: Re: Changes in lisp/Makefile.in to skip preloaded files
Date: Tue, 06 Oct 2009 11:25:53 +0200	[thread overview]
Message-ID: <8363asoov2.fsf@gnu.org> (raw)
In-Reply-To: <837hv9neza.fsf@gnu.org>

> Date: Tue, 06 Oct 2009 09:44:41 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: emacs-devel@gnu.org
> 
> > -autoloads: $(LOADDEFS) doit
> > +# The Makefile dependency is to make any missing-file error more explicit.
> > +autoloads: $(LOADDEFS) ../src/Makefile doit
> >  	chmod +w $(lisp)/ps-print.el $(lisp)/emulation/tpu-edt.el \
> >  	  $(lisp)/emacs-lisp/cl-loaddefs.el $(lisp)/mail/rmail.el \
> >  	  $(lisp)/dired.el $(lisp)/ibuffer.el
> >  	wd=$(lisp); $(setwins_almost); \
> >  	echo Directories: $$wins; \
> > -	$(emacs) -l autoload --eval '(setq generated-autoload-file "$(lisp)/loaddefs.el")' -f batch-update-autoloads $$wins
> > +	preload=`sed -n -e '/^lisp=/ s/$${lispsource}//g p' ../src/Makefile | \
> > +	  sed 's/^lisp= //'`; \
> > +	$(emacs) -l autoload --eval "(setq generated-autoload-file \"$(lisp)/loaddefs.el\" autoload-excludes \"$${preload}\")" -f batch-update-autoloads $$wins
> 
> src/Makefile gets recreated every time you run the configure script,
> so this change will now cause autoloads to appear out of date after
> every configure.  Is that what you really want?  Should autoloads
> depend on src/Makefile.in instead?
> 
> Similar with the preload= thing: why not run Sed on src/Makefile.in?
> src/Makefile could be botched by some snafu; why both the lisp
> directory on that behalf as well?

I think I see the reason for the latter: it's because src/Makefile.in
spells out $lisp spanned over many lines, whereas src/Makefile has
them all in the same line, which simplifies the job of th Sed script
to some extent.

Anyway, I cannot say that I like this solution.  In particular, it
cannot be ported to w32, because the list of preloaded files is too
long and overflows the max size of command lines on some Windows
systems (lib-src/makefile.w32-in breaks it into 3 lists for that very
reason).

I can think about 2 alternatives which are better (IMO):

  . Add to src/Makefile.in a new target `echolisp' which will simply
    run "@echo $(lisp)".  Then initialize autoload-excludes with
    something like (shell-command-to-string "make -C ../src echolisp").
    (This will probably need some tweaking on w32, because of the same
    limitation of command-line size, but that's much easier done than
    with the current approach.)

  . Modify loadup.el to map `load' over a list of files, instead of
    having multiple `(load FOO)' lines.  That is, replace each line
    now saying "(load FOO)" with "(add-to-list 'load-list FOO)"; then
    map `load' on the result when the list is complete.  With this
    approach, `load-list' will have the list of preloaded files ready
    for use by autoload.el.

WDYT?

P.S.  I generally find any Make or shell/Sed trickery misplaced in
Emacs Makefiles, since we have the full power of Emacs at our
fingertips.  Portability is one obvious advantage, but more
importantly, it sounds right, in the context of building Emacs, to use
Emacs itself wherever we can.  Otherwise, we appear as not believing
in the tool we are developing.  Don't you agree?




  reply	other threads:[~2009-10-06  9:25 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1Mv3iq-0005oI-5L@monty-python.gnu.org>
2009-10-06  7:44 ` Changes in lisp/Makefile.in to skip preloaded files Eli Zaretskii
2009-10-06  9:25   ` Eli Zaretskii [this message]
2009-10-06  9:33     ` Miles Bader
2009-10-06  9:42       ` Eli Zaretskii
2009-10-06 10:14         ` Miles Bader
2009-10-06 13:12           ` Dan Nicolaescu
2009-10-06 13:45             ` Dan Nicolaescu
2009-10-06 16:20             ` Glenn Morris
2009-10-06 16:50               ` Dan Nicolaescu
2009-10-06 15:28     ` Stefan Monnier
2009-10-06 16:16     ` Glenn Morris
2009-10-06 18:41       ` Eli Zaretskii
2009-10-07  3:00         ` Glenn Morris
2009-10-07  7:23           ` Glenn Morris
2009-10-07  9:23             ` Eli Zaretskii
2009-10-07 10:00               ` Juanma Barranquero
2009-10-07 16:16               ` Glenn Morris
2009-10-08 23:08                 ` Lennart Borgman
2009-10-08 23:31                   ` Juanma Barranquero
2009-10-08 23:34                     ` Lennart Borgman
2009-10-09  0:02                       ` Juanma Barranquero
2009-10-09  0:04                         ` Glenn Morris
2009-10-09  0:25                           ` Juanma Barranquero
2009-10-09 11:48                             ` Lennart Borgman
2009-10-10  0:50                 ` ignoring autoloads in preloaded files on Windows [was Re: Changes in lisp/Makefile.in to skip preloaded files] Glenn Morris
2009-10-10  2:27                   ` Juanma Barranquero
2009-10-10  3:34                     ` ignoring autoloads in preloaded files on Windows Glenn Morris
2009-10-10  3:57                       ` Juanma Barranquero
2009-10-10  4:17                         ` Juanma Barranquero
2009-10-10  4:19                           ` Juanma Barranquero
2009-10-10  5:13                           ` Juanma Barranquero
2009-10-10  7:37                             ` Eli Zaretskii
2009-10-13 19:16                               ` Stefan Monnier
2009-10-15  6:14                                 ` Glenn Morris
2009-10-10  7:32                         ` Eli Zaretskii
2009-10-10 11:51                           ` Juanma Barranquero
2009-10-10 13:16                             ` Eli Zaretskii
2009-10-10 21:17                               ` Glenn Morris
2009-10-11  2:02                                 ` Juanma Barranquero
2009-10-11  2:36                                   ` Glenn Morris
2009-10-11  2:44                                     ` Glenn Morris
2009-10-11  3:35                                     ` Juanma Barranquero
2009-10-11 14:04                                       ` Juanma Barranquero
2009-10-07  9:57             ` Changes in lisp/Makefile.in to skip preloaded files Eli Zaretskii
2009-10-07  9:15           ` Eli Zaretskii

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=8363asoov2.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=rgm@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.