As MadScientist said, make passes ifeq strings to the shell, but if you write them correctly, you can mix make make like ifeq with the commands in the recipe. You just need to understand how make parses a Makefile :
If a line begins with TAB , it is considered a command for the shell , regardless of where the line is inside the file .
If it does not start with TAB , make interprets it as part of its language.
So, to fix your file, just don't run conditional make statements with TAB :
test: ifeq ("$(shell arch)", "armv7l") echo "This is an arm system" else echo "This is not an arm system." endif
source share