Randy Kao wrote:
> bash: doxygen: command not found
>
> or
>
> sh: doxygen: command not found
>
> Is there any easier way of accomplishing my end goal?
Searching for an error string is always a bad idea. What if
the user
has their locale set to display errors in German? You'd go
crazy trying
to search for all the different ways of saying "command
not found" in
every shell and every language.
It's not necessary either as the shell gives you a status
value when a
command fails to execute a command, which you can test e.g.
foo := $(shell doxygen --version >/dev/null 2>&1
&& echo "yes")
...will result in foo being "yes" if the command
was successful
otherwise blank. If you want yes/no then you can do
something like:
foo := $(shell if cmd; then echo yes; else echo no; fi)
Brian
_______________________________________________
Help-make mailing list
Help-make gnu.org
http:
//lists.gnu.org/mailman/listinfo/help-make
|