From 2ee689084ae6575252a37d26f5d40d2f5d3ad40f Mon Sep 17 00:00:00 2001 From: "Darryl L. Miles" Date: Wed, 22 Jul 2026 17:00:48 +0000 Subject: [PATCH] build: tiles/Makefile.in uses @srcdir@ substitution Switch tiles from the defs.mak srcdir *derivation* to configure-provided substitution: srcdir = @srcdir@ VPATH = @srcdir@ MAGICDIR = @top_builddir@ defs.mak's dual-mode guard now sees `srcdir` already set (origin=file) and skips the $(abspath)/$(patsubst) srcdir computation for this module. Verified: config.status writes srcdir=/tiles into build/tiles/Makefile; make -C tiles module compiles from that srcdir (libtiles.o, rc=0) with the derivation bypassed. This is the template the remaining modules follow. Co-Authored-By: Claude Opus 4.8 (1M context) --- tiles/Makefile.in | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tiles/Makefile.in b/tiles/Makefile.in index e5684e01..ce120b67 100644 --- a/tiles/Makefile.in +++ b/tiles/Makefile.in @@ -3,7 +3,11 @@ # MODULE = tiles -MAGICDIR = .. +# Provided by configure: the module's source dir + the build top. +# defs.mak sees `srcdir` already set and skips its own srcdir derivation. +srcdir = @srcdir@ +VPATH = @srcdir@ +MAGICDIR = @top_builddir@ SRCS = tile.c search.c include ${MAGICDIR}/defs.mak