Makefile 中的隐式规则取消
Implict rule cancellation in Makefile
我在 U-boot Makefile (https://github.com/siemens/u-boot/blob/master/Makefile#L128) 中遇到了以下行,注释为 "Cancel implicit rules on top Makefile"。
你能帮我理解以下行吗,how/what 将在 make 实用程序执行以下行时发生。
$(CURDIR)/Makefile Makefile: ;
If you know that one or more of your makefiles cannot be remade and you want to keep make from performing an implicit rule search on them, perhaps for efficiency reasons, you can use any normal method of preventing implicit rule look-up to do so. For example, you can write an explicit rule with the makefile as the target, and an empty recipe.
这正是 $(CURDIR)/Makefile Makefile: ;
规则的作用 - 它有一个 empty recipe.
我在 U-boot Makefile (https://github.com/siemens/u-boot/blob/master/Makefile#L128) 中遇到了以下行,注释为 "Cancel implicit rules on top Makefile"。 你能帮我理解以下行吗,how/what 将在 make 实用程序执行以下行时发生。
$(CURDIR)/Makefile Makefile: ;
If you know that one or more of your makefiles cannot be remade and you want to keep make from performing an implicit rule search on them, perhaps for efficiency reasons, you can use any normal method of preventing implicit rule look-up to do so. For example, you can write an explicit rule with the makefile as the target, and an empty recipe.
这正是 $(CURDIR)/Makefile Makefile: ;
规则的作用 - 它有一个 empty recipe.