Skip to content

Commit 182c02a

Browse files
masahir0yhcahca
authored andcommitted
s390/syscalls: Convert filechk to if_changed
The filechk macro always executes the syscalltbl script (and discards the output if there are no changes). Using if_changed is more efficient because it avoids running the script when the target is up-to-date and the command remains unchanged. All other architectures use if_changed for generating syscall headers. Signed-off-by: Masahiro Yamada <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Heiko Carstens <[email protected]>
1 parent e17aca2 commit 182c02a

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

arch/s390/kernel/syscalls/Makefile

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,26 @@ uapi: $(uapi-hdrs-y)
2323
# Create output directory if not already present
2424
$(shell mkdir -p $(uapi) $(kapi))
2525

26-
filechk_syshdr = $(CONFIG_SHELL) '$(systbl)' -H -a $(syshdr_abi_$(basetarget)) -f "$@" < $<
26+
quiet_cmd_syshdr = SYSHDR $@
27+
cmd_syshdr = $(CONFIG_SHELL) '$(systbl)' -H -a $(syshdr_abi_$(basetarget)) -f "$@" < $< > $@
2728

28-
filechk_sysnr = $(CONFIG_SHELL) '$(systbl)' -N -a $(sysnr_abi_$(basetarget)) < $<
29+
quiet_cmd_sysnr = SYSNR $@
30+
cmd_sysnr = $(CONFIG_SHELL) '$(systbl)' -N -a $(sysnr_abi_$(basetarget)) < $< > $@
2931

30-
filechk_syscalls = $(CONFIG_SHELL) '$(systbl)' -S < $<
32+
quiet_cmd_syscalls = SYSTBL $@
33+
cmd_syscalls = $(CONFIG_SHELL) '$(systbl)' -S < $< > $@
3134

3235
syshdr_abi_unistd_32 := common,32
33-
$(uapi)/unistd_32.h: $(syscall) FORCE
34-
$(call filechk,syshdr)
36+
$(uapi)/unistd_32.h: $(syscall) $(systbl) FORCE
37+
$(call if_changed,syshdr)
3538

3639
syshdr_abi_unistd_64 := common,64
37-
$(uapi)/unistd_64.h: $(syscall) FORCE
38-
$(call filechk,syshdr)
40+
$(uapi)/unistd_64.h: $(syscall) $(systbl) FORCE
41+
$(call if_changed,syshdr)
3942

40-
$(kapi)/syscall_table.h: $(syscall) FORCE
41-
$(call filechk,syscalls)
43+
$(kapi)/syscall_table.h: $(syscall) $(systbl) FORCE
44+
$(call if_changed,syscalls)
4245

4346
sysnr_abi_unistd_nr := common,32,64
44-
$(kapi)/unistd_nr.h: $(syscall) FORCE
45-
$(call filechk,sysnr)
47+
$(kapi)/unistd_nr.h: $(syscall) $(systbl) FORCE
48+
$(call if_changed,sysnr)

0 commit comments

Comments
 (0)