Makefile 'if' condition with regexp

makefile, regex

Solution

if uname -m | grep -Eq 'i.86'
then
  echo 'Yesss!'
fi

Problem

I need to do something like this: ``` case `uname -m` in i?86) echo "CFLAGS += -march=i486 -mtune=native" > configparms ;; esac ``` But I need to do this in makefile for a particular target. I have not found a method to make an if condition with a regular expression. I tried this: ``` ifeq ($(shell uname -m), i*86) ``` But it does not work. Even ``` ifeq ($(shell uname -m), i686) ``` does not work.

Original source