Created
August 2, 2015 08:38
-
-
Save jpluimers/256df9d421016c56aeeb to your computer and use it in GitHub Desktop.
Perl: testing for makedepend to exist without using File::Where
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://perldoc.perl.org/perlop.html#Quote-Like-Operators | |
# ensure to take the stdout and stderror so we get output like this: | |
# 'makedepend: error: cannot open "Makefile.makedepend" | |
#'. | |
my $makedepend_output = `makedepend -f Makefile.makedepend 2>&1`; | |
if (!$makedepend_output) | |
{ | |
print "No makedepend executable found on your path.\n"; | |
} | |
else | |
{ | |
print "Output of makedepend: '$makedepend_output'.\n"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment