Currently checksyscalls.sh is unconditionally executed during each build. Most of these executions are unnecessary. Only run checksyscalls.sh if one of its inputs have changed. This new logic does not work for the multiple invocations done for MIPS. The effect is that checksyscalls.sh is still executed unconditionally. However this is not worse than before.
Unified · Split
| @@ -47,12 +47,18 @@ $(rq-offsets-file): kernel/sched/rq-offsets.s FORCE · 46 unmodified lines | |||
| 47 | 47 | ||
| 48 | # Check for missing system calls | 48 | # Check for missing system calls |
| 49 | 49 | ||
| 50 | missing-syscalls-file := .tmp_missing-syscalls | ||
| 51 | |||
| 52 | targets += $(missing-syscalls-file) | ||
| 53 | |||
| 50 | quiet_cmd_syscalls = CALL $< | 54 | quiet_cmd_syscalls = CALL $< |
| 51 | cmd_syscalls = $(CONFIG_SHELL) $< $(CC) $(c_flags) $(missing_syscalls_flags) | 55 | cmd_syscalls = DEPFILE=$(depfile) $(CONFIG_SHELL) $< $(CC) $(c_flags) $(missing_syscalls_flags); touch $@ |
| 56 | |||
| 57 | $(missing-syscalls-file): scripts/checksyscalls.sh $(rq-offsets-file) FORCE | ||
| 58 | $(call if_changed_dep,syscalls) | ||
| 52 | 59 | ||
| 53 | PHONY += missing-syscalls | 60 | PHONY += missing-syscalls |
| 54 | missing-syscalls: scripts/checksyscalls.sh $(rq-offsets-file) | 61 | missing-syscalls: $(missing-syscalls-file) |
| 55 | $(call cmd,syscalls) | ||
| 56 | 62 | ||
| 57 | # Check the manual modification of atomic headers | 63 | # Check the manual modification of atomic headers |
| 58 | 64 | ||
| @@ -275,3 +275,8 @@ syscall_list() { · 274 unmodified lines | |||
| 275 | 275 | ||
| 276 | (ignore_list && syscall_list ${reference_table}) | \ | 276 | (ignore_list && syscall_list ${reference_table}) | \ |
| 277 | $* -Wno-error -Wno-unused-macros -E -x c - > /dev/null | 277 | $* -Wno-error -Wno-unused-macros -E -x c - > /dev/null |
| 278 | |||
| 279 | # For fixdep | ||
| 280 | if [ -n "${DEPFILE}" ]; then | ||
| 281 | echo "${0}: ${0} ${reference_table}" >> "${DEPFILE}" | ||
| 282 | fi | ||