Makefile Pattern Rules & Dependency Generation/Include generated files safely

Load dependency files only if they exist.

Section: Generated dependency files

Include generated files safely

makefile
makefile
-include $(DEPS)
Explanation

The leading dash suppresses missing-file errors on first run.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Generated dependency files
Generate C header dependency files
Have the compiler emit `.d` files while building objects.
OpenIn sheetmakefilesame section
Separate dependency file path
Write depfiles beside objects using explicit flags.
OpenIn sheetmakefilesame section
Stamp-based dependency install
Rebuild only when lockfile changes.
OpenIn sheetmakefilesame section
Basic pattern rule
Compile any `.c` file into a matching `.o` file.
OpenIn sheetmakefile
$@ target name
Expand to the current target file.
OpenIn sheetmakefile
wildcard function
Expand glob patterns during parsing.
OpenIn sheetmakefile