git: e6e6ac56887b - stable/14 - flua: make the ucl module a dynamic module
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 08 Jul 2025 14:32:10 UTC
The branch stable/14 has been updated by bapt:
URL: https://cgit.FreeBSD.org/src/commit/?id=e6e6ac56887b6072cc6cafce454cb0ef3a4e6ad9
commit e6e6ac56887b6072cc6cafce454cb0ef3a4e6ad9
Author: Baptiste Daroussin <bapt@FreeBSD.org>
AuthorDate: 2024-09-06 15:13:08 +0000
Commit: Baptiste Daroussin <bapt@FreeBSD.org>
CommitDate: 2025-07-08 14:17:08 +0000
flua: make the ucl module a dynamic module
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D46569
(cherry picked from commit bb2d016afb009920f4bb2400c15a86e557b2d55a)
---
lib/flua/Makefile | 1 +
lib/flua/libucl/Makefile | 17 +++++++++++++++++
libexec/flua/Makefile | 9 ++-------
libexec/flua/linit_flua.c | 2 --
4 files changed, 20 insertions(+), 9 deletions(-)
diff --git a/lib/flua/Makefile b/lib/flua/Makefile
index 769736039f7e..168d05f54674 100644
--- a/lib/flua/Makefile
+++ b/lib/flua/Makefile
@@ -1,4 +1,5 @@
SUBDIR+= libhash
SUBDIR+= libjail
+SUBDIR+= libucl
.include <bsd.subdir.mk>
diff --git a/lib/flua/libucl/Makefile b/lib/flua/libucl/Makefile
new file mode 100644
index 000000000000..7d2681b85fcb
--- /dev/null
+++ b/lib/flua/libucl/Makefile
@@ -0,0 +1,17 @@
+SHLIB_NAME= ucl.so
+SHLIBDIR= ${LIBDIR}/flua
+
+WARNS= 2
+
+UCLSRC?= ${SRCTOP}/contrib/libucl
+.PATH: ${UCLSRC}/lua
+SRCS+= lua_ucl.c
+CFLAGS+= \
+ -I${SRCTOP}/contrib/lua/src \
+ -I${SRCTOP}/lib/liblua \
+ -I${UCLSRC}/include \
+ -I${UCLSRC}/src \
+ -I${UCLSRC}/uthash
+LIBADD+= ucl
+
+.include <bsd.lib.mk>
diff --git a/libexec/flua/Makefile b/libexec/flua/Makefile
index f79b00d0bbf9..4173e43baab2 100644
--- a/libexec/flua/Makefile
+++ b/libexec/flua/Makefile
@@ -5,7 +5,8 @@ LUASRC?= ${SRCTOP}/contrib/lua/src
.PATH: ${LUASRC}
PROG= flua
-WARNS?= 2
+WARNS?= 3
+MAN= # No manpage; this is internal.
CWARNFLAGS.gcc+= -Wno-format-nonliteral
@@ -31,10 +32,4 @@ LIBADD+= edit
LDFLAGS+= -Wl,-E
.endif
-UCLSRC?= ${SRCTOP}/contrib/libucl
-.PATH: ${UCLSRC}/lua
-SRCS+= lua_ucl.c
-CFLAGS+= -I${UCLSRC}/include -I${UCLSRC}/src -I${UCLSRC}/uthash
-LIBADD+= ucl
-
.include <bsd.prog.mk>
diff --git a/libexec/flua/linit_flua.c b/libexec/flua/linit_flua.c
index 6bc300095c27..87cabb58deb2 100644
--- a/libexec/flua/linit_flua.c
+++ b/libexec/flua/linit_flua.c
@@ -35,7 +35,6 @@
#include "lauxlib.h"
#include "lfs.h"
#include "lposix.h"
-#include "lua_ucl.h"
/*
** these libs are loaded by lua.c and are readily available to any Lua
@@ -60,7 +59,6 @@ static const luaL_Reg loadedlibs[] = {
{"posix.sys.stat", luaopen_posix_sys_stat},
{"posix.sys.utsname", luaopen_posix_sys_utsname},
{"posix.unistd", luaopen_posix_unistd},
- {"ucl", luaopen_ucl},
{NULL, NULL}
};