diff options
author | Modestas Vainius <modestas@vainius.eu> | 2009-11-19 20:58:39 +0200 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2009-11-19 14:52:14 -0500 |
commit | 25d57ca95f7571e13dbba4a0ae82c43d5e0e5a06 (patch) | |
tree | 29562b57dade5f82710da21031a4a4e840592d7c | |
parent | b473ba8f7c4eb5084c71362b4e04133dda3e62ec (diff) |
cmake build+ steps need Makefile.
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.
-rw-r--r-- | Debian/Debhelper/Buildsystem/cmake.pm | 5 | ||||
-rwxr-xr-x | t/buildsystems/buildsystem_tests | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/Debian/Debhelper/Buildsystem/cmake.pm b/Debian/Debhelper/Buildsystem/cmake.pm index ee90c1f9..24f486fc 100644 --- a/Debian/Debhelper/Buildsystem/cmake.pm +++ b/Debian/Debhelper/Buildsystem/cmake.pm @@ -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; } diff --git a/t/buildsystems/buildsystem_tests b/t/buildsystems/buildsystem_tests index e19ab5de..d8619fc1 100755 --- a/t/buildsystems/buildsystem_tests +++ b/t/buildsystems/buildsystem_tests @@ -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 }); |