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
I was trying:
[ -f $(PROGRAM) ] && cp -f $(PROGRAM) $(INSTALLDIR)
And the positive case worked but my ubuntu bash shell calls this TRUE and breaks on the copy:
[ -f ] && cp -f /home/user/proto/../bin/
cp: missing destination file operand after '/home/user/proto/../bin/'
After getting this error, I google how to check if a file exists in make, and this is the answer...