summaryrefslogtreecommitdiffstats
path: root/linux/syscall-table.mk
diff options
context:
space:
mode:
Diffstat (limited to 'linux/syscall-table.mk')
-rw-r--r--linux/syscall-table.mk14
1 files changed, 10 insertions, 4 deletions
diff --git a/linux/syscall-table.mk b/linux/syscall-table.mk
index 7e6fb1a..a90be35 100644
--- a/linux/syscall-table.mk
+++ b/linux/syscall-table.mk
@@ -10,7 +10,7 @@ libsyscalls_get_syscall_range.o: $(LINUX_SYSCALLS_HDR)
libsyscalls_get_syscall_range.lo: $(LINUX_SYSCALLS_HDR)
-generated/linux-syscall-table.h: linux/syscall-table.c common.h linux/linux-support.mk
+generated/linux-syscall-table.h: linux/syscall-table.c common.h linux/linux-support.mk linux/syscall-table.mk
set -e; \
macros="$$(sed -n 's/^$(s)*$(h)$(s)*define$(s)\{1,\}MAKE_\([^(]*\)(.*$$/\1/p' < linux/syscall-table.c)"; \
for arch in $(SUPPORTED_LINUX_ARCHES); do \
@@ -18,17 +18,19 @@ generated/linux-syscall-table.h: linux/syscall-table.c common.h linux/linux-supp
printf '\43define MAKE_%s_%s(...) MAKE_%s(%s, __VA_ARGS__)\n' \
"$$arch" "$$macro" "$$macro" "$$arch"; \
done; \
- done > $@
+ done \
+ | sed 's/_[BL]E\([_,]\)/\1/g' \
+ | sort -u > $@
-generated/linux-syscalls.h: linux/syscalls.mk
+generated/linux-syscalls.h: linux/syscalls.mk linux/syscall-table.mk
mkdir -p -- generated
printf '\43include "%s"\n' $(LINUX_SYSCALLS_HDR) \
| grep -v '"$@"' \
| sed 's:generated/::' > $@
-generated/linux-syscall-ranges.h: $(LINUX_SYSCALLS_ARCH_HDR)
+generated/linux-syscall-ranges.h: $(LINUX_SYSCALLS_ARCH_HDR) linux/syscall-table.mk
printf '%s\n' 'This may take some time ...'; \
set -e; arch=; \
cat -- $(LINUX_SYSCALLS_ARCH_HDR) \
@@ -60,3 +62,7 @@ generated/linux-syscall-ranges.h: $(LINUX_SYSCALLS_ARCH_HDR)
MIN "$$arch" "$$min" \
MAX "$$arch" "$$max"; \
) > $@
+ printf '\43define MIN_LINUX_SYSCALL_FOR_%s\n' $(SUPPORTED_LINUX_ARCHES) \
+ | sed -n 's/\(MIN_LINUX_SYSCALL_FOR_.*\)_[LB]E$$/& \1/p' >> $@
+ printf '\43define MAX_LINUX_SYSCALL_FOR_%s\n' $(SUPPORTED_LINUX_ARCHES) \
+ | sed -n 's/\(MAX_LINUX_SYSCALL_FOR_.*\)_[LB]E$$/& \1/p' >> $@