]> git.donarmstrong.com Git - debhelper.git/commitdiff
cmake build+ steps need Makefile.
authorModestas Vainius <modestas@vainius.eu>
Thu, 19 Nov 2009 18:58:39 +0000 (20:58 +0200)
committerJoey Hess <joey@gnu.kitenet.net>
Thu, 19 Nov 2009 19:52:14 +0000 (14:52 -0500)
The condition is not what dh_auto_* 7.0.x would have done. The
patch makes auto-selection to pass through cmake.pm if Makefile
was not created. This problem is not very dangerous though.

Debian/Debhelper/Buildsystem/cmake.pm
t/buildsystems/buildsystem_tests

index ee90c1f9122814761db5decd5e5383f5b82e11b5..24f486fc27329e1acf54d9839c7a513b3dcd581c 100644 (file)
@@ -17,12 +17,13 @@ sub check_auto_buildable {
        my $this=shift;
        my ($step)=@_;
        if (-e $this->get_sourcepath("CMakeLists.txt")) {
-               my $ret = $this->SUPER::check_auto_buildable(@_);
+               my $ret = ($step eq "configure" && 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
                # instead of the parent makefile class.
                $ret++ if ($ret && -e $this->get_buildpath("CMakeCache.txt"));
-               return $ret > 0 ? $ret : 1;
+               return $ret;
        }
        return 0;
 }
index e19ab5ded06cdf052c83af5b769426b9cfa37e63..d8619fc18c3f45a369788a6ea82285d742d69207 100755 (executable)
@@ -256,7 +256,7 @@ touch "$tmpdir/configure", 0755;
 test_check_auto_buildable($bs{autoconf}, "configure", { configure => 1 });
 
 touch "$tmpdir/CMakeLists.txt";
-test_check_auto_buildable($bs{cmake}, "CMakeLists.txt", 1);
+test_check_auto_buildable($bs{cmake}, "CMakeLists.txt", { configure => 1 });
 
 touch "$tmpdir/Makefile.PL";
 test_check_auto_buildable($bs{perl_makemaker}, "Makefile.PL", { configure => 1 });