提交 fe706ffd 创建 作者: Austin Clements's avatar Austin Clements

Avoid rebuilding the world when any kernel source changes

A change in any kernel source may change the syscall definitions, so those need to be regenerated, but previously this would cause everything else to be likewise regenerated. Avoid this by only updating the generated file if its contents actually change. This also makes these rules better behaved when there are errors, since previously they would leave partially-generated files that would confuse the next make run.
上级 7764f677
......@@ -44,7 +44,8 @@ all:
define SYSCALLGEN
@echo " GEN $@"
$(Q)mkdir -p $(@D)
$(Q)python tools/syscalls.py $(1) kernel/*.cc > $@
$(Q)python tools/syscalls.py $(1) kernel/*.cc > $@.tmp
$(Q)cmp -s $@.tmp $@ || mv $@.tmp $@
endef
include net/Makefrag
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论