As you may have guessed, rm *~ simply deletes a file with names ending with a tilde (~). File names ending with a tilde are usually backup files created by editors (in particular, emacs was one of the earlier editors using this convention). After editing the source code, as a rule, several of these files remain. This is why the clean target in the Makefile removes them.
Whether *~ special bash pattern is not suitable for most makefiles, since / bin / sh is used by default to execute make recipes. Only if SHELL is installed in the makefile will another shell be used.
An easy way to see implicit rules is to run make -p in a directory without a makefile. You will receive an error message indicating unspecified targets, but make will also print the implicit rules that it uses. If you select this output for a tilde, you will see that there are no implicit rules that name files with it.
camh
source share