Difference between "include" and "-include" in a makefile
The difference is that -include
won't generate an error if the include file doesn't exist.
The -
prefix can be used many places in the Makefile
to perform actions that you don't mind if they fail.
From the docs
If you want make to simply ignore a makefile which does not exist or cannot be remade, with no error message, use the -include directive instead of include, like this:
-include filenames...
This acts like include in every way except that there is no error (not even a warning) if any of the filenames (or any prerequisites of any of the filenames) do not exist or cannot be remade.