]> git.donarmstrong.com Git - debhelper.git/blobdiff - Debian/Debhelper/Buildsystem/makefile.pm
make: Avoid infinite loop that occurrs when testing existence of a target in a certia...
[debhelper.git] / Debian / Debhelper / Buildsystem / makefile.pm
index 083abc4293cd7c39b07972e5b9bc0dfc622619a4..47814296b342c30fd14c9671130a665907bbbd39 100644 (file)
@@ -25,7 +25,7 @@ sub exists_make_target {
 
        # 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=`$makecmd -s -n --no-print-directory $target 2>/dev/null`;
+       my $ret=`$makecmd -s -n --no-print-directory $target 2>/dev/null | head -n 1`;
        chomp $ret;
        return length($ret);
 }