From e275962725279a6254bddf55b11d16c8ddd65c9c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 21 Nov 2009 13:33:33 -0500 Subject: make: Avoid infinite loop that occurrs when testing existence of a target in a certian horribly broken makefile by making the test stop after it sees one line of output from make. (This may be better replaced with dh's makefile parser in the future.) --- Debian/Debhelper/Buildsystem/makefile.pm | 2 +- debian/changelog | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Debian/Debhelper/Buildsystem/makefile.pm b/Debian/Debhelper/Buildsystem/makefile.pm index 083abc42..47814296 100644 --- a/Debian/Debhelper/Buildsystem/makefile.pm +++ b/Debian/Debhelper/Buildsystem/makefile.pm @@ -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); } diff --git a/debian/changelog b/debian/changelog index 47d08c7a..7a3fefe0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +debhelper (7.4.7) UNRELEASED; urgency=low + + * make: Avoid infinite loop that occurrs when testing existence of a target + in a certian horribly broken makefile, by making the test stop after + it sees one line of output from make. (This may be better replaced with + dh's makefile parser in the future.) Closes: #557307 + + -- Joey Hess Sat, 21 Nov 2009 13:29:01 -0500 + debhelper (7.4.6) unstable; urgency=low * Update --list to reflect buildsystem autoselection changes. -- cgit v1.2.3