From 4fd85ee8443e0b0d9164f15daafe1b03f33691b9 Mon Sep 17 00:00:00 2001 From: "Darryl L. Miles" Date: Wed, 22 Jul 2026 17:04:21 +0000 Subject: [PATCH] build: standard-module Makefile.in use @srcdir@ substitution Switch the 21 standard modules from the defs.mak srcdir derivation to configure-provided substitution (same template as tiles): srcdir = @srcdir@ VPATH = @srcdir@ MAGICDIR = @top_builddir@ defs.mak's dual-mode guard sees `srcdir` already set (origin=file) and skips the srcdir derivation for these modules. Verified out-of-tree: config.status writes srcdir=/ into each build//Makefile; `make modules libs` builds all 33 module libraries (lib*.o + lib*.a, rc=0). Co-Authored-By: Claude Opus 4.8 (1M context) --- bplane/Makefile.in | 6 +++++- calma/Makefile.in | 6 +++++- cif/Makefile.in | 6 +++++- cmwind/Makefile.in | 6 +++++- dbwind/Makefile.in | 6 +++++- debug/Makefile.in | 6 +++++- drc/Makefile.in | 6 +++++- extflat/Makefile.in | 6 +++++- extract/Makefile.in | 6 +++++- garouter/Makefile.in | 6 +++++- gcr/Makefile.in | 6 +++++- grouter/Makefile.in | 6 +++++- irouter/Makefile.in | 6 +++++- mzrouter/Makefile.in | 6 +++++- netmenu/Makefile.in | 6 +++++- plow/Makefile.in | 6 +++++- resis/Makefile.in | 6 +++++- select/Makefile.in | 6 +++++- sim/Makefile.in | 6 +++++- textio/Makefile.in | 6 +++++- wiring/Makefile.in | 6 +++++- 21 files changed, 105 insertions(+), 21 deletions(-) diff --git a/bplane/Makefile.in b/bplane/Makefile.in index f7b16860..7460316f 100644 --- a/bplane/Makefile.in +++ b/bplane/Makefile.in @@ -3,7 +3,11 @@ # MODULE = bplane -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 = bpDump.c bpUtils.c bpBins.c bpEnum.c bpMain.c bpStat.c include ${MAGICDIR}/defs.mak diff --git a/calma/Makefile.in b/calma/Makefile.in index 6539d832..88a0c29e 100644 --- a/calma/Makefile.in +++ b/calma/Makefile.in @@ -3,7 +3,11 @@ # MODULE = calma -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 = CalmaRead.c CalmaRdcl.c CalmaRdio.c CalmaRdpt.c CalmaWrite.c CalmaWriteZ.c include ${MAGICDIR}/defs.mak diff --git a/cif/Makefile.in b/cif/Makefile.in index 5567db9d..a907a8ef 100644 --- a/cif/Makefile.in +++ b/cif/Makefile.in @@ -3,7 +3,11 @@ # MODULE = cif -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 = CIFgen.c CIFhier.c CIFmain.c CIFrdcl.c CIFrdpt.c CIFrdpoly.c \ CIFrdtech.c CIFrdutils.c CIFsee.c CIFtech.c CIFwrite.c diff --git a/cmwind/Makefile.in b/cmwind/Makefile.in index a685dd87..0678a11d 100644 --- a/cmwind/Makefile.in +++ b/cmwind/Makefile.in @@ -3,7 +3,11 @@ # MODULE = cmwind -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 = CMWmain.c CMWcmmnds.c CMWundo.c CMWrgbhsv.c include ${MAGICDIR}/defs.mak diff --git a/dbwind/Makefile.in b/dbwind/Makefile.in index 32c7abaf..c83c2ac8 100644 --- a/dbwind/Makefile.in +++ b/dbwind/Makefile.in @@ -3,7 +3,11 @@ # MODULE = dbwind -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 = DBWcommands.c DBWdisplay.c DBWbuttons.c DBWelement.c \ DBWfdback.c DBWhlights.c DBWprocs.c DBWtools.c DBWundo.c diff --git a/debug/Makefile.in b/debug/Makefile.in index d8d3cee1..1c0f0b36 100644 --- a/debug/Makefile.in +++ b/debug/Makefile.in @@ -3,7 +3,11 @@ # MODULE = debug -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 = debugFlags.c hist.c include ${MAGICDIR}/defs.mak diff --git a/drc/Makefile.in b/drc/Makefile.in index 84a14297..98052098 100644 --- a/drc/Makefile.in +++ b/drc/Makefile.in @@ -3,7 +3,11 @@ # MODULE = drc -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 = DRCarray.c DRCbasic.c DRCcif.c DRCcontin.c DRCmain.c \ DRCsubcell.c DRCtech.c DRCprint.c DRCextend.c diff --git a/extflat/Makefile.in b/extflat/Makefile.in index 2794bb7e..59e234f5 100644 --- a/extflat/Makefile.in +++ b/extflat/Makefile.in @@ -3,7 +3,11 @@ # MODULE = extflat -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 = EFargs.c EFbuild.c EFdef.c EFerr.c EFflat.c EFhier.c EFname.c \ EFread.c EFsym.c EFvisit.c EFantenna.c diff --git a/extract/Makefile.in b/extract/Makefile.in index 182cac59..9160aa2b 100644 --- a/extract/Makefile.in +++ b/extract/Makefile.in @@ -3,7 +3,11 @@ # MODULE = extract -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 = ExtArray.c ExtBasic.c ExtCell.c ExtCouple.c ExtHard.c \ ExtHier.c ExtLength.c ExtMain.c ExtNghbors.c ExtPerim.c \ ExtRegion.c ExtSubtree.c ExtTech.c ExtTest.c ExtTimes.c ExtYank.c \ diff --git a/garouter/Makefile.in b/garouter/Makefile.in index 3204f248..0f93a7e9 100644 --- a/garouter/Makefile.in +++ b/garouter/Makefile.in @@ -3,7 +3,11 @@ # MODULE = garouter -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 = gaChannel.c gaMain.c gaMaze.c gaSimple.c gaStem.c \ gaTest.c diff --git a/gcr/Makefile.in b/gcr/Makefile.in index 931aca16..1c413792 100644 --- a/gcr/Makefile.in +++ b/gcr/Makefile.in @@ -3,7 +3,11 @@ # MODULE = gcr -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 = gcrChannel.c gcrColl.c gcrDebug.c gcrEdge.c gcrFeas.c \ gcrFlags.c gcrInit.c gcrLib.c gcrRiver.c gcrRoute.c gcrShwFlgs.c \ gcrUnsplit.c diff --git a/grouter/Makefile.in b/grouter/Makefile.in index 57d93866..8f152dc3 100644 --- a/grouter/Makefile.in +++ b/grouter/Makefile.in @@ -3,7 +3,11 @@ # MODULE = grouter -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 = grouteChan.c grouteCrss.c grouteDens.c grouteMain.c \ grouteMult.c grouteMaze.c groutePath.c groutePen.c grouteTest.c diff --git a/irouter/Makefile.in b/irouter/Makefile.in index 2d16afda..b9a54861 100644 --- a/irouter/Makefile.in +++ b/irouter/Makefile.in @@ -3,7 +3,11 @@ # MODULE = irouter -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 = irCommand.c irMain.c irRoute.c irTestCmd.c irUtils.c include ${MAGICDIR}/defs.mak diff --git a/mzrouter/Makefile.in b/mzrouter/Makefile.in index 43a32d68..20ff75e9 100644 --- a/mzrouter/Makefile.in +++ b/mzrouter/Makefile.in @@ -3,7 +3,11 @@ # MODULE = mzrouter -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 = mzBlock.c mzDebug.c mzEstimate.c mzXtndDown.c \ mzXtndLeft.c mzXtndRght.c mzXtndUp.c mzHint.c mzInit.c mzNumLine.c \ mzMain.c mzSearch.c mzStart.c mzSubrs.c mzTech.c mzTestCmd.c \ diff --git a/netmenu/Makefile.in b/netmenu/Makefile.in index 0597ecc7..da891a45 100644 --- a/netmenu/Makefile.in +++ b/netmenu/Makefile.in @@ -3,7 +3,11 @@ # MODULE = netmenu -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 = NMbutton.c NMcmdAK.c NMcmdLZ.c NMlabel.c NMmain.c \ NMnetlist.c NMshowpt.c NMshowcell.c NMundo.c NMwiring.c diff --git a/plow/Makefile.in b/plow/Makefile.in index 10340d81..c308049b 100644 --- a/plow/Makefile.in +++ b/plow/Makefile.in @@ -3,7 +3,11 @@ # MODULE = plow -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 = PlowCmd.c PlowJogs.c PlowMain.c PlowQueue.c PlowRandom.c \ PlowRules1.c PlowRules2.c PlowRules3.c PlowSearch.c PlowTech.c \ PlowTest.c PlowWidth.c PlowYank.c diff --git a/resis/Makefile.in b/resis/Makefile.in index 14de864c..a48f3dc0 100644 --- a/resis/Makefile.in +++ b/resis/Makefile.in @@ -3,7 +3,11 @@ # MODULE = resis -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 = ResMain.c ResJunct.c ResMakeRes.c ResSimple.c ResPrint.c \ ResReadExt.c ResRex.c ResBasic.c ResMerge.c ResChecks.c \ ResFract.c ResUtils.c ResDebug.c diff --git a/select/Makefile.in b/select/Makefile.in index 18cd30c4..1ef4ff36 100644 --- a/select/Makefile.in +++ b/select/Makefile.in @@ -3,7 +3,11 @@ # MODULE = select -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 = selCreate.c selDisplay.c selEnum.c selOps.c selUndo.c \ selUnselect.c diff --git a/sim/Makefile.in b/sim/Makefile.in index c9be263e..d1174403 100644 --- a/sim/Makefile.in +++ b/sim/Makefile.in @@ -3,7 +3,11 @@ # MODULE = sim -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 = SimDBstuff.c SimSelect.c SimRsim.c SimExtract.c include ${MAGICDIR}/defs.mak diff --git a/textio/Makefile.in b/textio/Makefile.in index 5a7e081d..f9bc7440 100644 --- a/textio/Makefile.in +++ b/textio/Makefile.in @@ -3,7 +3,11 @@ # MODULE = textio -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 = txCommands.c txInput.c txMain.c txMore.c txOutput.c include ${MAGICDIR}/defs.mak diff --git a/wiring/Makefile.in b/wiring/Makefile.in index fd80ea4d..9e42d107 100644 --- a/wiring/Makefile.in +++ b/wiring/Makefile.in @@ -3,7 +3,11 @@ # MODULE = wiring -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 = wireOps.c wireTech.c wireUndo.c include ${MAGICDIR}/defs.mak