[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


From: Behdad Esfahbod
Subject: Re: MAINTAINERCLEANFILES for autotools
Date: Tue, 16 Sep 2008 18:23:16 -0400
User-agent: Thunderbird (X11/20080501)

Ralf Wildenhues wrote:
> Hello Behdad,

Hi again,

Thanks for the quick replies as always, Ralf.

> Thanks for the report.
> * Behdad Esfahbod wrote on Mon, Sep 15, 2008 at 09:57:20PM CEST:
>>   * automake should generate rules to add Makefile.in to 
>>   * automake should generate rules to add config.cache to DISTCLEANFILES.
>>   * automake/aclocal/autoheader/libtool/* should cause automake to generate
>> rules to add the following files to MAINTAINERCLEANFILES for toplevel dir:
> [...]
>> I personally also include configure.scan in the list.
>> Where build/ is the directory passed to AC_CONFIG_AUX_DIR.
> This topic has come up before.  There is general agreement that there
> should be a simple way to remove all these files; whether through
> maintainer-clean, distclean, or a bootstrap-clean or some other method,
> is a technical detail (more important for the implementor than the
> user).
> Benoit started working on bootstrap cleaning a while ago, but that
> work has stalled.  One problem is that it is surprisingly difficult
> to remove all files correctly in all the different setups that autotools
> support, in such a way that 'make' both finishes cleanly, and doesn't
> cause any autotools reruns on the way.  That's why this doesn't exist
> yet.  We'll revisit this some time, can't say when though.

I fully understand how tricky it gets.

Re maintainer-clean vs bootstrap-clean, the most common understanding I've
seen (and have personally always assumed is):

  - clean removes all files generated by make but not by configure
  - distclean removes all files not in the tarball
  - maintainer-clean removes all files not in cvs/svn/git, which includes all
bootstrap-generated files as well as any generated-distributed files.

Now if you add bootstrap-clean I easily get what I want by a simple:

maintainer-clean: bootstrap-clean

Or that can be done by default.

>> Aside from those, I also find it bothersome to have to list all Makefile.in's
>> in configure.ac where it should actually be somehow generated from
>> Makefile.am's DIST_SUBDIRS itself (is that what automake uses?).
> DIST_SUBDIRS is created from SUBDIRS by default.  The listing in
> configure.ac is to create Makefile from Makefile.in, the SUBDIRS
> listing is to do the traversal.  I agree that it's most often
> duplicated work, but in principle it isn't necessary that all
> Makefiles are created from Makefile.am or even Makefile.in files.
> To allow for this flexibility, means some redundancy.

I know what you mean, but it can be smarter.  Autotools is already very smart
about which files to distribute (all files included from configure.ac or
Makefile.am are automatically distributed) and clean (all files generated by
configure are automatically cleaned in distclean).

What I'm saying is, when automake generates Makefile.in from Makefile.am, it's
clear that that Makefile.in will be processed by configure to generate
Makefile.  Right?  Or is there any useful scenario that doesn't do that?
Automake should automatically AC_CONFIG_FILES() those Makefile's.  For other
Makefile.in's, it's up to the user to list them.

> Cheers,
> Ralf



reply via email to

[Prev in Thread] Current Thread [Next in Thread]