[Top][All Lists]

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

mostlyclean and texinfo outputs (was: Installing gnulib from git)

From: Ralf Wildenhues
Subject: mostlyclean and texinfo outputs (was: Installing gnulib from git)
Date: Fri, 3 Apr 2009 07:19:50 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

[ adding bug-automake ]

Hello Bruno,

* Bruno Haible wrote on Thu, Apr 02, 2009 at 01:03:31PM CEST:
> 'mostlyclean' cleans all files that are created by "make", except those
> that people normally want to keep. It's the target people are meant to
> invoke when they see "There's too much clutter in this directory".
> This is what doc/Makefile does.

Yet, conceptually it is awkward to do file creation and file removal in
one step.

> By comparison, the automake generated gettext/gettext-tools/doc/Makefile
> does this:
> $ make -n mostlyclean
> rm -rf gettext.am gettext.ams gettext.aux gettext.cp gettext.cps gettext.ef \
>           gettext.em gettext.ems gettext.ev gettext.fn gettext.kw \
>           gettext.ky gettext.kys gettext.log gettext.op gettext.ops \
>           gettext.pg gettext.pgs gettext.tmp gettext.toc gettext.tp \
>           gettext.tps gettext.vr gettext.vrs gettext.dvi gettext.pdf \
>           gettext.ps gettext.html

> So, it removes the temporary files and also the {html,dvi,ps,pdf} formatted
> documentation but keeps the info formatted documentation. Why does it treat
> the various formats differently?

One part is easily explained: info is not removed with 'mostlyclean' nor
with 'clean', but only with 'maintainer-clean', because info files are

> For the {dvi,ps} formats this is (arguably) a bug in automake,

I agree; automake should remove {html,dvi,ps,pdf} only upon 'clean', but
not upon 'mostlyclean'.  Only the latex by-products should be removed
upon 'mostlyclean'.

> > A doc-*creation* rule like "make info" that automatically runs any
> > "clean"-like rule would seem to violate the principle of least surprise.
> In contrary, a "make info" rule that creates other files out of the blue,
> than the actual info files, and does not remove them, violates the principle
> of least surprise. Which is acceptable for a experienced user, but unwanted
> for a casual user like Reuben Thomas who looked around how he could create
> the documentation.

Well, that bit is not any different from the compiler creating object
file intermediates.  Nobody wants them removed by default.  I would not
want the latex by-products removed by default either: their presence
allows faster rebuilds of the outputs.  (Of course, for gnulib/Makefile
this is not all that important, but for automake-generated rules it is.)

Cheers, and thanks for the report,

reply via email to

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