]> git.donarmstrong.com Git - debhelper.git/blobdiff - dh_auto_clean
Merge branch 'master' into buildsystems
[debhelper.git] / dh_auto_clean
index 4468fef9ca3d25ce9c8dc45a1644c3c3a3b8b316..1b7d46cd4abcc35e81e0d2d35e4c690d9c6207f6 100755 (executable)
@@ -7,7 +7,7 @@ dh_auto_clean - automatically cleans up after a build
 =cut
 
 use strict;
-use Debian::Debhelper::Dh_Lib;
+use Debian::Debhelper::Dh_Buildsystems;
 
 =head1 SYNOPSIS
 
@@ -31,34 +31,15 @@ dh_auto_clean at all, and just run make clean manually.
 
 =item B<--> I<params>
 
-Pass "params" to the program that is run. These can be used to suppliment
+Pass "params" to the program that is run. These can be used to supplement
 or override the any standard parameters that dh_auto_clean passes.
 
 =back
 
 =cut
 
-init();
-
-if (-e "Makefile" || -e "makefile" || -e "GNUmakefile") {
-       $ENV{MAKE}="make" unless exists $ENV{MAKE};
-       foreach my $target (qw{distclean realclean clean}) {
-               # Use make -n to check to see if the target would do
-               # anything. There's no good way to test if a target exists.
-               my $ret=`$ENV{MAKE} -s -n $target 2>/dev/null`;
-               chomp $ret;
-               if (length $ret) {
-                       doit($ENV{MAKE}, $target, @{$dh{U_PARAMS}});
-                       last;
-               }
-       }
-}
-elsif (-e "setup.py") {
-       doit("python", "setup.py", "clean", "-a", @{$dh{U_PARAMS}});
-}
-elsif (-e "Build.PL" && -e "Build") {
-       doit("perl", "Build", "--allow_mb_mismatch", 1, "distclean", @{$dh{U_PARAMS}});
-}
+buildsystems_init();
+buildsystems_do();
 
 =head1 SEE ALSO