From: Modestas Vainius Date: Thu, 11 Jun 2009 15:17:36 +0000 (+0300) Subject: Ensure make doesn't print directories when checking for target existance. X-Git-Tag: 7.3.0~57 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=4e364add6f7e61d7915d62ab031d681529d5032a;p=debhelper.git Ensure make doesn't print directories when checking for target existance. Whenever make is run with --print-directory option, make -C sometimes print Entering/Leaving directory messages to stdout even with -s in effects This breakes a check for target existance as it relies on make printing nothing when target does not do anything. Hence explicitly pass --no-print-directory to make to avoid it. Signed-off-by: Modestas Vainius --- diff --git a/Debian/Debhelper/Buildsystem/makefile.pm b/Debian/Debhelper/Buildsystem/makefile.pm index 4724440..6a9e687 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 $target 2>/dev/null`; + my $ret=`$makecmd -s -n --no-print-directory $target 2>/dev/null`; chomp $ret; return length($ret); }