summaryrefslogtreecommitdiff
path: root/dh_clean
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-04-23 21:16:09 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-04-23 21:16:09 -0400
commit30db799db6c5d66e635f03e74edc4b78215e9edd (patch)
treeca57abeb05d245c420582d74aa5f96371cc4b9ed /dh_clean
parent2527a1791638081e33445725367e586e567e6717 (diff)
dh_clean: In v7 mode, read debian/clean and delete all files listed therein.
Diffstat (limited to 'dh_clean')
-rwxr-xr-xdh_clean8
1 files changed, 8 insertions, 0 deletions
diff --git a/dh_clean b/dh_clean
index 88bc885..96b8113 100755
--- a/dh_clean
+++ b/dh_clean
@@ -25,6 +25,8 @@ debian diff:
It does not run "make clean" to clean up after the build process. Use
L<dh_auto_clean(1)> to do that.
+The debian/clean file can list other files to be removed.
+
=head1 OPTIONS
=over 4
@@ -81,6 +83,12 @@ if (! $dh{D_FLAG}) {
if (@ARGV) {
doit("rm","-f","--",@ARGV);
}
+
+ if (!compat(6) && -e "debian/clean") {
+ my @clean=grep { ! excludefile($_) }
+ filearray("debian/clean", ".");
+ doit("rm","-f","--",@clean) if @clean;
+ }
if (! $dh{K_FLAG}) {
doit("rm","-f","debian/files")