Makefile 'if' condition with regexp
Using Makefile built-in conditionals (as opposite of Ωmega's Bash solution)
ifeq ($(shell uname -m | egrep "i.86"),) # empty result from egrep
@echo "No match"
else
@echo "Match"
endif
See here using this approach to validate a Git tag https://gist.github.com/jesugmz/a155b4a6686c4172048fabc6836c59e1.