I'm writing a makefile that will clean up some useless files at the end of the compilation. If a target has already been made, it will of course skip that target and the useless file may not be there. So if I do this:
rm lexer.ml interpparse.ml interpparse.mli
I may get errors because one of the files doesn't exist. Is there any way to tell
rm to ignore these files?
In reading the man page, I see the following option:
-f Attempt to remove the files without prompting for confirma- tion, regardless of the file's permissions. If the file does not exist, do not display a diagnostic message or modify the exit status to reflect an error. The -f option overrides any previous -i options.
That sounds like almost what I want, but I'm not really sure about the permissions part. Is there a way to do this?