Discussion:
autoloads only generated on every 2nd make
Tassilo Horn
2014-11-20 07:20:16 UTC
Permalink
Hi all,

I use the Gnus git version which I updated daily with

cd gnus/
git pull && make

Since recently, when I start emacs I get the error

File error: Cannot open load file, no such file or directory,
gnus-load

and indeed, there's no gnus/lisp/gnus-load.el.

When I run make a second time, the autoloads are generated just fine.
With another make, gnus-load.el is deleted again but autoloads aren't
regenerated.

The problem is that gnus/lisp/Makefile's default "all total" target
requires the targets clean-some and gnus-load.el. When I do that on the
command line, I first get

% make clean-some gnus-load.el
rm -f *.elc gnus-load.el auto-autoloads.* custom-load.*
lispdir="/home/horn/share/emacs/site-lisp/gnus" srcdir=. emacs -batch -q -no-site-file -l ./dgnushack.el -f dgnushack-make-cus-load .
...
Generating autoloads for assistant.el...
...
Saving file /home/horn/Repos/el/gnus/lisp/gnus-load.el...
...

which is all fine. But when I do it again, I get

% make clean-some gnus-load.el
rm -f *.elc gnus-load.el auto-autoloads.* custom-load.*
make: 'gnus-load.el' is up to date.

Huh? How can gnus-load.el by up to date? You've just deleted it...

I can't see any changes in Gnus' Makefile.ins, so it might also be a
problem with GNU make itself. That has been updated to 4.1 on 6th
November which could be the beginning of the problem although I feel
that it started more recently than that...

Any ideas welcome!

Bye,
Tassilo
Lars Ingebrigtsen
2015-01-26 04:13:28 UTC
Permalink
Post by Tassilo Horn
% make clean-some gnus-load.el
rm -f *.elc gnus-load.el auto-autoloads.* custom-load.*
make: 'gnus-load.el' is up to date.
Huh? How can gnus-load.el by up to date? You've just deleted it...
Huh. That does seem odd.
Post by Tassilo Horn
I can't see any changes in Gnus' Makefile.ins, so it might also be a
problem with GNU make itself. That has been updated to 4.1 on 6th
November which could be the beginning of the problem although I feel
that it started more recently than that...
I'm not seeing this myself, and I don't really understand the autoconf
stuff in depth...
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
Tassilo Horn
2015-01-26 07:15:56 UTC
Permalink
Post by Lars Ingebrigtsen
Post by Tassilo Horn
% make clean-some gnus-load.el
rm -f *.elc gnus-load.el auto-autoloads.* custom-load.*
make: 'gnus-load.el' is up to date.
Huh? How can gnus-load.el by up to date? You've just deleted it...
Huh. That does seem odd.
Post by Tassilo Horn
I can't see any changes in Gnus' Makefile.ins, so it might also be a
problem with GNU make itself. That has been updated to 4.1 on 6th
November which could be the beginning of the problem although I feel
that it started more recently than that...
I'm not seeing this myself, and I don't really understand the autoconf
stuff in depth...
This is still absolute reproducible here even with a complete fresh
checkout. "make clean-some gnus-load.el" in gnus/lisp/ alternates
between

--8<---------------cut here---------------start------------->8---
rm -f *.elc gnus-load.el auto-autoloads.* custom-load.*
lispdir="/home/horn/share/emacs/site-lisp/gnus" srcdir=. emacs -batch -q -no-site-file -l ./dgnushack.el -f dgnushack-make-cus-load .
Loading cus-dep...
Directory .
Generating cus-load.el...
Generating cus-load.el...done
lispdir="/home/horn/share/emacs/site-lisp/gnus" srcdir=. emacs -batch -q -no-site-file -l ./dgnushack.el -f dgnushack-make-auto-load .
lispdir="/home/horn/share/emacs/site-lisp/gnus" srcdir=. emacs -batch -q -no-site-file -l ./dgnushack.el -f dgnushack-make-load
Generating /home/horn/tmp/gnus/lisp/gnus-load.el...
Compiling /home/horn/tmp/gnus/lisp/gnus-load.el...
--8<---------------cut here---------------end--------------->8---

and

--8<---------------cut here---------------start------------->8---
rm -f *.elc gnus-load.el auto-autoloads.* custom-load.*
make: 'gnus-load.el' is up to date.
--8<---------------cut here---------------end--------------->8---

Oh, what works is if I rename the gnus-load.el target to gnus-load.elx.
It seems that my make version behaves differently than previous versions
when a target is named like a file...

I'll go investigating with the make guys.

Bye,
Tassilo
Tassilo Horn
2015-01-26 15:14:10 UTC
Permalink
Post by Tassilo Horn
I'll go investigating with the make guys.
Ok, the problem was that make uses a file cache which does not get
updated if a recipe deletes files that have nothing to do with the
target. Thus with "make clean-some gnus-load.el" make's cache still
thinks gnus-load.el exists and is up-to-date if it has been so before
clean-some.

I've committed a fix which uses recursive make calls for the
gnus-load.el target so that this is always executed with a file cache
reflecting the actual situation on the file system [1].

Bye,
Tassilo

[1] Oh, and sorry for the second commit completing the ChangeLog entry
and the non-ChangeLog formatted commit message in the first commit.
Loading...