]> git.donarmstrong.com Git - debhelper.git/commitdiff
Ensure make doesn't print directories when checking for target existance.
authorModestas Vainius <modestas@vainius.eu>
Thu, 11 Jun 2009 15:17:36 +0000 (18:17 +0300)
committerModestas Vainius <modestas@vainius.eu>
Thu, 11 Jun 2009 15:17:36 +0000 (18:17 +0300)
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 <modestas@vainius.eu>
Debian/Debhelper/Buildsystem/makefile.pm

index 4724440871ed4e93fc73371b7e0b7f844e4a25c2..6a9e68778d25d4c973f3c82e7e8864282e097cd6 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 $target 2>/dev/null`;
+       my $ret=`$makecmd -s -n --no-print-directory $target 2>/dev/null`;
        chomp $ret;
        return length($ret);
 }