I have a Makefile that defines a .PHONY clean target for cleaning up .o files and executables, that target looks like:
... .PHONY : clean clean: rm $(add
Late to the party, but here's another solution that worked with our quirky build environment:
if exist *.exe rm -f *.exe
Not output free, but reduced and exits cleanly:
# make clean if exist *.exe rm -f *.exe
I tried a lot of alternatives that all had issues before settling on this one.