Is there an efficient way to suppress the error output of the shell
in the $(shell) function?

In the conditional below, the command foo may not exist. I would like
to silence the error issued by the shell in this case.

  ifeq ($(shell foo >/dev/null 2>&1 && echo $?),0)
  ...
  endif

I managed to silence the error message by re-executing the shell but
that seems like an inefficient hack.

  ifeq ($(shell /bin/sh -c foo >/dev/null 2>&1 && echo $$?),0)
  ...
  endif

Thanks
Martin


_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to