aboutsummaryrefslogtreecommitdiff
path: root/sys/amd64/linux
diff options
context:
space:
mode:
authorKyle Evans <kevans@FreeBSD.org>2020-01-18 20:37:45 +0000
committerKyle Evans <kevans@FreeBSD.org>2020-01-18 20:37:45 +0000
commit05d7dd739c5b89b5cad3153124667d743f3ccb3c (patch)
treecf17511281d2ed6d6a5f936c75d1b407c989a505 /sys/amd64/linux
parent19d4d771fce1ddaefd994ae3cda976df693638a7 (diff)
downloadsrc-05d7dd739c5b89b5cad3153124667d743f3ccb3c.tar.gz
src-05d7dd739c5b89b5cad3153124667d743f3ccb3c.zip
sysent targets: further cleanup and deduplication
r355473 vastly improved the readability and cleanliness of these Makefiles. Every single one of them follows the same pattern and duplicates the exact same logic. Now that we have GENERATED/SRCS, split SRCS up into the two parameters we'll use for ${MAKESYSCALLS} rather than assuming a specific ordering of SRCS and include a common sysent.mk to handle the rest. This makes it less tedious to make sweeping changes. Some default values are provided for GENERATED/SYSENT_*; almost all of these just use a 'syscalls.master' and 'syscalls.conf' in cwd, and they all use effectively the same filenames with an arbitrary prefix. Most ABIs will be able to get away with just setting GENERATED_PREFIX and including ^/sys/conf/sysent.mk, while others only need light additions. kern/Makefile is the notable exception, as it doesn't take a SYSENT_CONF and the generated files are spread out between ^/sys/kern and ^/sys/sys, but it otherwise fits the pattern enough to use the common version. Reviewed by: brooks, imp Nice!: emaste Differential Revision: https://reviews.freebsd.org/D23197
Notes
Notes: svn path=/head/; revision=356868
Diffstat (limited to 'sys/amd64/linux')
-rw-r--r--sys/amd64/linux/Makefile25
1 files changed, 2 insertions, 23 deletions
diff --git a/sys/amd64/linux/Makefile b/sys/amd64/linux/Makefile
index c37a5b25160c..662c7f8fc42f 100644
--- a/sys/amd64/linux/Makefile
+++ b/sys/amd64/linux/Makefile
@@ -2,27 +2,6 @@
#
# $FreeBSD$
-# Don't use an OBJDIR
-.OBJDIR: ${.CURDIR}
+GENERATED_PREFIX= linux_
-.include <src.lua.mk>
-
-MAKESYSCALLS= ../../tools/makesyscalls.lua
-SRCS= syscalls.conf \
- syscalls.master
-GENERATED= linux_proto.h \
- linux_syscall.h \
- linux_syscalls.c \
- linux_sysent.c \
- linux_systrace_args.c
-
-all:
- @echo "make sysent only"
-
-# We .ORDER these explicitly so that we only run MAKESYSCALLS once, rather than
-# potentially once for each ${GENERATED} file.
-.ORDER: ${GENERATED}
-sysent: ${GENERATED}
-
-${GENERATED}: ${MAKESYSCALLS} ${SRCS}
- ${LUA} ${MAKESYSCALLS} syscalls.master syscalls.conf
+.include "../../conf/sysent.mk"