I am passing an argument to makefile target. I want to do string compare of the argument. This is my code,
mode = p
install:
@echo mode is $(mode)
ifeq ($(mode),"p")
@echo mode is production
else
@echo mode is development
endif
I get the following error as,
mode is d
ifeq (d,"p")
/bin/sh: 1: Syntax error: word unexpected (expecting ")")
What is the error and what is General rule for comparing strings in bash scripts?