Package: debhelper
Version: 8.9.1
Tags: patch
Hello all,
I'm facing the same issue for a personal project.
In the correct run, debhelper detect the clean phase as a makefile
build. However in our case the Makefile did not exist. The logic to
detect the cmake build is only enabled during the configure phase. So
debhelper fails to detect the build system.
I attach a small patch to change the behavior. I do a quick test and
seem to be fine.
1/ It enable the detection of the cmake build system during the clean
phase.
2/ I copy past the clean function from makefile.pm to cmake.pm.
Hope it help.
Best regards,
Gregory
--- /usr/share/perl5/Debian/Debhelper/Buildsystem/cmake.pm 2011-07-20 23:11:12.000000000 +0200
+++ /root/cmake.pm 2011-07-20 23:11:05.000000000 +0200
@@ -17,7 +17,7 @@
my $this=shift;
my ($step)=@_;
if (-e $this->get_sourcepath("CMakeLists.txt")) {
- my $ret = ($step eq "configure" && 1) ||
+ my $ret = ($step eq "configure" && 1) || ($step eq "clean" && 1) ||
$this->SUPER::check_auto_buildable(@_);
# Existence of CMakeCache.txt indicates cmake has already
# been used by a prior build step, so should be used
@@ -62,4 +62,11 @@
return $this->SUPER::test(@_);
}
+sub clean {
+ my $this=shift;
+ if (!$this->rmdir_builddir()) {
+ $this->make_first_existing_target(['distclean', 'realclean', 'clean'], @_);
+ }
+}
+
1