From f2c77ad927a8f20d960665df37720b4ded119a0b Mon Sep 17 00:00:00 2001 From: "Darryl L. Miles" Date: Wed, 22 Jul 2026 18:39:21 +0000 Subject: [PATCH] build: nested-child Makefile.in use @srcdir@ Switch the 5 nested children (scmos/cif_template, doc/man, doc/tutcells, doc/html, doc/latexfiles) to configure-provided substitution: srcdir = @srcdir@ VPATH = @srcdir@ MAGICDIR = @top_builddir@ (resolves to ../.. for these nested dirs) Verified out-of-tree: full `make` rc=0; cif_template gets srcdir=/scmos/cif_template, doc/latexfiles MAGICDIR=../..; scmos techs + 27/28 docs build. With this, every module except readline/ is a configure-generated Makefile.in using @srcdir@ substitution. Co-Authored-By: Claude Opus 4.8 (1M context) --- doc/html/Makefile.in | 7 +++++-- doc/latexfiles/Makefile.in | 7 +++++-- doc/man/Makefile.in | 7 +++++-- doc/tutcells/Makefile.in | 7 +++++-- scmos/cif_template/Makefile.in | 7 +++++-- 5 files changed, 25 insertions(+), 10 deletions(-) diff --git a/doc/html/Makefile.in b/doc/html/Makefile.in index 62c5fd59..432973a2 100644 --- a/doc/html/Makefile.in +++ b/doc/html/Makefile.in @@ -1,5 +1,8 @@ -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@ include $(MAGICDIR)/defs.mak HTML_INSTDIR=$(INSTALL_LIBDIR)/magic/doc/html diff --git a/doc/latexfiles/Makefile.in b/doc/latexfiles/Makefile.in index 21b664a4..68e8df5e 100644 --- a/doc/latexfiles/Makefile.in +++ b/doc/latexfiles/Makefile.in @@ -1,5 +1,8 @@ -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@ include $(MAGICDIR)/defs.mak # PS_SRCDIR: pre-built PostScript shipped in the source tree (read-only, used by diff --git a/doc/man/Makefile.in b/doc/man/Makefile.in index 45fc8966..b33f9bfb 100644 --- a/doc/man/Makefile.in +++ b/doc/man/Makefile.in @@ -2,8 +2,11 @@ # makefile for Magic documentation # -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@ MANMACS= tmac.anc TROFF=ditroff -h TTROFF=ditroff -Ppsc -t diff --git a/doc/tutcells/Makefile.in b/doc/tutcells/Makefile.in index 2831201d..eaab4c41 100644 --- a/doc/tutcells/Makefile.in +++ b/doc/tutcells/Makefile.in @@ -2,8 +2,11 @@ # makefile for Magic documentation # -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@ include ${MAGICDIR}/defs.mak TUTDIR = ${INSTALL_LIBDIR}/magic/tutorial diff --git a/scmos/cif_template/Makefile.in b/scmos/cif_template/Makefile.in index d2b0b13b..f8c2386b 100644 --- a/scmos/cif_template/Makefile.in +++ b/scmos/cif_template/Makefile.in @@ -1,5 +1,8 @@ -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@ MKDIR = $(MAGICSRC)/scripts/mkdirs OBJS_DIR = objs CIFIN = $(OBJS_DIR)/CIFin