summaryrefslogtreecommitdiffstats
path: root/linux/syscalls.mk
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2023-12-05 00:03:04 +0100
committerMattias Andrée <maandree@kth.se>2023-12-05 00:03:04 +0100
commit58dd684c4e86944301959a140dbed9746df35779 (patch)
treea2702ea4f66b2a58711ee22eb7449c74b1ecf0d1 /linux/syscalls.mk
parentFirst commit (diff)
downloadlibsyscalls-58dd684c4e86944301959a140dbed9746df35779.tar.gz
libsyscalls-58dd684c4e86944301959a140dbed9746df35779.tar.bz2
libsyscalls-58dd684c4e86944301959a140dbed9746df35779.tar.xz
Second commit
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'linux/syscalls.mk')
-rw-r--r--linux/syscalls.mk186
1 files changed, 94 insertions, 92 deletions
diff --git a/linux/syscalls.mk b/linux/syscalls.mk
index 7c13441..ddd1a63 100644
--- a/linux/syscalls.mk
+++ b/linux/syscalls.mk
@@ -1,13 +1,15 @@
+# See LICENSE file for copyright and license details.
+
LINUX_SYSCALL_DIR = linux-src/syscalls-$(LINUX_VERSION)
LINUX_SYSCALLS_ARCH_TBL_SPLIT_X64 != printf '$(LINUX_SYSCALL_DIR)/%s.tbl\n' amd64 x86
LINUX_SYSCALLS_ARCH_TBL_SPLIT_MIPS != printf '$(LINUX_SYSCALL_DIR)/%s.tbl\n' mips-n32 mips-o32 mips-n64
LINUX_SYSCALLS_ARCHES_SPLIT != grep '^LINUX_SYSCALLS_ARCH_TBL_SPLIT_' < linux/syscalls.mk | cut -d \% -f 2 | cut -d ' ' -f 2-
-LINUX_SYSCALLS_ARCHES_SIMPLE != (sed -n 's/^generated\/linux-syscalls-\([a-zA-Z0-9_-]\+\)\.h\s*:.*$$/\1/p' && \
+LINUX_SYSCALLS_ARCHES_SIMPLE != (sed -n 's/^generated\/linux-syscalls\/\([a-zA-Z0-9_-]\+\)\.h\s*:.*$$/\1/p' && \
printf '%s\n' $(LINUX_SYSCALLS_ARCHES_SPLIT)) < linux/syscalls.mk | sort | uniq -u
LINUX_SYSCALLS_ARCHES = $(LINUX_SYSCALLS_ARCHES_SIMPLE) $(LINUX_SYSCALLS_ARCHES_SPLIT)
-LINUX_SYSCALLS_ARCH_HDR != printf 'generated/linux-syscalls-%s.h\n' $(LINUX_SYSCALLS_ARCHES)
+LINUX_SYSCALLS_ARCH_HDR != printf 'generated/linux-syscalls/%s.h\n' $(LINUX_SYSCALLS_ARCHES)
LINUX_SYSCALLS_ARCH_TBL_SIMPLE != printf '$(LINUX_SYSCALL_DIR)/%s.tbl\n' $(LINUX_SYSCALLS_ARCHES_SIMPLE)
LINUX_SYSCALLS_ARCH_TBL_SPLIT != printf '$(LINUX_SYSCALL_DIR)/%s.tbl\n' $(LINUX_SYSCALLS_ARCHES_SPLIT)
LINUX_SYSCALLS_ARCH_TBL = $(LINUX_SYSCALLS_ARCH_TBL_SIMPLE) $(LINUX_SYSCALLS_ARCH_TBL_SPLIT)
@@ -18,41 +20,41 @@ LINUX_SYSCALLS_HDR =\
$(LINUX_SYSCALLS_ARCH_HDR)
-generated/linux-syscalls-alpha.h: $(LINUX_SYSCALL_DIR)/alpha.tbl linux/syscalls.mk
- mkdir -p -- generated
+generated/linux-syscalls/alpha.h: $(LINUX_SYSCALL_DIR)/alpha.tbl linux/syscalls.mk
+ mkdir -p -- generated/linux-syscalls
printf '\43define LIST_LINUX_SYSCALLS_FOR_ALPHA(X, _X_COMPAT, D)\\\n' > $@
printf '%i common %s %s\n' \
320 idle sys_idle \
- | cat -- $(LINUX_SYSCALL_DIR)/alpha.tbl - \
+ | cat -- $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) - \
| sed '/^\s*\(\x23.*\)\?$$/d' \
| awk '{ print "\tX(" $$1 ", " $$3 ", " $$4 ") D\\"}' \
| sed '$$s/ D\\$$//' >> $@
- test "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/alpha.tbl | awk '{ print $$2 }')" = \
- "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/alpha.tbl | awk '{ print $$2 }' | grep '^common$$')"
+ test "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) | awk '{ print $$2 }')" = \
+ "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) | awk '{ print $$2 }' | grep '^common$$')"
$(LINUX_SYSCALL_DIR)/amd64.tbl.fixed: $(LINUX_SYSCALL_DIR)/amd64.tbl linux/syscalls.mk
- cat -- $(LINUX_SYSCALL_DIR)/amd64.tbl \
+ cat -- $(@:.fixed=) \
| sed 's/\s\+\(getpmsg\|putpmsg\|afs_syscall\|tuxcall\|security\|vserver\)\s*$$/& sys_ni_syscall/' \
| sed 's/^\s*[0-9]\+\s\+[a-z0-9]\+\s\+\([A-Za-z0-9_]\+\)\s*$$/& sys_\1/' \
> $@
-generated/linux-syscalls-amd64.h: $(LINUX_SYSCALL_DIR)/amd64.tbl.fixed linux/syscalls.mk
- mkdir -p -- generated
+generated/linux-syscalls/amd64.h: $(LINUX_SYSCALL_DIR)/amd64.tbl.fixed linux/syscalls.mk
+ mkdir -p -- generated/linux-syscalls
printf '\43define LIST_LINUX_SYSCALLS_FOR_AMD64(X, _X_COMPAT, D)\\\n' > $@
- cat -- $(LINUX_SYSCALL_DIR)/amd64.tbl.fixed \
+ cat -- $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl).fixed \
| sed '/^\s*\(\x23.*\)\?$$/d' \
| awk '{ print "\tX(" $$1 ", " $$3 ", " $$4 ") D\\" $$2}' \
| sed -n 's/\\\(common\|64\)$$/\\/p' \
| sed '$$s/ D\\$$//' >> $@
printf '\n\43define LIST_LINUX_SYSCALLS_FOR_AMD64_X32(X, _X_COMPAT, D)\\\n' >> $@
- cat -- $(LINUX_SYSCALL_DIR)/amd64.tbl.fixed \
+ cat -- $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl).fixed \
| sed '/^\s*\(\x23.*\)\?$$/d' \
| awk '{ print "\tX(" $$1 ", " $$3 ", " $$4 ") D\\" $$2}' \
| sed -n 's/\\\(common\|x32\)$$/\\/p' \
| sed '$$s/ D\\$$//' >> $@
- test "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/amd64.tbl.fixed | awk '{ print $$2 }')" = \
- "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/amd64.tbl.fixed | awk '{ print $$2 }' | \
+ test "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl).fixed | awk '{ print $$2 }')" = \
+ "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl).fixed | awk '{ print $$2 }' | \
grep '^\(common\|64\|x32\)$$')"
@@ -85,33 +87,33 @@ $(LINUX_SYSCALL_DIR)/arm.tbl.fixed: $(LINUX_SYSCALL_DIR)/arm.tbl linux/syscalls.
137 afs_syscall sys_afs_syscall \
166 vm86 sys_vm86 \
167 query_module sys_query_module \
- | cat -- $(LINUX_SYSCALL_DIR)/arm.tbl - \
+ | cat -- $(LINUX_SYSCALL_DIR)/$(@F:.fixed=) - \
| sed 's/\svserver\s*$$/& sys_ni_syscall/' \
| sed 's/\snfsservctl\s*$$/& sys_nfsservctl/' \
> $@
-generated/linux-syscalls-arm.h: $(LINUX_SYSCALL_DIR)/arm.tbl.fixed linux/syscalls.mk
- mkdir -p -- generated
+generated/linux-syscalls/arm.h: $(LINUX_SYSCALL_DIR)/arm.tbl.fixed linux/syscalls.mk
+ mkdir -p -- generated/linux-syscalls
printf '\43define LIST_LINUX_SYSCALLS_FOR_ARM_EABI(X, _X_COMPAT, D)\\\n' > $@
- cat -- $(LINUX_SYSCALL_DIR)/arm.tbl.fixed \
+ cat -- $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl).fixed \
| sed '/^\s*\(\x23.*\)\?$$/d' \
| awk '{ print "\tX(" $$1 ", " $$3 ", " $$4 ") D\\" $$2}' \
| sed -n 's/\\\(common\|eabi\)$$/\\/p' \
| sed '$$s/ D\\$$//' >> $@
printf '\n\43define LIST_LINUX_SYSCALLS_FOR_ARM_OABI(X, X_COMPAT, D)\\\n' >> $@
- cat -- $(LINUX_SYSCALL_DIR)/arm.tbl.fixed \
+ cat -- $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl).fixed \
| sed '/^\s*\(\x23.*\)\?$$/d' \
| awk '{ print "\tX_COMPAT(" $$1 ", " $$3 ", " $$4 ", " $$5 ") D\\" $$2}' \
| sed -n 's/\\\(common\|oabi\)$$/\\/p' \
| sed 's/X_COMPAT(\(.*\), ) D\\$$/X(\1) D\\/' \
| sed '$$s/ D\\$$//' >> $@
- test "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/arm.tbl.fixed | awk '{ print $$2 }')" = \
- "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/arm.tbl.fixed | awk '{ print $$2 }' | \
+ test "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl).fixed | awk '{ print $$2 }')" = \
+ "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl).fixed | awk '{ print $$2 }' | \
grep '^\(common\|oabi\|eabi\)$$')"
-generated/linux-syscalls-ia64.h: $(LINUX_SYSCALL_DIR)/ia64.tbl linux/syscalls.mk
- mkdir -p -- generated
+generated/linux-syscalls/ia64.h: $(LINUX_SYSCALL_DIR)/ia64.tbl linux/syscalls.mk
+ mkdir -p -- generated/linux-syscalls
printf '\43define LIST_LINUX_SYSCALLS_FOR_IA64(X, _X_COMPAT, D)\\\n' > $@
printf '%i common %s %s\n' \
$$(( 1120 - 1024 )) old_stat sys_stat \
@@ -120,16 +122,16 @@ generated/linux-syscalls-ia64.h: $(LINUX_SYSCALL_DIR)/ia64.tbl linux/syscalls.mk
$$(( 1132 - 1024 )) create_module sys_create_module \
$$(( 1135 - 1024 )) get_kernel_syms sys_get_kernel_syms \
$$(( 1136 - 1024 )) query_module sys_query_module \
- | cat -- $(LINUX_SYSCALL_DIR)/ia64.tbl - \
+ | cat -- $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) - \
| sed '/^\s*\(\x23.*\)\?$$/d' \
| awk '{ print "\tX((" $$1 " + 1024), " $$3 ", " $$4 ") D\\"}' \
| sed '$$s/ D\\$$//' >> $@
- test "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/ia64.tbl | awk '{ print $$2 }')" = \
- "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/ia64.tbl | awk '{ print $$2 }' | grep '^common$$')"
+ test "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) | awk '{ print $$2 }')" = \
+ "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) | awk '{ print $$2 }' | grep '^common$$')"
-generated/linux-syscalls-m68k.h: $(LINUX_SYSCALL_DIR)/m68k.tbl linux/syscalls.mk
- mkdir -p -- generated
+generated/linux-syscalls/m68k.h: $(LINUX_SYSCALL_DIR)/m68k.tbl linux/syscalls.mk
+ mkdir -p -- generated/linux-syscalls
printf '\43define LIST_LINUX_SYSCALLS_FOR_M68K(X, _X_COMPAT, D)\\\n' > $@
printf '%i common %s %s\n' \
17 break sys_ni_syscall \
@@ -149,57 +151,57 @@ generated/linux-syscalls-m68k.h: $(LINUX_SYSCALL_DIR)/m68k.tbl linux/syscalls.mk
113 vm86 sys_vm86 \
137 afs_syscall sys_ni_syscall \
278 vserver sys_ni_syscall \
- | cat -- $(LINUX_SYSCALL_DIR)/m68k.tbl - \
+ | cat -- $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) - \
| sed '/^\s*\(\x23.*\)\?$$/d' \
| awk '{ print "\tX(" $$1 ", " $$3 ", " $$4 ") D\\"}' \
| sed '$$s/ D\\$$//' >> $@
- test "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/m68k.tbl | awk '{ print $$2 }')" = \
- "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/m68k.tbl | awk '{ print $$2 }' | grep '^common$$')"
+ test "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) | awk '{ print $$2 }')" = \
+ "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) | awk '{ print $$2 }' | grep '^common$$')"
-generated/linux-syscalls-microblaze.h: $(LINUX_SYSCALL_DIR)/microblaze.tbl linux/syscalls.mk
- mkdir -p -- generated
+generated/linux-syscalls/microblaze.h: $(LINUX_SYSCALL_DIR)/microblaze.tbl linux/syscalls.mk
+ mkdir -p -- generated/linux-syscalls
printf '\43define LIST_LINUX_SYSCALLS_FOR_MICROBLAZE(X, _X_COMPAT, D)\\\n' > $@
printf '%i common %s %s\n' \
251 set_zone_reclaim sys_set_zone_reclaim \
285 setaltroot sys_setaltroot \
- | cat -- $(LINUX_SYSCALL_DIR)/microblaze.tbl - \
+ | cat -- $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) - \
| sed '/^\s*\(\x23.*\)\?$$/d' \
| awk '{ print "\tX(" $$1 ", " $$3 ", " $$4 ") D\\"}' \
| sed '$$s/ D\\$$//' >> $@
- test "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/microblaze.tbl | awk '{ print $$2 }')" = \
- "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/microblaze.tbl | awk '{ print $$2 }' | grep '^common$$')"
+ test "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) | awk '{ print $$2 }')" = \
+ "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) | awk '{ print $$2 }' | grep '^common$$')"
-generated/linux-syscalls-mips-n32.h: $(LINUX_SYSCALL_DIR)/mips-n32.tbl linux/syscalls.mk
- mkdir -p -- generated
+generated/linux-syscalls/mips-n32.h: $(LINUX_SYSCALL_DIR)/mips-n32.tbl linux/syscalls.mk
+ mkdir -p -- generated/linux-syscalls
printf '\43define LIST_LINUX_SYSCALLS_FOR_MIPS_N32(X, _X_COMPAT, D)\\\n' > $@
printf '%i common %s %s\n' \
242 setaltroot sys_setaltroot \
- | cat -- $(LINUX_SYSCALL_DIR)/mips-n32.tbl - \
+ | cat -- $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) - \
| sed '/^\s*\(\x23.*\)\?$$/d' \
| awk '{ print "\tX(" $$1 ", " $$3 ", " $$4 ") D\\"}' \
| sed '$$s/ D\\$$//' >> $@
- test "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/mips-n32.tbl | awk '{ print $$2 }')" = \
- "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/mips-n32.tbl | awk '{ print $$2 }' | grep '^n32$$')"
+ test "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) | awk '{ print $$2 }')" = \
+ "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) | awk '{ print $$2 }' | grep '^n32$$')"
-generated/linux-syscalls-mips-n64.h: $(LINUX_SYSCALL_DIR)/mips-n64.tbl linux/syscalls.mk
- mkdir -p -- generated
+generated/linux-syscalls/mips-n64.h: $(LINUX_SYSCALL_DIR)/mips-n64.tbl linux/syscalls.mk
+ mkdir -p -- generated/linux-syscalls
printf '\43define LIST_LINUX_SYSCALLS_FOR_MIPS_N64(X, _X_COMPAT, D)\\\n' > $@
printf '%i common %s %s\n' \
238 setaltroot sys_setaltroot \
- | cat -- $(LINUX_SYSCALL_DIR)/mips-n64.tbl - \
+ | cat -- $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) - \
| sed '/^\s*\(\x23.*\)\?$$/d' \
| awk '{ print "\tX(" $$1 ", " $$3 ", " $$4 ") D\\"}' \
| sed '$$s/ D\\$$//' >> $@
- test "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/mips-n64.tbl | awk '{ print $$2 }')" = \
- "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/mips-n64.tbl | awk '{ print $$2 }' | \
+ test "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) | awk '{ print $$2 }')" = \
+ "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) | awk '{ print $$2 }' | \
grep '^\(n64\|common\)$$')"
-generated/linux-syscalls-mips-o32.h: $(LINUX_SYSCALL_DIR)/mips-o32.tbl linux/syscalls.mk
- mkdir -p -- generated
+generated/linux-syscalls/mips-o32.h: $(LINUX_SYSCALL_DIR)/mips-o32.tbl linux/syscalls.mk
+ mkdir -p -- generated/linux-syscalls
printf '\43define LIST_LINUX_SYSCALLS_FOR_MIPS_O32(X, X_COMPAT, D)\\\n' > $@
printf '%i common %s %s\n' \
18 old_stat sys_stat \
@@ -207,14 +209,14 @@ generated/linux-syscalls-mips-o32.h: $(LINUX_SYSCALL_DIR)/mips-o32.tbl linux/sys
82 select sys_old_select \
84 old_lstat sys_lstat \
279 setaltroot sys_setaltroot \
- | cat -- $(LINUX_SYSCALL_DIR)/mips-o32.tbl - \
+ | cat -- $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) - \
| sed '/^\s*\(18\|28\|82\|84\)\s\+o32.*$$/d' \
| sed '/^\s*\(\x23.*\)\?$$/d' \
| awk '{ print "\tX_COMPAT(" $$1 ", " $$3 ", " $$4 ", " $$5 ") D\\"}' \
| sed 's/X_COMPAT(\(.*\), ) D\\$$/X(\1) D\\/' \
| sed '$$s/ D\\$$//' >> $@
- test "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/mips-o32.tbl | awk '{ print $$2 }')" = \
- "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/mips-o32.tbl | awk '{ print $$2 }' | grep '^o32$$')"
+ test "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) | awk '{ print $$2 }')" = \
+ "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) | awk '{ print $$2 }' | grep '^o32$$')"
$(LINUX_SYSCALL_DIR)/parisc.tbl.fixed: $(LINUX_SYSCALL_DIR)/parisc.tbl linux/syscalls.mk
@@ -236,85 +238,85 @@ $(LINUX_SYSCALL_DIR)/parisc.tbl.fixed: $(LINUX_SYSCALL_DIR)/parisc.tbl linux/sys
221 free_hugepages sys_free_hugepages \
263 vserver sys_ni_syscall \
303 timerfd sys_timerfd \
- | cat -- $(LINUX_SYSCALL_DIR)/parisc.tbl - > $@
+ | cat -- $(LINUX_SYSCALL_DIR)/$(@F:.fixed=) - > $@
-generated/linux-syscalls-parisc.h: $(LINUX_SYSCALL_DIR)/parisc.tbl.fixed linux/syscalls.mk
- mkdir -p -- generated
+generated/linux-syscalls/parisc.h: $(LINUX_SYSCALL_DIR)/parisc.tbl.fixed linux/syscalls.mk
+ mkdir -p -- generated/linux-syscalls
printf '\43define LIST_LINUX_SYSCALLS_FOR_PARISC_64(X, _X_COMPAT, D)\\\n' > $@
- cat -- $(LINUX_SYSCALL_DIR)/parisc.tbl.fixed \
+ cat -- $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl).fixed \
| sed '/^\s*\(\x23.*\)\?$$/d' \
| awk '{ print "\tX(" $$1 ", " $$3 ", " $$4 ") D\\" $$2}' \
| sed -n 's/\\\(common\|64\)$$/\\/p' \
| sed '$$s/ D\\$$//' >> $@
printf '\n\43define LIST_LINUX_SYSCALLS_FOR_PARISC_32(X, X_COMPAT, D)\\\n' >> $@
- cat -- $(LINUX_SYSCALL_DIR)/parisc.tbl.fixed \
+ cat -- $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl).fixed \
| sed '/^\s*\(\x23.*\)\?$$/d' \
| awk '{ print "\tX_COMPAT(" $$1 ", " $$3 ", " $$4 ", " $$5 ") D\\" $$2}' \
| sed -n 's/\\\(common\|32\)$$/\\/p' \
| sed 's/X_COMPAT(\(.*\), ) D\\$$/X(\1) D\\/' \
| sed '$$s/ D\\$$//' >> $@
- test "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/parisc.tbl.fixed | awk '{ print $$2 }')" = \
- "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/parisc.tbl.fixed | awk '{ print $$2 }' | \
+ test "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl).fixed | awk '{ print $$2 }')" = \
+ "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl).fixed | awk '{ print $$2 }' | \
grep '^\(common\|64\|32\)$$')"
-generated/linux-syscalls-powerpc.h: $(LINUX_SYSCALL_DIR)/powerpc.tbl linux/syscalls.mk
- mkdir -p -- generated
+generated/linux-syscalls/powerpc.h: $(LINUX_SYSCALL_DIR)/powerpc.tbl linux/syscalls.mk
+ mkdir -p -- generated/linux-syscalls
printf '\43define LIST_LINUX_SYSCALLS_FOR_POWERPC_32(X, X_COMPAT, D)\\\n' > $@
- cat -- $(LINUX_SYSCALL_DIR)/powerpc.tbl \
+ cat -- $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) \
| sed '/^\s*\(\x23.*\)\?$$/d' \
| awk '{ print "\tX_COMPAT(" $$1 ", " $$3 ", " $$4 ", " $$5 ") D\\" $$2}' \
| sed -n 's/\\\(common\|32\)$$/\\/p' \
| sed 's/X_COMPAT(\(.*\), ) D\\$$/X(\1) D\\/' \
| sed '$$s/ D\\$$//' >> $@
printf '\n\43define LIST_LINUX_SYSCALLS_FOR_POWERPC_NOSPU(X, X_COMPAT, D)\\\n' >> $@
- cat -- $(LINUX_SYSCALL_DIR)/powerpc.tbl \
+ cat -- $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) \
| sed '/^\s*\(\x23.*\)\?$$/d' \
| awk '{ print "\tX_COMPAT(" $$1 ", " $$3 ", " $$4 ", " $$5 ") D\\" $$2}' \
| sed -n 's/\\\(common\|nospu\)$$/\\/p' \
| sed 's/X_COMPAT(\(.*\), ) D\\$$/X(\1) D\\/' \
| sed '$$s/ D\\$$//' >> $@
printf '\n\43define LIST_LINUX_SYSCALLS_FOR_POWERPC_64(X, _X_COMPAT, D)\\\n' >> $@
- cat -- $(LINUX_SYSCALL_DIR)/powerpc.tbl \
+ cat -- $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) \
| sed '/^\s*\(\x23.*\)\?$$/d' \
| awk '{ print "\tX(" $$1 ", " $$3 ", " $$4 ") D\\" $$2}' \
| sed -n 's/\\\(common\|64\)$$/\\/p' \
| sed '$$s/ D\\$$//' >> $@
printf '\n\43define LIST_LINUX_SYSCALLS_FOR_POWERPC_SPU(X, _X_COMPAT, D)\\\n' >> $@
- cat -- $(LINUX_SYSCALL_DIR)/powerpc.tbl \
+ cat -- $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) \
| sed '/^\s*\(\x23.*\)\?$$/d' \
| awk '{ print "\tX(" $$1 ", " $$3 ", " $$4 ") D\\" $$2}' \
| sed -n 's/\\\(common\|spu\)$$/\\/p' \
| sed '$$s/ D\\$$//' >> $@
- test "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/powerpc.tbl | awk '{ print $$2 }')" = \
- "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/powerpc.tbl | awk '{ print $$2 }' | \
+ test "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) | awk '{ print $$2 }')" = \
+ "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) | awk '{ print $$2 }' | \
grep '^\(common\|spu\|nospu\|64\|32\)$$')"
-generated/linux-syscalls-s390.h: $(LINUX_SYSCALL_DIR)/s390.tbl linux/syscalls.mk
- mkdir -p -- generated
+generated/linux-syscalls/s390.h: $(LINUX_SYSCALL_DIR)/s390.tbl linux/syscalls.mk
+ mkdir -p -- generated/linux-syscalls
printf '\43define LIST_LINUX_SYSCALLS_FOR_S390_32(X, _X_COMPAT, D)\\\n' > $@
- cat -- $(LINUX_SYSCALL_DIR)/s390.tbl \
+ cat -- $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) \
| sed '/^\s*\(\x23.*\)\?$$/d' \
| sed 's/^\s*\([0-9]\+\)\s\+\([A-Za-z0-9_]\+\)\s\+\([A-Za-z0-9_]\+\)\s\+-\s\+-\s*$$/\1 \2 \3 sys_\3 sys_\3/' \
| awk '{ print "\tX(" $$1 ", " $$3 ", " $$5 ") D\\" $$2}' \
| sed -n 's/\\\(common\|32\)$$/\\/p' \
| sed '$$s/ D\\$$//' >> $@
printf '\n\43define LIST_LINUX_SYSCALLS_FOR_S390_64(X, _X_COMPAT, D)\\\n' >> $@
- cat -- $(LINUX_SYSCALL_DIR)/s390.tbl \
+ cat -- $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) \
| sed '/^\s*\(\x23.*\)\?$$/d' \
| sed 's/^\s*\([0-9]\+\)\s\+\([A-Za-z0-9_]\+\)\s\+\([A-Za-z0-9_]\+\)\s\+-\s\+-\s*$$/\1 \2 \3 sys_\3 sys_\3/' \
| sed 's/^\s*\(89\)\s\+\(common\)\s\+\(readdir\)\s\+-\s\+/\1 \2 \3 sys_old_readdir /' \
| awk '{ print "\tX(" $$1 ", " $$3 ", " $$4 ") D\\" $$2}' \
| sed -n 's/\\\(common\|64\)$$/\\/p' \
| sed '$$s/ D\\$$//' >> $@
- test "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/s390.tbl | awk '{ print $$2 }')" = \
- "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/s390.tbl | awk '{ print $$2 }' | \
+ test "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) | awk '{ print $$2 }')" = \
+ "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) | awk '{ print $$2 }' | \
grep '^\(common\|32\|64\)$$')"
-generated/linux-syscalls-sh.h: $(LINUX_SYSCALL_DIR)/sh.tbl linux/syscalls.mk
- mkdir -p -- generated
+generated/linux-syscalls/sh.h: $(LINUX_SYSCALL_DIR)/sh.tbl linux/syscalls.mk
+ mkdir -p -- generated/linux-syscalls
printf '\43define LIST_LINUX_SYSCALLS_FOR_SH(X, _X_COMPAT, D)\\\n' > $@
printf '%i common %s %s\n' \
17 break sys_ni_syscall \
@@ -341,16 +343,16 @@ generated/linux-syscalls-sh.h: $(LINUX_SYSCALL_DIR)/sh.tbl linux/syscalls.mk
| sed '/^\s*\(\x23.*\)\?$$/d' \
| awk '{ print "\tX(" $$1 ", " $$3 ", " $$4 ") D\\"}' \
| sed '$$s/ D\\$$//' >> $@
- test "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/sh.tbl | awk '{ print $$2 }')" = \
- "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/sh.tbl | awk '{ print $$2 }' | grep '^common$$')"
+ test "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) | awk '{ print $$2 }')" = \
+ "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) | awk '{ print $$2 }' | grep '^common$$')"
-generated/linux-syscalls-sparc.h: $(LINUX_SYSCALL_DIR)/sparc.tbl linux/syscalls.mk
- mkdir -p -- generated
+generated/linux-syscalls/sparc.h: $(LINUX_SYSCALL_DIR)/sparc.tbl linux/syscalls.mk
+ mkdir -p -- generated/linux-syscalls
printf '\43define LIST_LINUX_SYSCALLS_FOR_SPARC_32(X, X_COMPAT, D)\\\n' > $@
printf '%i common %s %s\n' \
267 vserver sys_vserver \
- | cat -- $(LINUX_SYSCALL_DIR)/sparc.tbl - \
+ | cat -- $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) - \
| sed 's/compat_sys_\(truncate64\|ftruncate64\)/sparc___&/g' \
| sed '/^\s*267\s\+common\s\+vserver\s\+.*$$/d' \
| sed '/^\s*\(\x23.*\)\?$$/d' \
@@ -361,48 +363,48 @@ generated/linux-syscalls-sparc.h: $(LINUX_SYSCALL_DIR)/sparc.tbl linux/syscalls.
printf '\n\43define LIST_LINUX_SYSCALLS_FOR_SPARC_64(X, _X_COMPAT, D)\\\n' >> $@
printf '%i common %s %s\n' \
267 vserver sys_vserver \
- | cat -- $(LINUX_SYSCALL_DIR)/sparc.tbl - \
+ | cat -- $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) - \
| sed '/^\s*267\s\+common\s\+vserver\s\+.*$$/d' \
| sed '/^\s*\(\x23.*\)\?$$/d' \
| awk '{ print "\tX(" $$1 ", " $$3 ", " $$4 ") D\\" $$2}' \
| sed -n 's/\\\(common\|64\)$$/\\/p' \
| sed '$$s/ D\\$$//' >> $@
- test "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/sparc.tbl | awk '{ print $$2 }')" = \
- "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/sparc.tbl | awk '{ print $$2 }' | \
+ test "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) | awk '{ print $$2 }')" = \
+ "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) | awk '{ print $$2 }' | \
grep '^\(common\|32\|64\)$$')"
-generated/linux-syscalls-x86.h: $(LINUX_SYSCALL_DIR)/x86.tbl linux/syscalls.mk
- mkdir -p -- generated
+generated/linux-syscalls/x86.h: $(LINUX_SYSCALL_DIR)/x86.tbl linux/syscalls.mk
+ mkdir -p -- generated/linux-syscalls
printf '\43define LIST_LINUX_SYSCALLS_FOR_I386(X, X_COMPAT, D)\\\n' > $@
printf '%i common %s %s\n' \
251 set_zone_reclaim sys_set_zone_reclaim \
285 setaltroot sys_setaltroot \
- | cat -- $(LINUX_SYSCALL_DIR)/x86.tbl - \
+ | cat -- $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) - \
| sed 's/\s\+\(break\|stty\|gtty\|ftime\|prof\|lock\|mpx\|ulimit\|profil\|idle\|afs_syscall\|getpmsg\|putpmsg\|vserver\)\s*$$/& sys_ni_syscall/' \
| sed 's/^\s*[0-9]\+\s\+[a-z0-9]\+\s\+\([A-Za-z0-9_]\+\)\s*$$/& sys_\1/' \
| sed '/^\s*\(\x23.*\)\?$$/d' \
| awk '{ print "\tX_COMPAT(" $$1 ", " $$3 ", " $$4 ", " $$5 ") D\\"}' \
| sed 's/X_COMPAT(\(.*\), ) D\\$$/X(\1) D\\/' \
| sed '$$s/ D\\$$//' >> $@
- test "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/x86.tbl | awk '{ print $$2 }')" = \
- "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/x86.tbl | awk '{ print $$2 }' | grep '^i386$$')"
+ test "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) | awk '{ print $$2 }')" = \
+ "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) | awk '{ print $$2 }' | grep '^i386$$')"
-generated/linux-syscalls-xtensa.h: $(LINUX_SYSCALL_DIR)/xtensa.tbl linux/syscalls.mk
- mkdir -p -- generated
+generated/linux-syscalls/xtensa.h: $(LINUX_SYSCALL_DIR)/xtensa.tbl linux/syscalls.mk
+ mkdir -p -- generated/linux-syscalls
printf '\43define LIST_LINUX_SYSCALLS_FOR_XTENSA(X, _X_COMPAT, D)\\\n' > $@
printf '%i common %s %s\n' \
305 timerfd sys_timerfd \
- | cat -- $(LINUX_SYSCALL_DIR)/xtensa.tbl - \
+ | cat -- $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) - \
| sed 's/reserved152\s\+sys_ni_syscall/set_thread_area sys_set_thread_area/' \
| sed 's/reserved153\s\+sys_ni_syscall/get_thread_area sys_get_thread_area/' \
| sed 's/nfsservctl\s\+sys_ni_syscall/nfsservctl sys_nfsservctl/' \
| sed '/^\s*\(\x23.*\)\?$$/d' \
| awk '{ print "\tX(" $$1 ", " $$3 ", " $$4 ") D\\"}' \
| sed '$$s/ D\\$$//' >> $@
- test "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/xtensa.tbl | awk '{ print $$2 }')" = \
- "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/xtensa.tbl | awk '{ print $$2 }' | grep '^common$$')"
+ test "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) | awk '{ print $$2 }')" = \
+ "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) | awk '{ print $$2 }' | grep '^common$$')"
$(LINUX_SYSCALLS_ARCH_TBL_SIMPLE): $(LINUX_SOURCE) linux/syscalls.mk