Cleaning .x and .y files
duncan.coutts at worc.ox.ac.uk
Tue Oct 17 16:32:28 EDT 2006
On Tue, 2006-10-17 at 16:40 +0100, Ian Lynagh wrote:
> Hi all,
> I think Duncan has already said that we need a way to have .x and .y
> files included in sdists, but we also need a clean variant or flag that
> doesn't clean them. Apologies if this has also already been pointed out
> and I missed it.
As an example, automake based systems have several levels of clean.
I'm not suggesting we need all of these, but it's prior art to consider.
It's talking about makefiles of course.
Delete all files in the current directory that are normally
created by building the program. Also delete files in other
directories if they are created by this makefile. However, don't
delete the files that record the configuration. Also preserve
files that could be made by building, but normally aren't
because the distribution comes with them. There is no need to
delete parent directories that were created with ‘mkdir -p’,
since they could have existed anyway.
Delete .dvi files here if they are not part of the
Delete all files in the current directory (or created by this
makefile) that are created by configuring or building the
program. If you have unpacked the source and built the program
without creating any other files, ‘make distclean’ should leave
only the files that were in the distribution. However, there is
no need to delete parent directories that were created with
‘mkdir -p’, since they could have existed anyway.
Like ‘clean’, but may refrain from deleting a few files that
people normally don't want to recompile. For example, the
‘mostlyclean’ target for GCC does not delete libgcc.a, because
recompiling it is rarely necessary and takes a lot of time.
Delete almost everything that can be reconstructed with this
Makefile. This typically includes everything deleted by
distclean, plus more: C source files produced by Bison, tags
tables, Info files, and so on.
The reason we say “almost everything” is that running the
command ‘make maintainer-clean’ should not delete configure even
if configure can be remade using a rule in the Makefile. 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. Also, there is no need to delete parent
directories that were created with ‘mkdir -p’, since they could
have existed anyway. These are the only exceptions;
maintainer-clean should delete everything else that can be
The ‘maintainer-clean’ target is intended to be used by a
maintainer of the package, not by ordinary users. You may need
special tools to reconstruct some of the files that ‘make
maintainer-clean’ deletes. Since these files are normally
included in the distribution, we don't take care to make them
easy to reconstruct. If you find you need to unpack the full
distribution again, don't blame us.
To help make users aware of this, the commands for the special
maintainer-clean target should start with these two:
@echo 'This command is intended for maintainers to use; it'
@echo 'deletes files that may need special tools to rebuild.'
More information about the cabal-devel