[Top][All Lists]

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

Re: Built-in target to delete all generated files

From: Peter Johansson
Subject: Re: Built-in target to delete all generated files
Date: Wed, 28 Apr 2010 09:27:47 -0400
User-agent: Thunderbird (X11/20090105)

Hi Trevor,

Trevor Harmon wrote:

My project lives in a source code repository (Subversion), and I'm trying to 
keep all generated files out of it. This would be easier if there were a 
built-in way of deleting anything and everything generated by Autotools. I 
could then run autoreconf to recreate them as needed.

I know about "make maintainer-clean", which does most of the job, but it still 
leaves some generated files around: aclocal.m4,, configure, depcomp, INSTALL, 
install-sh,, and missing.

Is there another makefile target (or any other built-in mechanism) that will 
delete ALL generated files?

You can extend maintainer-clean using either MANTAINERCLEANFILES or maintainer-clean-local as documented here

In that way you need to list all files you wanna have deleted. Another way, a more dangerous way I would say, is to use the script `svn-clean' which is provided by subversion. You can find it via subversion's homepage or download it from here

I used to add a rule for `svn-clean' with something like this:

svn-clean: maintainer-clean
$(PERL) $(top_srcdir)/build-aux/svn-clean $(srcdir)

'make svn-clean' would delete whatever maintainer-clean remioves followed by removing all files that are not committed to svn. I learnt that this is very dangerous and after a couple of accidents I decided to remove the target.

Of note, GCS states that: "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".


Peter Johansson

svndigest maintainer,
yat maintainer,

reply via email to

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