Branch based on operating system or shell-provided variables.
Section: Includes and conditionals
OS-specific include
makefile
makefile
ifeq ($(OS),Windows_NT)
RM := del /Q
else
RM := rm -f
endifExplanation
Portable projects often branch on Windows vs Unix-like behavior.
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