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=<src>/<mod> into each
build/<mod>/Makefile; `make modules libs` builds all 33 module libraries
(lib*.o + lib*.a, rc=0).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Second batch of the Makefile.in migration: the remaining standard modules
bplane calma cif cmwind dbwind debug drc extflat extract garouter gcr
grouter irouter mzrouter netmenu plow resis select sim textio wiring
Pure renames -- content unchanged, so each still builds via the defs.mak
srcdir derivation (dual mode); the @srcdir@ substitution follows.
* git mv <dir>/Makefile -> <dir>/Makefile.in (21 modules)
* configure.in: AC_CONFIG_FILES for each; regenerated configure. Their
build subdirs + Makefiles are now created by config.status, so
$(submake) recurses natively (make -C <dir>), no -f.
* .gitignore: ignore each generated <dir>/Makefile, in this same commit.
Verified out-of-tree: config.status writes 22 module Makefiles (these 21 +
tiles); `make modules` builds all 33 module libraries (rc=0).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
and forcing it to be passed as an argument to all the callback
functions for the search routines that require it. Magic now
compiles and runs with the new code, but there are a number of
known issues that need to be fixed up. Committing now so that
I can rebase on the last update to the master branch.
cb_heap_kill_t callback typedef created
Invoked from HeapKill()
No active callback implementation in the codebase.
callback interface (from hash.h):
marked @invoke call-site
Use of macro idiom: if(1) { ... } else
which has dangling else keyword to allow trailing semicolon at
use site, is not a good pattern.
Replaced with idiom: do { ... } while(0)
which should achieve the same purpose but now cause compile
error when used incorrectly at use site.
GCC14 -Wall cleanup series [-Wmisleading-indentation]
This commit makes the code (mostly) C99-compatible, enabling to compile
it without the -Wno-error=implicit-function-declaration flag. This
way, Magic becomes usable on arm64 architectures, specifically on Apple
computers with M1/M2 SoC.