Skip to content

Instantly share code, notes, and snippets.

@jpluimers
Created August 2, 2015 08:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jpluimers/256df9d421016c56aeeb to your computer and use it in GitHub Desktop.
Save jpluimers/256df9d421016c56aeeb to your computer and use it in GitHub Desktop.
Perl: testing for makedepend to exist without using File::Where
# 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