How do I check if file exists in Makefile so I can delete it?
It’s strange to see so many people using shell scripting for this. I was looking for a way to use native makefile syntax, because I’m writing this outside of any target. You can use the wildcard function to check if file exists: ifeq ($(UNAME),Darwin) SHELL := /opt/local/bin/bash OS_X := true else ifneq (,$(wildcard /etc/redhat-release)) OS_RHEL … Read more