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>
# 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);
}