Page MenuHomeFreeBSD

D23197.diff
No OneTemporary

D23197.diff

Index: head/sys/amd64/linux/Makefile
===================================================================
--- head/sys/amd64/linux/Makefile
+++ head/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"
Index: head/sys/amd64/linux32/Makefile
===================================================================
--- head/sys/amd64/linux32/Makefile
+++ head/sys/amd64/linux32/Makefile
@@ -2,27 +2,6 @@
#
# $FreeBSD$
-# Don't use an OBJDIR
-.OBJDIR: ${.CURDIR}
+GENERATED_PREFIX= linux32_
-.include <src.lua.mk>
-
-MAKESYSCALLS= ../../tools/makesyscalls.lua
-SRCS= syscalls.conf \
- syscalls.master
-GENERATED= linux32_proto.h \
- linux32_syscall.h \
- linux32_syscalls.c \
- linux32_sysent.c \
- linux32_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"
Index: head/sys/arm/linux/Makefile
===================================================================
--- head/sys/arm/linux/Makefile
+++ head/sys/arm/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"
Index: head/sys/arm64/linux/Makefile
===================================================================
--- head/sys/arm64/linux/Makefile
+++ head/sys/arm64/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"
Index: head/sys/compat/cloudabi32/Makefile
===================================================================
--- head/sys/compat/cloudabi32/Makefile
+++ head/sys/compat/cloudabi32/Makefile
@@ -1,27 +1,6 @@
# $FreeBSD$
-# Don't use an OBJDIR
-.OBJDIR: ${.CURDIR}
+SYSENT_FILE= ${SYSDIR}/contrib/cloudabi/syscalls32.master
+GENERATED_PREFIX= cloudabi32_
-.include <src.lua.mk>
-
-MAKESYSCALLS= ../../tools/makesyscalls.lua
-SRCS= syscalls.conf \
- ../../contrib/cloudabi/syscalls32.master
-GENERATED= cloudabi32_proto.h \
- cloudabi32_syscall.h \
- cloudabi32_syscalls.c \
- cloudabi32_sysent.c \
- cloudabi32_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} \
- ../../contrib/cloudabi/syscalls32.master syscalls.conf
+.include "../../conf/sysent.mk"
Index: head/sys/compat/cloudabi64/Makefile
===================================================================
--- head/sys/compat/cloudabi64/Makefile
+++ head/sys/compat/cloudabi64/Makefile
@@ -1,27 +1,6 @@
# $FreeBSD$
-.include <src.lua.mk>
+SYSENT_FILE= ${SYSDIR}/contrib/cloudabi/syscalls64.master
+GENERATED_PREFIX= cloudabi64_
-# Don't use an OBJDIR
-.OBJDIR: ${.CURDIR}
-
-MAKESYSCALLS= ../../tools/makesyscalls.lua
-SRCS= syscalls.conf \
- ../../contrib/cloudabi/syscalls64.master
-GENERATED= cloudabi64_proto.h \
- cloudabi64_syscall.h \
- cloudabi64_syscalls.c \
- cloudabi64_sysent.c \
- cloudabi64_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} \
- ../../contrib/cloudabi/syscalls64.master syscalls.conf
+.include "../../conf/sysent.mk"
Index: head/sys/compat/freebsd32/Makefile
===================================================================
--- head/sys/compat/freebsd32/Makefile
+++ head/sys/compat/freebsd32/Makefile
@@ -2,28 +2,6 @@
#
# $FreeBSD$
-# Don't use an OBJDIR
-.OBJDIR: ${.CURDIR}
+GENERATED_PREFIX= freebsd32_
-.include <src.lua.mk>
-
-MAKESYSCALLS= ../../tools/makesyscalls.lua
-SRCS= ../../kern/capabilities.conf \
- syscalls.conf \
- syscalls.master
-GENERATED= freebsd32_proto.h \
- freebsd32_syscall.h \
- freebsd32_syscalls.c \
- freebsd32_sysent.c \
- freebsd32_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"
Index: head/sys/conf/sysent.mk
===================================================================
--- head/sys/conf/sysent.mk
+++ head/sys/conf/sysent.mk
@@ -0,0 +1,35 @@
+# $FreeBSD$
+
+# Don't use an OBJDIR
+.OBJDIR: ${.CURDIR}
+
+.include <bsd.sysdir.mk>
+.include <src.lua.mk>
+
+COMMON_GENERATED= proto.h \
+ syscall.h \
+ syscalls.c \
+ sysent.c \
+ systrace_args.c
+
+GENERATED_PREFIX?=
+GENERATED?= ${COMMON_GENERATED:S/^/${GENERATED_PREFIX}/}
+SYSENT_FILE?= syscalls.master
+SYSENT_CONF?= syscalls.conf
+
+# Including Makefile should override SYSENT_FILE and SYSENT_CONF as needed,
+# and set GENERATED.
+SRCS+= ${SYSENT_FILE}
+SRCS+= ${SYSENT_CONF}
+MAKESYSCALLS= ${SYSDIR}/tools/makesyscalls.lua
+
+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} ${SYSENT_FILE} ${SYSENT_CONF}
Index: head/sys/i386/linux/Makefile
===================================================================
--- head/sys/i386/linux/Makefile
+++ head/sys/i386/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"
Index: head/sys/kern/Makefile
===================================================================
--- head/sys/kern/Makefile
+++ head/sys/kern/Makefile
@@ -3,28 +3,12 @@
#
# Makefile for init_sysent
-# Don't use an OBJDIR
-.OBJDIR: ${.CURDIR}
+SYSENT_CONF=
+GENERATED= init_sysent.c \
+ syscalls.c \
+ systrace_args.c \
+ ${SYSDIR}/sys/syscall.h \
+ ${SYSDIR}/sys/syscall.mk \
+ ${SYSDIR}/sys/sysproto.h
-.include <src.lua.mk>
-
-MAKESYSCALLS= ../tools/makesyscalls.lua
-SRCS= capabilities.conf \
- syscalls.master
-GENERATED= init_sysent.c \
- syscalls.c \
- systrace_args.c \
- ../sys/syscall.h \
- ../sys/syscall.mk \
- ../sys/sysproto.h
-
-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
+.include "../conf/sysent.mk"

File Metadata

Mime Type
text/plain
Expires
Sat, Oct 18, 10:48 PM (5 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
23897812
Default Alt Text
D23197.diff (9 KB)

Event Timeline