summaryrefslogtreecommitdiffstats
path: root/linux/syscalls.mk
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linux/syscalls.mk146
1 files changed, 73 insertions, 73 deletions
diff --git a/linux/syscalls.mk b/linux/syscalls.mk
index ddd1a63..de748b3 100644
--- a/linux/syscalls.mk
+++ b/linux/syscalls.mk
@@ -6,7 +6,7 @@ LINUX_SYSCALLS_ARCH_TBL_SPLIT_X64 != printf '$(LINUX_SYSCALL_DIR)/%s.tbl\n' amd6
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_-]\{1,\}\)\.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)
@@ -26,35 +26,35 @@ generated/linux-syscalls/alpha.h: $(LINUX_SYSCALL_DIR)/alpha.tbl linux/syscalls.
printf '%i common %s %s\n' \
320 idle sys_idle \
| cat -- $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) - \
- | sed '/^\s*\(\x23.*\)\?$$/d' \
+ | sed '/^$(s)*\($(h).*\)\{0,1\}$$/d' \
| awk '{ print "\tX(" $$1 ", " $$3 ", " $$4 ") D\\"}' \
| sed '$$s/ D\\$$//' >> $@
- 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$$')"
+ test "$$(sed '/^$(s)*\($(h).*\)\{0,1\}$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) | awk '{ print $$2 }')" = \
+ "$$(sed '/^$(s)*\($(h).*\)\{0,1\}$$/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 -- $(@:.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/' \
+ | sed 's/$(s)\{1,\}\(getpmsg\|putpmsg\|afs_syscall\|tuxcall\|security\|vserver\)$(s)*$$/& sys_ni_syscall/' \
+ | sed 's/^$(s)*[0-9]\{1,\}$(s)\{1,\}[a-z0-9]\{1,\}$(s)\{1,\}\([A-Za-z0-9_]\{1,\}\)$(s)*$$/& sys_\1/' \
> $@
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)/$(@F:.h=.tbl).fixed \
- | sed '/^\s*\(\x23.*\)\?$$/d' \
+ | sed '/^$(s)*\($(h).*\)\{0,1\}$$/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)/$(@F:.h=.tbl).fixed \
- | sed '/^\s*\(\x23.*\)\?$$/d' \
+ | sed '/^$(s)*\($(h).*\)\{0,1\}$$/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)/$(@F:.h=.tbl).fixed | awk '{ print $$2 }')" = \
- "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl).fixed | awk '{ print $$2 }' | \
+ test "$$(sed '/^$(s)*\($(h).*\)\{0,1\}$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl).fixed | awk '{ print $$2 }')" = \
+ "$$(sed '/^$(s)*\($(h).*\)\{0,1\}$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl).fixed | awk '{ print $$2 }' | \
grep '^\(common\|64\|x32\)$$')"
@@ -88,27 +88,27 @@ $(LINUX_SYSCALL_DIR)/arm.tbl.fixed: $(LINUX_SYSCALL_DIR)/arm.tbl linux/syscalls.
166 vm86 sys_vm86 \
167 query_module sys_query_module \
| cat -- $(LINUX_SYSCALL_DIR)/$(@F:.fixed=) - \
- | sed 's/\svserver\s*$$/& sys_ni_syscall/' \
- | sed 's/\snfsservctl\s*$$/& sys_nfsservctl/' \
+ | sed 's/$(s)vserver$(s)*$$/& sys_ni_syscall/' \
+ | sed 's/$(s)nfsservctl$(s)*$$/& sys_nfsservctl/' \
> $@
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)/$(@F:.h=.tbl).fixed \
- | sed '/^\s*\(\x23.*\)\?$$/d' \
+ | sed '/^$(s)*\($(h).*\)\{0,1\}$$/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)/$(@F:.h=.tbl).fixed \
- | sed '/^\s*\(\x23.*\)\?$$/d' \
+ | sed '/^$(s)*\($(h).*\)\{0,1\}$$/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)/$(@F:.h=.tbl).fixed | awk '{ print $$2 }')" = \
- "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl).fixed | awk '{ print $$2 }' | \
+ test "$$(sed '/^$(s)*\($(h).*\)\{0,1\}$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl).fixed | awk '{ print $$2 }')" = \
+ "$$(sed '/^$(s)*\($(h).*\)\{0,1\}$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl).fixed | awk '{ print $$2 }' | \
grep '^\(common\|oabi\|eabi\)$$')"
@@ -123,11 +123,11 @@ generated/linux-syscalls/ia64.h: $(LINUX_SYSCALL_DIR)/ia64.tbl linux/syscalls.mk
$$(( 1135 - 1024 )) get_kernel_syms sys_get_kernel_syms \
$$(( 1136 - 1024 )) query_module sys_query_module \
| cat -- $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) - \
- | sed '/^\s*\(\x23.*\)\?$$/d' \
+ | sed '/^$(s)*\($(h).*\)\{0,1\}$$/d' \
| awk '{ print "\tX((" $$1 " + 1024), " $$3 ", " $$4 ") D\\"}' \
| sed '$$s/ D\\$$//' >> $@
- 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$$')"
+ test "$$(sed '/^$(s)*\($(h).*\)\{0,1\}$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) | awk '{ print $$2 }')" = \
+ "$$(sed '/^$(s)*\($(h).*\)\{0,1\}$$/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
@@ -152,11 +152,11 @@ generated/linux-syscalls/m68k.h: $(LINUX_SYSCALL_DIR)/m68k.tbl linux/syscalls.mk
137 afs_syscall sys_ni_syscall \
278 vserver sys_ni_syscall \
| cat -- $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) - \
- | sed '/^\s*\(\x23.*\)\?$$/d' \
+ | sed '/^$(s)*\($(h).*\)\{0,1\}$$/d' \
| awk '{ print "\tX(" $$1 ", " $$3 ", " $$4 ") D\\"}' \
| sed '$$s/ D\\$$//' >> $@
- 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$$')"
+ test "$$(sed '/^$(s)*\($(h).*\)\{0,1\}$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) | awk '{ print $$2 }')" = \
+ "$$(sed '/^$(s)*\($(h).*\)\{0,1\}$$/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
@@ -166,11 +166,11 @@ generated/linux-syscalls/microblaze.h: $(LINUX_SYSCALL_DIR)/microblaze.tbl linux
251 set_zone_reclaim sys_set_zone_reclaim \
285 setaltroot sys_setaltroot \
| cat -- $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) - \
- | sed '/^\s*\(\x23.*\)\?$$/d' \
+ | sed '/^$(s)*\($(h).*\)\{0,1\}$$/d' \
| awk '{ print "\tX(" $$1 ", " $$3 ", " $$4 ") D\\"}' \
| sed '$$s/ D\\$$//' >> $@
- 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$$')"
+ test "$$(sed '/^$(s)*\($(h).*\)\{0,1\}$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) | awk '{ print $$2 }')" = \
+ "$$(sed '/^$(s)*\($(h).*\)\{0,1\}$$/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
@@ -179,11 +179,11 @@ generated/linux-syscalls/mips-n32.h: $(LINUX_SYSCALL_DIR)/mips-n32.tbl linux/sys
printf '%i common %s %s\n' \
242 setaltroot sys_setaltroot \
| cat -- $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) - \
- | sed '/^\s*\(\x23.*\)\?$$/d' \
+ | sed '/^$(s)*\($(h).*\)\{0,1\}$$/d' \
| awk '{ print "\tX(" $$1 ", " $$3 ", " $$4 ") D\\"}' \
| sed '$$s/ D\\$$//' >> $@
- 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$$')"
+ test "$$(sed '/^$(s)*\($(h).*\)\{0,1\}$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) | awk '{ print $$2 }')" = \
+ "$$(sed '/^$(s)*\($(h).*\)\{0,1\}$$/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
@@ -192,11 +192,11 @@ generated/linux-syscalls/mips-n64.h: $(LINUX_SYSCALL_DIR)/mips-n64.tbl linux/sys
printf '%i common %s %s\n' \
238 setaltroot sys_setaltroot \
| cat -- $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) - \
- | sed '/^\s*\(\x23.*\)\?$$/d' \
+ | sed '/^$(s)*\($(h).*\)\{0,1\}$$/d' \
| awk '{ print "\tX(" $$1 ", " $$3 ", " $$4 ") D\\"}' \
| sed '$$s/ D\\$$//' >> $@
- 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 }' | \
+ test "$$(sed '/^$(s)*\($(h).*\)\{0,1\}$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) | awk '{ print $$2 }')" = \
+ "$$(sed '/^$(s)*\($(h).*\)\{0,1\}$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) | awk '{ print $$2 }' | \
grep '^\(n64\|common\)$$')"
@@ -210,13 +210,13 @@ generated/linux-syscalls/mips-o32.h: $(LINUX_SYSCALL_DIR)/mips-o32.tbl linux/sys
84 old_lstat sys_lstat \
279 setaltroot sys_setaltroot \
| cat -- $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) - \
- | sed '/^\s*\(18\|28\|82\|84\)\s\+o32.*$$/d' \
- | sed '/^\s*\(\x23.*\)\?$$/d' \
+ | sed '/^$(s)*\(18\|28\|82\|84\)$(s)\{1,\}o32.*$$/d' \
+ | sed '/^$(s)*\($(h).*\)\{0,1\}$$/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)/$(@F:.h=.tbl) | awk '{ print $$2 }')" = \
- "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) | awk '{ print $$2 }' | grep '^o32$$')"
+ test "$$(sed '/^$(s)*\($(h).*\)\{0,1\}$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) | awk '{ print $$2 }')" = \
+ "$$(sed '/^$(s)*\($(h).*\)\{0,1\}$$/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
@@ -244,19 +244,19 @@ generated/linux-syscalls/parisc.h: $(LINUX_SYSCALL_DIR)/parisc.tbl.fixed linux/s
mkdir -p -- generated/linux-syscalls
printf '\43define LIST_LINUX_SYSCALLS_FOR_PARISC_64(X, _X_COMPAT, D)\\\n' > $@
cat -- $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl).fixed \
- | sed '/^\s*\(\x23.*\)\?$$/d' \
+ | sed '/^$(s)*\($(h).*\)\{0,1\}$$/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)/$(@F:.h=.tbl).fixed \
- | sed '/^\s*\(\x23.*\)\?$$/d' \
+ | sed '/^$(s)*\($(h).*\)\{0,1\}$$/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)/$(@F:.h=.tbl).fixed | awk '{ print $$2 }')" = \
- "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl).fixed | awk '{ print $$2 }' | \
+ test "$$(sed '/^$(s)*\($(h).*\)\{0,1\}$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl).fixed | awk '{ print $$2 }')" = \
+ "$$(sed '/^$(s)*\($(h).*\)\{0,1\}$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl).fixed | awk '{ print $$2 }' | \
grep '^\(common\|64\|32\)$$')"
@@ -264,32 +264,32 @@ generated/linux-syscalls/powerpc.h: $(LINUX_SYSCALL_DIR)/powerpc.tbl linux/sysca
mkdir -p -- generated/linux-syscalls
printf '\43define LIST_LINUX_SYSCALLS_FOR_POWERPC_32(X, X_COMPAT, D)\\\n' > $@
cat -- $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) \
- | sed '/^\s*\(\x23.*\)\?$$/d' \
+ | sed '/^$(s)*\($(h).*\)\{0,1\}$$/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)/$(@F:.h=.tbl) \
- | sed '/^\s*\(\x23.*\)\?$$/d' \
+ | sed '/^$(s)*\($(h).*\)\{0,1\}$$/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)/$(@F:.h=.tbl) \
- | sed '/^\s*\(\x23.*\)\?$$/d' \
+ | sed '/^$(s)*\($(h).*\)\{0,1\}$$/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)/$(@F:.h=.tbl) \
- | sed '/^\s*\(\x23.*\)\?$$/d' \
+ | sed '/^$(s)*\($(h).*\)\{0,1\}$$/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)/$(@F:.h=.tbl) | awk '{ print $$2 }')" = \
- "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) | awk '{ print $$2 }' | \
+ test "$$(sed '/^$(s)*\($(h).*\)\{0,1\}$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) | awk '{ print $$2 }')" = \
+ "$$(sed '/^$(s)*\($(h).*\)\{0,1\}$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) | awk '{ print $$2 }' | \
grep '^\(common\|spu\|nospu\|64\|32\)$$')"
@@ -297,21 +297,21 @@ 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)/$(@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)*\($(h).*\)\{0,1\}$$/d' \
+ | sed 's/^$(s)*\([0-9]\{1,\}\)$(s)\{1,\}\([A-Za-z0-9_]\{1,\}\)$(s)\{1,\}\([A-Za-z0-9_]\{1,\}\)$(s)\{1,\}-$(s)\{1,\}-$(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)/$(@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 /' \
+ | sed '/^$(s)*\($(h).*\)\{0,1\}$$/d' \
+ | sed 's/^$(s)*\([0-9]\{1,\}\)$(s)\{1,\}\([A-Za-z0-9_]\{1,\}\)$(s)\{1,\}\([A-Za-z0-9_]\{1,\}\)$(s)\{1,\}-$(s)\{1,\}-$(s)*$$/\1 \2 \3 sys_\3 sys_\3/' \
+ | sed 's/^$(s)*\(89\)$(s)\{1,\}\(common\)$(s)\{1,\}\(readdir\)$(s)\{1,\}-$(s)\{1,\}/\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)/$(@F:.h=.tbl) | awk '{ print $$2 }')" = \
- "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) | awk '{ print $$2 }' | \
+ test "$$(sed '/^$(s)*\($(h).*\)\{0,1\}$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) | awk '{ print $$2 }')" = \
+ "$$(sed '/^$(s)*\($(h).*\)\{0,1\}$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) | awk '{ print $$2 }' | \
grep '^\(common\|32\|64\)$$')"
@@ -340,11 +340,11 @@ generated/linux-syscalls/sh.h: $(LINUX_SYSCALL_DIR)/sh.tbl linux/syscalls.mk
166 vm86 sys_vm86 \
167 query_module sys_query_module \
| cat -- $(LINUX_SYSCALL_DIR)/sh.tbl - \
- | sed '/^\s*\(\x23.*\)\?$$/d' \
+ | sed '/^$(s)*\($(h).*\)\{0,1\}$$/d' \
| awk '{ print "\tX(" $$1 ", " $$3 ", " $$4 ") D\\"}' \
| sed '$$s/ D\\$$//' >> $@
- 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$$')"
+ test "$$(sed '/^$(s)*\($(h).*\)\{0,1\}$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) | awk '{ print $$2 }')" = \
+ "$$(sed '/^$(s)*\($(h).*\)\{0,1\}$$/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
@@ -354,8 +354,8 @@ generated/linux-syscalls/sparc.h: $(LINUX_SYSCALL_DIR)/sparc.tbl linux/syscalls.
267 vserver sys_vserver \
| 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' \
+ | sed '/^$(s)*267$(s)\{1,\}common$(s)\{1,\}vserver$(s)\{1,\}.*$$/d' \
+ | sed '/^$(s)*\($(h).*\)\{0,1\}$$/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\\/' \
@@ -364,13 +364,13 @@ generated/linux-syscalls/sparc.h: $(LINUX_SYSCALL_DIR)/sparc.tbl linux/syscalls.
printf '%i common %s %s\n' \
267 vserver sys_vserver \
| cat -- $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) - \
- | sed '/^\s*267\s\+common\s\+vserver\s\+.*$$/d' \
- | sed '/^\s*\(\x23.*\)\?$$/d' \
+ | sed '/^$(s)*267$(s)\{1,\}common$(s)\{1,\}vserver$(s)\{1,\}.*$$/d' \
+ | sed '/^$(s)*\($(h).*\)\{0,1\}$$/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)/$(@F:.h=.tbl) | awk '{ print $$2 }')" = \
- "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) | awk '{ print $$2 }' | \
+ test "$$(sed '/^$(s)*\($(h).*\)\{0,1\}$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) | awk '{ print $$2 }')" = \
+ "$$(sed '/^$(s)*\($(h).*\)\{0,1\}$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) | awk '{ print $$2 }' | \
grep '^\(common\|32\|64\)$$')"
@@ -381,14 +381,14 @@ generated/linux-syscalls/x86.h: $(LINUX_SYSCALL_DIR)/x86.tbl linux/syscalls.mk
251 set_zone_reclaim sys_set_zone_reclaim \
285 setaltroot sys_setaltroot \
| 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' \
+ | sed 's/$(s)\{1,\}\(break\|stty\|gtty\|ftime\|prof\|lock\|mpx\|ulimit\|profil\|idle\|afs_syscall\|getpmsg\|putpmsg\|vserver\)$(s)*$$/& sys_ni_syscall/' \
+ | sed 's/^$(s)*[0-9]\{1,\}$(s)\{1,\}[a-z0-9]\{1,\}$(s)\{1,\}\([A-Za-z0-9_]\{1,\}\)$(s)*$$/& sys_\1/' \
+ | sed '/^$(s)*\($(h).*\)\{0,1\}$$/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)/$(@F:.h=.tbl) | awk '{ print $$2 }')" = \
- "$$(sed '/^\s*\(\x23.*\)\?$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) | awk '{ print $$2 }' | grep '^i386$$')"
+ test "$$(sed '/^$(s)*\($(h).*\)\{0,1\}$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) | awk '{ print $$2 }')" = \
+ "$$(sed '/^$(s)*\($(h).*\)\{0,1\}$$/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
@@ -397,14 +397,14 @@ generated/linux-syscalls/xtensa.h: $(LINUX_SYSCALL_DIR)/xtensa.tbl linux/syscall
printf '%i common %s %s\n' \
305 timerfd sys_timerfd \
| 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' \
+ | sed 's/reserved152$(s)\{1,\}sys_ni_syscall/set_thread_area sys_set_thread_area/' \
+ | sed 's/reserved153$(s)\{1,\}sys_ni_syscall/get_thread_area sys_get_thread_area/' \
+ | sed 's/nfsservctl$(s)\{1,\}sys_ni_syscall/nfsservctl sys_nfsservctl/' \
+ | sed '/^$(s)*\($(h).*\)\{0,1\}$$/d' \
| awk '{ print "\tX(" $$1 ", " $$3 ", " $$4 ") D\\"}' \
| sed '$$s/ D\\$$//' >> $@
- 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$$')"
+ test "$$(sed '/^$(s)*\($(h).*\)\{0,1\}$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) | awk '{ print $$2 }')" = \
+ "$$(sed '/^$(s)*\($(h).*\)\{0,1\}$$/d' < $(LINUX_SYSCALL_DIR)/$(@F:.h=.tbl) | awk '{ print $$2 }' | grep '^common$$')"
$(LINUX_SYSCALLS_ARCH_TBL_SIMPLE): $(LINUX_SOURCE) linux/syscalls.mk
@@ -436,7 +436,7 @@ generated/linux-syscall-dedup.h: $(HDR) $(LINUX_SYSCALLS_HDR) linux/syscalls.h l
cpp -DCREATING_DEDUP_TABLE linux/syscall-table.c \
| grep -v '^#' \
| tr '\n;\t' ' \n ' \
- | sed -n 's/^.* libsyscalls_syscall \+\(linux_[A-Z0-9a-z_]\+_syscall_[A-Z0-9a-z_]\+.*\)$$/\1/p' \
+ | sed -n 's/^.* libsyscalls_syscall \{1,\}\(linux_[A-Z0-9a-z_]\{1,\}_syscall_[A-Z0-9a-z_]\{1,\}.*\)$$/\1/p' \
| tr -d ' ' \
| sed 's/=/ /' \
| sort -k 2 \