=head1 NAME
makeppclean -- Stand-alone cleanup script
for
makepp
=
for
vc
$Id
: makeppclean.pod,v 1.13 2012/02/07 22:26:15 pfeiffer Exp $
=head1 DESCRIPTION
=
for
genindex
'[-$][-?\w]+'
makeppclean.pod
B<?:>E<nbsp>L<-?|/_>,E<nbsp>
B<A:>E<nbsp>L<-A|/a_filename>,
L<--args-file|/a_filename>,
L<--arguments-file|/a_filename>,E<nbsp>
B<B:>E<nbsp>L<-b|/b>,
L<--build-cache-links|/b>,E<nbsp>
B<D:>E<nbsp>L<-d|/d>,E<nbsp>
B<E:>E<nbsp>L<--empty-directories|/d>,E<nbsp>
B<H:>E<nbsp>L<-h|/_>,
L<--help|/_>,E<nbsp>
B<K:>E<nbsp>L<-k|/k>,
L<--keep-src-info|/k>,E<nbsp>
B<L:>E<nbsp>L<-l|/l>,
L<--leave-src-info|/k>,
L<--
log
|/l>,E<nbsp>
B<M:>E<nbsp>L<-m|/m>,
L<--makepp|/m>,
L<
$MAKEPPCLEANFLAGS
|/_makeppcleanflags>,
L<--meta|/m>,E<nbsp>
B<O:>E<nbsp>L<--only-build-cache-links|/b>,
L<--only-logs|/l>,
L<--only-meta|/m>,
L<--only-repository-links|/r>,E<nbsp>
B<R:>E<nbsp>L<-R|/r>,
L<-r|/r>,
L<--recurse|/r>,
L<--recursive|/r>,
L<--repository-links|/r>,E<nbsp>
B<V:>E<nbsp>L<-V|/v>,
L<-v|/v>,
L<--verbose|/v>,
L<--version|/v>
B<makeppclean> S<[ -b ]> S<[ -l ]> S<[ -R ]> S<[ -r ]> S<[ -v ]> S<[ I<path> ... ]>
B<mppc> S<[ -b ]> S<[ -l ]> S<[ -R ]> S<[ -r ]> S<[ -v ]> S<[ I<path> ... ]>
Makeppclean efficiently removes files that were knowingly generated through
makepp. For
each
I<path>,
if
I<path> is not a directory and was known to be
generated by makepp by virtue of having a build info file
with
a matching
signature, then remove I<path> and its build info file; and
if
I<path> is a
directory,
do
the same
for
every file in I<path>, and then remove the build
info directory below I<path>. I<path> defaults to
"."
.
The traditional approach to removing generated files is to create a C<clean>
target in your makefiles whose action is to remove all of the targets.
This approach
has
some fundamental limitations:
=over 2
=item *
It requires that all the relevant makefiles be loaded
before
cleaning. This
can take quite a
while
.
=item *
If the clean target in one makefile depends on the clean target in another
makefile, then it is possible that a file that must be built in order to
load one of the makefiles (e.g. because of a prebuild statement)
has
already
been built and cleaned by the
time
it needs to be built again. Makepp wisely
fails in this situation, rather than potentially building the same file many
times
during the course of a single build.
=back
Provided that your intention is to remove all the generated files without
regard
for
which makefile (
if
any) currently generates them, then these
limitations are avoided by using makeppclean.
=head1 OPTIONS
=over 4
=item -A I<filename>
=item --args-file=I<filename>
=item --arguments-file=I<filename>
Read the file and parse it as possibly quoted whitespace- and/or newline-separated options.
=item -b
=item --build-cache-links
=item --only-build-cache-links
Remove only links or files from a build cache.
=item -d
=item --empty-directories
Remove directories that became empty
after
removing their content. Since
directories are not usually created by rules, makepp does not keep track of
which one it created. Therefore this applies to those, where makepp created
something, whether the directory was created manually or automatically.
=item -?
=item -h
=item --help
Print out a brief summary of the options.
=item -k
=item --keep-src-info
=item --leave-src-info
Leave the build info directory below
each
named directory.
=item -l
=item --
log
=item --only-logs
Remove only the raw logfiles, which can be many in case of traditional
recursion.
=item -m
=item --meta
=item --only-meta
=item --makepp
Remove only the meta information subdirectories.
=item -R
=item --repository-links
=item --only-repository-links
Remove only links pointing to a repository.
=item -r
=item --recurse
=item --recursive
Descend
each
named directory recursively. Symbolic links are not followed.
=item -v
=item --verbose
Enable verbose output to STDERR.
=item -V
=item --version
Print out the version number.
=back
=head1 ENVIRONMENT
Makeppclean looks at the following environment variable:
=over 4
=item
$MAKEPPCLEANFLAGS
Any flags in this environment variable are interpreted as command line options
before
any explicit options. Quotes are interpreted like in makefiles.
=back
=head1 AUTHOR
Anders Johnson <anders
@ieee
.org>