From: Valters Jansons <valter.jansons@gmail.com>
To: location@lists.ipfire.org
Subject: [PATCH 1/2] Makefile: Install Lua in `exec` stage, not `data`
Date: Wed, 24 Jun 2026 22:39:14 +0900 [thread overview]
Message-ID: <20260624133915.434197-1-valter.jansons@gmail.com> (raw)
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
next reply other threads:[~2026-06-24 13:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-24 13:39 Valters Jansons [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260624133915.434197-1-valter.jansons@gmail.com \
--to=valter.jansons@gmail.com \
--cc=location@lists.ipfire.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox