build: address code-review findings (low-risk cleanups)

From an independent review of the branch:

* Makefile.in: `tcltk` is in both INSTALL_CAD_DIRS and PROGRAMS (Tcl build),
  so install@tcltk / install-tcl@tcltk were defined twice -> "given more than
  once" warnings on every command.  Wrap both install lists in $(sort ...) to
  dedup (as CLEAN_TARGETS already does).  Also fix a stale comment (module@ now
  waits for ${DATABASE_H}, not a `depend` phase).

* toolchains/emscripten/defs.mak: the scmos display-file embed globbed
  `mos.*.dstyle`, which misses mos.7bit.mraster_dstyle (an underscore, not a
  dot) -- so the mono-raster style was not embedded in WASM, and the comment
  wrongly called that file non-existent.  Glob `mos.*dstyle` to cover both.

* npm/build.sh: sed_strip_cr wrote the file back unconditionally, bumping the
  mtimes of configure and every scripts/ file on each WASM build (contradicting
  the "source never mutated" guarantee and able to force a coexisting native
  rebuild).  Only write back when a CR was actually stripped.

* graphics/Makefile.in: remove the dead DEPSRCS block left behind by retiring
  the Depend machinery (it also referenced an undefined ${THREE_D_SRCS}).

* scripts/defs.mak.in: clarify that only the SOURCE_DATE_EPOCH branch is UTC.

Verified: 0 duplicate-target warnings, wildcard now lists mos.7bit.mraster_dstyle,
full Tcl build+install rc=0 (375 files), graphics lib builds, build.sh syntax OK.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This commit is contained in:
Darryl L. Miles
2026-07-26 14:54:11 -04:00
committed by R. Timothy Edwards
co-authored by Claude Opus 4.8
parent eaf42fab01
commit 67d6a2ff5a
5 changed files with 18 additions and 31 deletions
+8 -7
View File
@@ -62,11 +62,12 @@ TOP_EXTRA_LIBS += \
# The ${MAGICDIR}/scmos dir embed above supplies the *generated* tech files, but a
# technology's "styles" section also needs the display styles + colour maps
# (scmos ${FILES}: mos.*.dstyle / mos.*.cmap). Those are *source* files, so out
# of source they are not in the build tree and the embed misses them -- init then
# fails with "Couldn't open color map file mos.7bit.std.cmap" / "Cannot load
# technology". Embed each from the source tree into the same VFS dir. $(wildcard)
# matches only files that exist, so a stale/typo'd name in ${FILES} (e.g. the
# non-existent mos.7bit.mraster_dstyle) can never break the link.
SCMOS_DISPLAY := $(wildcard ${MAGICSRC}/scmos/mos.*.dstyle ${MAGICSRC}/scmos/mos.*.cmap)
# (scmos ${FILES}). Those are *source* files, so out of source they are not in
# the build tree and the embed misses them -- init then fails with "Couldn't open
# color map file mos.7bit.std.cmap" / "Cannot load technology". Embed each from
# the source tree into the same VFS dir. Match `mos.*dstyle` (no dot) so both the
# `.dstyle` files and mos.7bit.mraster_dstyle (an underscore, not a dot) are
# covered, plus the `mos.*.cmap` colour maps. $(wildcard) matches only files that
# exist, so it never lists a name that would break the link.
SCMOS_DISPLAY := $(wildcard ${MAGICSRC}/scmos/mos.*dstyle ${MAGICSRC}/scmos/mos.*.cmap)
TOP_EXTRA_LIBS += $(foreach f,$(SCMOS_DISPLAY),--embed-file $(f)@/magic/sys/current/$(notdir $(f)))