Branch based on string equality.
Section: Includes and conditionals
ifeq conditional
makefile
makefile
ifeq ($(ENV),prod)
API_URL := https://api.example.com
else
API_URL := https://api.dev.example.com
endifExplanation
GNU make conditionals run during parsing, not execution.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Includes and conditionals