From 2a466bc4511737a30176102a67ce7f2d98c81cd9 Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Tue, 21 Jan 2020 05:01:11 +0000 Subject: [PATCH] sysent.mk: split interpreter out of target command The main objective here is to make it easy to identify what needs to change in order to use a different sysent generator than the current Lua-based one, which may be used to MFC some of the changes that have happened so we can avoid parallel accidents in stable branches, for instance. As a secondary objective, it's now feasible to override the generator on a per-Makefile basis if needed, so that one could refactor their Makefile to use this while pinning generation to the legacy makesyscalls.sh. I don't anticipate any consistent need for such a thing, but it's low-effort to achieve. --- sys/conf/sysent.mk | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/conf/sysent.mk b/sys/conf/sysent.mk index 3b11c1042c7..6fc64bcf8c8 100644 --- a/sys/conf/sysent.mk +++ b/sys/conf/sysent.mk @@ -21,7 +21,10 @@ SYSENT_CONF?= syscalls.conf # and set GENERATED. SRCS+= ${SYSENT_FILE} SRCS+= ${SYSENT_CONF} -MAKESYSCALLS= ${SYSDIR}/tools/makesyscalls.lua + +MAKESYSCALLS_INTERP?= ${LUA} +MAKESYSCALLS_SCRIPT?= ${SYSDIR}/tools/makesyscalls.lua +MAKESYSCALLS= ${MAKESYSCALLS_INTERP} ${MAKESYSCALLS_SCRIPT} all: @echo "make sysent only" @@ -31,5 +34,5 @@ all: .ORDER: ${GENERATED} sysent: ${GENERATED} -${GENERATED}: ${MAKESYSCALLS} ${SRCS} - ${LUA} ${MAKESYSCALLS} ${SYSENT_FILE} ${SYSENT_CONF} +${GENERATED}: ${MAKESYSCALLS_SCRIPT} ${SRCS} + ${MAKESYSCALLS} ${SYSENT_FILE} ${SYSENT_CONF}