Hi Trevor,
Trevor Harmon wrote:
Hi,
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, config.h.in, configure, depcomp, INSTALL,
install-sh, Makefile.in, 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
http://www.gnu.org/software/automake/manual/automake.html#Clean
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
http://dev.thep.lu.se/yat/svn/tags/0.5/build_support/svn-clean
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".
Cheers,
Peter
--
Peter Johansson
svndigest maintainer, http://dev.thep.lu.se/svndigest
yat maintainer, http://dev.thep.lu.se/yat