X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=dh_clean;h=bc5bc579074873f3fcc3fb3f6c9b4887a3818277;hb=c77e9d08ced12f8180a3f1c173570cbfe569c2da;hp=2ef3ba38a9c56f29465a11f2320e1a8d801a4e58;hpb=57834b0010aa942681c289e01ffc09030ed17ce2;p=debhelper.git diff --git a/dh_clean b/dh_clean index 2ef3ba3..bc5bc57 100755 --- a/dh_clean +++ b/dh_clean @@ -23,9 +23,20 @@ debian diff: #*# *~ DEADJOE *.orig *.rej *.SUMS TAGS .deps/* *.P *-stamp It does not run "make clean" to clean up after the build process. Use -L to do that. +L to do things like that. -The debian/clean file can list other files to be removed. +dh_clean (or "dh clean") should be the last debhelper command run in the +clean target in debian/rules. + +=head1 FILES + +=over 4 + +=item debian/clean + +Can list other files to be removed. + +=back =head1 OPTIONS @@ -33,8 +44,7 @@ The debian/clean file can list other files to be removed. =item B<-k>, B<--keep> -This causes L to be run instead of dh_clean, for backwards -compatibility. +This is deprecated, use L instead. =item B<-d>, B<--dirs-only> @@ -55,7 +65,9 @@ Delete these files too. =cut -init(); +init(options => { + "dirs-only" => \$dh{D_FLAG}, +}); inhibit_log(); if ($dh{K_FLAG}) { @@ -119,7 +131,7 @@ if (! $dh{D_FLAG}) { doit('rm', '-rf', 'debian/tmp') if -x 'debian/tmp' && ! compat(1) && ! excludefile("debian/tmp"); -if (!compat(6)) { +if (!compat(6) && !$dh{K_FLAG}) { complex_doit('rm -f *-stamp'); }