In the clean section of my Makefile I am trying to check if the file exists before deleting permanently. I use this code but I receive errors.
What\'s w
ifneq ("$(wildcard $(PATH_TO_FILE))","")
FILE_EXISTS = 1
else
FILE_EXISTS = 0
endif
This solution posted above works best. But make sure that you do not stringify the PATH_TO_FILE assignment E.g.,
PATH_TO_FILE = "/usr/local/lib/libhl++.a" # WILL NOT WORK
It must be
PATH_TO_FILE = /usr/local/lib/libhl++.a