Author: kevans
Date: Mon Nov 18 23:28:23 2019
New Revision: 354835
URL: https://svnweb.freebsd.org/changeset/base/354835

Log:
  Convert in-tree sysent targets to use new makesyscalls.lua
  
  flua is bootstrapped as part of the build for those on older
  versions/revisions that don't yet have flua installed. Once upgraded past
  r354833, "make sysent" will again naturally work as expected.
  
  Reviewed by:  brooks
  Differential Revision:        https://reviews.freebsd.org/D21894

Modified:
  head/Makefile.inc1
  head/sys/amd64/linux/Makefile
  head/sys/amd64/linux32/Makefile
  head/sys/arm64/linux/Makefile
  head/sys/compat/cloudabi32/Makefile
  head/sys/compat/cloudabi64/Makefile
  head/sys/compat/freebsd32/Makefile
  head/sys/i386/linux/Makefile
  head/sys/kern/Makefile
  head/sys/sys/param.h
  head/tools/build/Makefile

Modified: head/Makefile.inc1
==============================================================================
--- head/Makefile.inc1  Mon Nov 18 23:23:38 2019        (r354834)
+++ head/Makefile.inc1  Mon Nov 18 23:28:23 2019        (r354835)
@@ -1499,6 +1499,11 @@ makeman: .PHONY
        ${_+_}cd ${.CURDIR}/tools/build/options; sh makeman > \
            ${.CURDIR}/share/man/man5/src.conf.5
 
+.if make(sysent)
+.include <src.lua.mk>
+.endif
+
+_sysent_PATH=  ${WORLDTMP}/legacy/usr/libexec:/usr/libexec:${PATH}
 _sysent_dirs=  sys/kern
 _sysent_dirs+= sys/compat/freebsd32
 _sysent_dirs+= sys/compat/cloudabi32   \
@@ -1509,7 +1514,9 @@ _sysent_dirs+=    sys/amd64/linux         \
                sys/i386/linux
 sysent: .PHONY
 .for _dir in ${_sysent_dirs}
-       ${_+_}${MAKE} -C ${.CURDIR}/${_dir} sysent
+       @echo "${MAKE} -C ${.CURDIR}/${_dir} sysent"
+       ${_+_}@env PATH=${_sysent_PATH} LUA=${LUA_CMD} \
+           ${MAKE} -C ${.CURDIR}/${_dir} sysent
 .endfor
 
 #
@@ -2168,6 +2175,13 @@ ${_bt}-lib/libelf: ${_bt_m4_depend}
 ${_bt}-lib/libdwarf: ${_bt_m4_depend}
 .endif
 
+# flua is required to regenerate syscall files.  It first appeared during the
+# 13.0-CURRENT cycle, thus needs to be built on -older releases and stable
+# branches.
+.if ${BOOTSTRAPPING} < 1300059
+_flua= libexec/flua
+.endif
+
 # r245440 mtree -N support added
 # r313404 requires sha384.h for libnetbsd, added to libmd in r292782
 .if ${BOOTSTRAPPING} < 1100093
@@ -2390,6 +2404,7 @@ bootstrap-tools: ${_bt}-links .PHONY
     usr.bin/xinstall \
     ${_gensnmptree} \
     usr.sbin/config \
+    ${_flua} \
     ${_crunchide} \
     ${_crunchgen} \
     ${_nmtree} \

Modified: head/sys/amd64/linux/Makefile
==============================================================================
--- head/sys/amd64/linux/Makefile       Mon Nov 18 23:23:38 2019        
(r354834)
+++ head/sys/amd64/linux/Makefile       Mon Nov 18 23:28:23 2019        
(r354835)
@@ -5,11 +5,13 @@
 # Don't use an OBJDIR
 .OBJDIR: ${.CURDIR}
 
+.include <src.lua.mk>
+
 all:
        @echo "make sysent only"
 
 sysent:  linux_sysent.c linux_syscall.h linux_proto.h linux_syscalls.c 
linux_systrace_args.c
 
 linux_sysent.c linux_syscall.h linux_proto.h linux_syscalls.c 
linux_systrace_args.c: \
-               ../../kern/makesyscalls.sh syscalls.master 
${.CURDIR}/syscalls.conf
-       sh ../../kern/makesyscalls.sh syscalls.master ${.CURDIR}/syscalls.conf
+               ../../tools/makesyscalls.lua syscalls.master 
${.CURDIR}/syscalls.conf
+       ${LUA} ../../tools/makesyscalls.lua syscalls.master 
${.CURDIR}/syscalls.conf

Modified: head/sys/amd64/linux32/Makefile
==============================================================================
--- head/sys/amd64/linux32/Makefile     Mon Nov 18 23:23:38 2019        
(r354834)
+++ head/sys/amd64/linux32/Makefile     Mon Nov 18 23:28:23 2019        
(r354835)
@@ -5,11 +5,13 @@
 # Don't use an OBJDIR
 .OBJDIR: ${.CURDIR}
 
+.include <src.lua.mk>
+
 all:
        @echo "make sysent only"
 
 sysent:  linux32_sysent.c linux32_syscall.h linux32_proto.h linux32_syscalls.c 
linux32_systrace_args.c
 
-linux32_sysent.c linux32_syscall.h linux32_proto.h linux32_syscalls.c 
linux32_systrace_args.c: ../../kern/makesyscalls.sh \
+linux32_sysent.c linux32_syscall.h linux32_proto.h linux32_syscalls.c 
linux32_systrace_args.c: ../../tools/makesyscalls.lua \
                syscalls.master ${.CURDIR}/syscalls.conf
-       sh ../../kern/makesyscalls.sh syscalls.master ${.CURDIR}/syscalls.conf
+       ${LUA} ../../tools/makesyscalls.lua syscalls.master 
${.CURDIR}/syscalls.conf

Modified: head/sys/arm64/linux/Makefile
==============================================================================
--- head/sys/arm64/linux/Makefile       Mon Nov 18 23:23:38 2019        
(r354834)
+++ head/sys/arm64/linux/Makefile       Mon Nov 18 23:28:23 2019        
(r354835)
@@ -5,11 +5,13 @@
 # Don't use an OBJDIR
 .OBJDIR: ${.CURDIR}
 
+.include <src.lua.mk>
+
 all:
        @echo "make sysent only"
 
 sysent:  linux_sysent.c linux_syscall.h linux_proto.h linux_syscalls.c 
linux_systrace_args.c
 
 linux_sysent.c linux_syscall.h linux_proto.h linux_syscalls.c 
linux_systrace_args.c: \
-               ../../kern/makesyscalls.sh syscalls.master 
${.CURDIR}/syscalls.conf
-       sh ../../kern/makesyscalls.sh syscalls.master ${.CURDIR}/syscalls.conf
+               ../../tools/makesyscalls.lua syscalls.master 
${.CURDIR}/syscalls.conf
+       ${LUA} ../../tools/makesyscalls.lua syscalls.master 
${.CURDIR}/syscalls.conf

Modified: head/sys/compat/cloudabi32/Makefile
==============================================================================
--- head/sys/compat/cloudabi32/Makefile Mon Nov 18 23:23:38 2019        
(r354834)
+++ head/sys/compat/cloudabi32/Makefile Mon Nov 18 23:28:23 2019        
(r354835)
@@ -3,6 +3,8 @@
 # Don't use an OBJDIR
 .OBJDIR: ${.CURDIR}
 
+.include <src.lua.mk>
+
 all:
        @echo "make sysent only"
 
@@ -11,7 +13,7 @@ sysent: cloudabi32_sysent.c cloudabi32_syscall.h cloud
 
 cloudabi32_sysent.c cloudabi32_syscall.h cloudabi32_proto.h \
     cloudabi32_syscalls.c cloudabi32_systrace_args.c: \
-    ../../kern/makesyscalls.sh ../../contrib/cloudabi/syscalls32.master \
+    ../../tools/makesyscalls.lua ../../contrib/cloudabi/syscalls32.master \
     ${.CURDIR}/syscalls.conf
-       sh ../../kern/makesyscalls.sh ../../contrib/cloudabi/syscalls32.master \
-           ${.CURDIR}/syscalls.conf
+       ${LUA} ../../tools/makesyscalls.lua \
+           ../../contrib/cloudabi/syscalls32.master ${.CURDIR}/syscalls.conf

Modified: head/sys/compat/cloudabi64/Makefile
==============================================================================
--- head/sys/compat/cloudabi64/Makefile Mon Nov 18 23:23:38 2019        
(r354834)
+++ head/sys/compat/cloudabi64/Makefile Mon Nov 18 23:28:23 2019        
(r354835)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <src.lua.mk>
+
 # Don't use an OBJDIR
 .OBJDIR: ${.CURDIR}
 
@@ -11,7 +13,7 @@ sysent: cloudabi64_sysent.c cloudabi64_syscall.h cloud
 
 cloudabi64_sysent.c cloudabi64_syscall.h cloudabi64_proto.h \
     cloudabi64_syscalls.c cloudabi64_systrace_args.c: \
-    ../../kern/makesyscalls.sh ../../contrib/cloudabi/syscalls64.master \
+    ../../tools/makesyscalls.lua ../../contrib/cloudabi/syscalls64.master \
     ${.CURDIR}/syscalls.conf
-       sh ../../kern/makesyscalls.sh ../../contrib/cloudabi/syscalls64.master \
-           ${.CURDIR}/syscalls.conf
+       ${LUA} ../../tools/makesyscalls.lua \
+           ../../contrib/cloudabi/syscalls64.master ${.CURDIR}/syscalls.conf

Modified: head/sys/compat/freebsd32/Makefile
==============================================================================
--- head/sys/compat/freebsd32/Makefile  Mon Nov 18 23:23:38 2019        
(r354834)
+++ head/sys/compat/freebsd32/Makefile  Mon Nov 18 23:28:23 2019        
(r354835)
@@ -5,14 +5,16 @@
 # Don't use an OBJDIR
 .OBJDIR: ${.CURDIR}
 
+.include <src.lua.mk>
+
 all:
        @echo "make sysent only"
 
 sysent:  freebsd32_sysent.c freebsd32_syscall.h freebsd32_proto.h 
freebsd32_systrace_args.c
 
 freebsd32_sysent.c freebsd32_syscalls.c freebsd32_syscall.h freebsd32_proto.h 
freebsd32_systrace_args.c : \
-           ../../kern/makesyscalls.sh syscalls.master ${.CURDIR}/syscalls.conf 
../../kern/capabilities.conf
-       sh ../../kern/makesyscalls.sh syscalls.master ${.CURDIR}/syscalls.conf
+           ../../tools/makesyscalls.lua syscalls.master 
${.CURDIR}/syscalls.conf ../../kern/capabilities.conf
+       ${LUA} ../../tools/makesyscalls.lua syscalls.master 
${.CURDIR}/syscalls.conf
 
 clean:
        rm -f freebsd32_sysent.c freebsd32_syscalls.c freebsd32_syscall.h 
freebsd32_proto.h

Modified: head/sys/i386/linux/Makefile
==============================================================================
--- head/sys/i386/linux/Makefile        Mon Nov 18 23:23:38 2019        
(r354834)
+++ head/sys/i386/linux/Makefile        Mon Nov 18 23:28:23 2019        
(r354835)
@@ -5,11 +5,13 @@
 # Don't use an OBJDIR
 .OBJDIR: ${.CURDIR}
 
+.include <src.lua.mk>
+
 all:
        @echo "make sysent only"
 
 sysent:  linux_sysent.c linux_syscall.h linux_proto.h linux_syscalls.c 
linux_systrace_args.c
 
 linux_sysent.c linux_syscall.h linux_proto.h linux_syscalls.c 
linux_systrace_args.c: \
-               ../../kern/makesyscalls.sh syscalls.master 
${.CURDIR}/syscalls.conf
-       sh ../../kern/makesyscalls.sh syscalls.master ${.CURDIR}/syscalls.conf
+               ../../tools/makesyscalls.lua syscalls.master 
${.CURDIR}/syscalls.conf
+       ${LUA} ../../tools/makesyscalls.lua syscalls.master 
${.CURDIR}/syscalls.conf

Modified: head/sys/kern/Makefile
==============================================================================
--- head/sys/kern/Makefile      Mon Nov 18 23:23:38 2019        (r354834)
+++ head/sys/kern/Makefile      Mon Nov 18 23:28:23 2019        (r354835)
@@ -6,6 +6,8 @@
 # Don't use an OBJDIR
 .OBJDIR: ${.CURDIR}
 
+.include <src.lua.mk>
+
 all:
        @echo "make sysent only"
 
@@ -13,6 +15,6 @@ sysent: init_sysent.c syscalls.c ../sys/syscall.h ../s
 ../sys/sysproto.h
 
 init_sysent.c syscalls.c systrace_args.c ../sys/syscall.h \
-../sys/syscall.mk ../sys/sysproto.h: makesyscalls.sh syscalls.master \
+../sys/syscall.mk ../sys/sysproto.h: ../tools/makesyscalls.lua syscalls.master 
\
 capabilities.conf
-       sh makesyscalls.sh syscalls.master
+       ${LUA} ../tools/makesyscalls.lua syscalls.master

Modified: head/sys/sys/param.h
==============================================================================
--- head/sys/sys/param.h        Mon Nov 18 23:23:38 2019        (r354834)
+++ head/sys/sys/param.h        Mon Nov 18 23:28:23 2019        (r354835)
@@ -60,7 +60,7 @@
  *             in the range 5 to 9.
  */
 #undef __FreeBSD_version
-#define __FreeBSD_version 1300058      /* Master, propagated to newvers */
+#define __FreeBSD_version 1300059      /* Master, propagated to newvers */
 
 /*
  * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,

Modified: head/tools/build/Makefile
==============================================================================
--- head/tools/build/Makefile   Mon Nov 18 23:23:38 2019        (r354834)
+++ head/tools/build/Makefile   Mon Nov 18 23:28:23 2019        (r354835)
@@ -127,6 +127,7 @@ INSTALLDIR_LIST= \
        usr/include/casper \
        usr/include/private/zstd \
        usr/lib \
+       usr/libexec
 
 installdirs:
        mkdir -p ${INSTALLDIR_LIST:S,^,${DESTDIR}/,}
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to