Subject: Re: bug#32074: maintainer-clean and removing configure/Makefile.in/etc.

From: Mathieu Lirzin <[email-masked]>
Date: Sun, 08 Jul 2018 00:30:33 +0200

Karl Berry <[email-masked]> writes:

>     What is not clear to me is the reasoning of that heuristic.  You seems
>     to suggest that it has been introduced to avoid having to know the order
>     in which autoconf, aclocal, automake, ... has to be run.  Have you any
>     reference regarding that?
>
> I've been looking through my old mail about this. I can't reconstruct
> the whole trail, but this message from rms to me seems to be the crux of
> the "don't delete configure" special case (this is the whole message and
> I have no other direct context, but still).
>
>   Date: Sat, 19 Sep 92 23:42:28 -0400
>   From: [email-masked] (Richard Stallman)
>   To: [email-masked]
>   Subject: realclean: rm configure
>
>   You can't reconstruct configure with the makefile
>   if there is no configure.
>
> That was true in 1992 (no autoreconf :), but is routinely not true
> today.
>
> Francois, Tom Tromey, Akim Demaille, Jim Meyering, I, and others were
> going through many iterations of what should be deleted in which target
> in those years. I can't pin down the exact source of that heuristic
> though.

Thanks for the context.

>     I would guess that the reason is more that this command might be run
>     from a tarball 
>
> I don't see why that's an issue. If an installer runs maintainer-clean
> after unpacking a tarball, they are responsible for their own actions.
> That's why the target is named *maintainer*-clean :).
>     
> https://www.gnu.org/prep/standards/html_node/Standard-Targets.html
> talks about this in explicit detail. (It also implies that Makefile.in
> files should be deleted, by the way. Hmm.)

“More generally, ‘make maintainer-clean’ should not delete anything that
needs to exist in order to run configure and then begin to build the
program”

This seems to imply that Makefile.in should be kept, no?

>     and that if the package builder doesn't know that Autotools is now
>     needed as a dependency, that person is left without any instruction
>
> There are always instructions ...

What I meant is that ‘./configure’ output can't help that use with an helpful
error anymore.  But as you pointed above this is the user responsability.

>     Can you explain why this step would be too much for you?
>
> Because I might (and usually do) have newer versions of the common files
> than what missing would copy (ie, updated since the last Automake
> release). Regardless, if you want to put build-aux (or whatever) into
> the example in the manual, I don't object.

Makes sense.  I just wanted to understand.  :-)

I think Automake shouldn't suggest something that is explicitly
discouraged by the GCS. After reading the GCS link you gave, the
suggestion of adding “configure” and other files to MAINTAINERCLEANFILES
seems to contradict with it.

I am personnaly not against your suggestion as long as it matches the
GCS recommandation.  So I would suggest discussing it on
<[email-masked]> or <[email-masked]> to see if others
agree that GCS is outdated in that regard before modifying the Automake
manual.  WDYT?

-- 
Mathieu Lirzin
GPG: F2A3 8D7E EB2B 6640 5761  070D 0ADE E100 9460 4D37