magic/tcltk
Darryl L. Miles b3d6540f13 build: isolate build-info defines into utils/buildinfo.c (ccache-friendly)
MAGIC_VERSION / MAGIC_REVISION / MAGIC_COMMIT / MAGIC_BUILDDATE were on the
global DFLAGS, so every object's compile command line carried them.  Because
the command line is part of ccache/sccache's hash key and MAGIC_BUILDDATE
changes every second, that meant a cache miss on every unit on every build;
it also smeared the baked-in date/commit across "whenever each file last
recompiled".

Move the four values into a single translation unit:
  * utils/magic_buildinfo.h -- extern MagicVersion/MagicRevision/MagicCommit/
    MagicCompileTime (MagicCommit is new; the other three moved here from
    utils/magic.h, which now includes this header).
  * utils/buildinfo.c -- the ONLY unit compiled with the version defines
    (target-specific `buildinfo.o: DFLAGS += ${DFLAGS_MAGICVERSION}` in
    utils/Makefile.in); it defines the four globals.  ${DFLAGS_MAGICVERSION}
    is removed from the global DFLAGS/DFLAGS_NOSTUB.

Consumers updated to read the runtime symbol instead of the compile-time
macro:
  * magicTop.c / tclmagic.c no longer define the globals (the MAGIC_WRAPPER
    duplicate-symbol guard is gone -- buildinfo.o owns them for every variant,
    including WASM, which links both mains).
  * Tcl_PkgProvide/PkgRequire in router/ext2spice/lef/ext2sim/plot/tclmagic
    now pass MagicVersion.
  * extflat: EFVersion (a static-initialized copy of MAGIC_VERSION) is dropped;
    EFread.c compares the .ext version against MagicVersion directly -- the same
    value ExtCell.c already *writes* into .ext files, so read and write are now
    consistent.

Verified: only buildinfo.o carries -DMAGIC_* (hash/DBio/windCmdSZ carry none);
Tcl (375 files) and --without-tcl builds rc=0, version/commit/date embedded in
tclmagic.so, magicTop.o no longer defines MagicVersion; in-tree source clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-26 14:54:11 -04:00
..
Makefile.in build: include rules.mak from source, drop the build-top copy 2026-07-26 14:54:11 -04:00
bsitools.tcl Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
cellmgr.tcl Modified the "tag" command to add an optional subcommand "add" or 2025-10-08 17:11:27 -04:00
console.tcl Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
drcmgr.tcl Quick fix to the script use of "units", which needs to expand the 2026-02-24 16:40:07 -05:00
ext2sim.sh.in Allow for bash in locations other than /bin 2023-04-22 14:13:57 -04:00
ext2spice.sh.in Allow for bash in locations other than /bin 2023-04-22 14:13:57 -04:00
libmgr.tcl Corrected the "Pick" button action in the "Library Manager" window; 2026-05-24 16:23:18 -04:00
magic.sh.in Allow for bash in locations other than /bin 2023-04-22 14:13:57 -04:00
magic.tcl.in A few minor changes to message reporting, plus some additional 2025-12-19 09:30:35 -05:00
magicdnull.c Rewrote the configuration scripts, makefiles, and some initialization 2017-10-13 10:28:07 -04:00
magicexec.c Removed the "macosx" definition from the configuration file, which 2017-10-14 18:42:24 -04:00
mazeroute.tcl Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
readspice.tcl Made a simple but important change to "readspice.tcl" to unexpand 2023-03-08 11:14:22 -05:00
reorderLayers.tcl EDIT: wrapper maketoolbar method refactored into a separate script, with changes to the toolbar. Reorder layers functionality added as well 2023-12-15 15:54:05 -05:00
socketcmd.tcl Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
strip_reflibs.tcl Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
tclmagic.c build: isolate build-info defines into utils/buildinfo.c (ccache-friendly) 2026-07-26 14:54:11 -04:00
tclmagic.h I broke the CI again for the "wasm" build by adding a Tk routine 2026-06-24 09:20:06 -04:00
techbuilder.tcl Create techbuilder.tcl 2021-08-28 12:58:58 -04:00
texthelper.tcl Solved three issues: 2026-04-01 21:17:54 -04:00
tkcon.tcl Handled the case in which environment variable HOME is not set. 2026-05-13 08:51:16 -04:00
tkshell.tcl Initial commit at Tue Apr 25 08:41:48 EDT 2017 by tim on stravinsky 2017-04-25 08:41:48 -04:00
toolbar.tcl Finally got around to restoring the behavior of the toolbar with 2024-10-01 16:01:28 -04:00
toolkit.tcl Ensure all cells are loaded into memory in netlist_to_spice to avoid file corruption during save 2026-05-06 11:37:52 -04:00
toolkit_rev0.tcl Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
tools.tcl Corrected two errors with the crash backup mechanism, one minor, one 2026-06-22 21:52:06 -04:00
wrapper.tcl Added some support for the open PDKs in the technology manager GUI. 2026-06-08 15:10:14 -04:00