perf tools: Don't clone maps from parent when synthesizing forks
[linux/fpc-iii.git] / arch / s390 / kernel / syscalls / Makefile
blob4d929edc80a6296eecdd9911457d1fb691de6d6b
1 # SPDX-License-Identifier: GPL-2.0
3 gen := arch/$(ARCH)/include/generated
4 kapi := $(gen)/asm
5 uapi := $(gen)/uapi/asm
7 syscall := $(srctree)/$(src)/syscall.tbl
8 systbl := $(srctree)/$(src)/syscalltbl
10 gen-y := $(kapi)/syscall_table.h
11 kapi-hdrs-y := $(kapi)/unistd_nr.h
12 uapi-hdrs-y := $(uapi)/unistd_32.h
13 uapi-hdrs-y += $(uapi)/unistd_64.h
15 targets += $(addprefix ../../../,$(gen-y) $(kapi-hdrs-y) $(uapi-hdrs-y))
17 PHONY += kapi uapi
19 kapi: $(gen-y) $(kapi-hdrs-y)
20 uapi: $(uapi-hdrs-y)
23 # Create output directory if not already present
24 _dummy := $(shell [ -d '$(uapi)' ] || mkdir -p '$(uapi)') \
25 $(shell [ -d '$(kapi)' ] || mkdir -p '$(kapi)')
27 define filechk_syshdr
28 $(CONFIG_SHELL) '$(systbl)' -H -a $(syshdr_abi_$(basetarget)) -f "$2" < $<
29 endef
31 define filechk_sysnr
32 $(CONFIG_SHELL) '$(systbl)' -N -a $(sysnr_abi_$(basetarget)) < $<
33 endef
35 define filechk_syscalls
36 $(CONFIG_SHELL) '$(systbl)' -S < $<
37 endef
39 syshdr_abi_unistd_32 := common,32
40 $(uapi)/unistd_32.h: $(syscall) FORCE
41 $(call filechk,syshdr,$@)
43 syshdr_abi_unistd_64 := common,64
44 $(uapi)/unistd_64.h: $(syscall) FORCE
45 $(call filechk,syshdr,$@)
47 $(kapi)/syscall_table.h: $(syscall) FORCE
48 $(call filechk,syscalls)
50 sysnr_abi_unistd_nr := common,32,64
51 $(kapi)/unistd_nr.h: $(syscall) FORCE
52 $(call filechk,sysnr)