以下行在 makefile 中做了什么?

What does the following line do in makefiles?

这一行在 makefile 中的作用是什么?

-include Makefile.add_exp430.defines

Makefile.add_exp430.defines是一个文件还是多个文件的复杂? include的减号前缀是干什么用的? 谢谢。

Source 1:

The include directive tells make to suspend reading the current makefile and read one or more other makefiles before continuing

Source 2:

To ignore errors in a recipe line, write a ‘-’ at the beginning of the line’s text (after the initial tab). The ‘-’ is discarded before the line is passed to the shell for execution.

假设您的 Makefile 是:

-include some_inexisting_file
all:
    @echo "Yellow!"

运行 make all 将输出 Yellow!

没有破折号,输出变为:Makefile:2: some_inexisting_file: No such file or directory