public inbox for location@lists.ipfire.org
 help / color / mirror / Atom feed
* [PATCH 1/2] Makefile: Install Lua in `exec` stage, not `data`
@ 2026-06-24 13:39 Valters Jansons
  2026-06-24 13:39 ` [PATCH 2/2] Makefile: Avoid installing libtool control files Valters Jansons
  0 siblings, 1 reply; 3+ messages in thread
From: Valters Jansons @ 2026-06-24 13:39 UTC (permalink / raw)
  To: location

Automake installation has two stages:
* `exec` for platform-specific files,
* `data` for platform-agnostic files.

Automake separates the install stages based on the directory (target)
variable name. Built-in targets have known stages. Any custom-defined
ones check simply whether the target name contains `exec` substring.

Currently, the Lua module is installed in the `data` stage, because
`lua` is not considered an `exec` stage name. However, the Lua module
contains C code (it is architecture-specific).

Similar to how Python is installed via `pyexec`, Lua should be
installed via `luaexec`. That way Automake splits it into `exec` stage
correctly.

Internally, the installation target directory is `LUA_INSTALL_CMOD`
which also signals that this is a platform/architecture-specific
installation. This logic remains unchanged, and the Lua `.so` gets
installed to the same target as a result.

This change is also important to allow libtool cleanup to be done in
`install-exec-hook` consistently. Without this change, part of la-files
cleanup would need to be moved to `install-data-hook`.

Ref: https://www.gnu.org/software/automake/manual/html_node/The-Two-Parts-of-Install.html

Signed-off-by: Valters Jansons <valter.jansons@gmail.com>
---
 Makefile.am | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index c5b8df3..a64a20a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -230,10 +230,10 @@ src_python__location_la_LIBADD = \
 # ------------------------------------------------------------------------------
 
 if ENABLE_LUA
-lua_LTLIBRARIES = \
+luaexec_LTLIBRARIES = \
 	src/lua/location.la
 
-luadir = $(LUA_INSTALL_CMOD)
+luaexecdir = $(LUA_INSTALL_CMOD)
 
 src_lua_location_la_SOURCES = \
 	src/lua/as.c \
-- 
2.54.0



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-06-24 13:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-24 13:39 [PATCH 1/2] Makefile: Install Lua in `exec` stage, not `data` Valters Jansons
2026-06-24 13:39 ` [PATCH 2/2] Makefile: Avoid installing libtool control files Valters Jansons
2026-06-24 13:49   ` [PATCH 2/2] [v2] " Valters Jansons

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox