In a makefile, I want to use a shell command such as command1=[some program] [--flags], then use a condition to see whether or not the output contains a certain keyword using grep.
My code does not work:
var=$([command 1] | grep [keyword])
if [ -z ${var} ]; then \
[command 2, with variables in it]; \
[command 3, with variables in it]; \
fi
any idea why?