Skip to content
Tcl Source Code View Ticket
Login

View Ticket

tcl/macosx Makefile has fragile `make distclean`

Closed / Fixedd80f8cf33b8059a4b2b832e0b01586a6902196a2Created 13 years agoUpdated 43 days ago
Descriptionplain2013-08-03 15:28:16
It seems the `make distclean` target in the tcl/macosx
Makefile assumes it is always cleaning up from the results
of a complete `make`.  When that assumption is not true,
it stops with an error and doesn't finish the job.  When
doing repeated testing where we only `make test-tcl` or
similar, this is broken.
Referenced by4
  • ec8a966c79Fix [d80f8cf33b]: tcl/macosx Makefile has fragile `make distclean` check-in2026-10-20 14:30:23
  • e6f4b1445dFix [d80f8cf33b]: tcl/macosx Makefile has fragile `make distclean` check-in2026-10-20 14:29:57
  • 3d871b1598Fix [d80f8cf33b]: tcl/macosx Makefile has fragile `make distclean` check-in2026-10-20 14:28:49
  • dd3e012b6aFix [d80f8cf33b]: "make distclean" in macosx/ stopped with an error unless both the Development and the Deployment build had been made, since the clean rules always ran make in the build directory. Skip it when that build directory has no Makefile. check-in2026-10-20 12:43:29
serhiy.storchakawiki2026-10-20 12:44:05

Still present on main (and the same code is in 9.0 and 8.6): clean-tcl and distclean-tcl in macosx/GNUmakefile always run make -C "${OBJ_DIR}", and distclean does that for both the Development and the Deployment build. So it stops with "No such file or directory" as soon as one of them was never configured.

Proposed fix in branch macosx-distclean-partial: the clean rules skip the sub-make when the build directory has no Makefile. Checked with the GNU make logic on Linux (nothing built, and after only a Development build); not tried on macOS.

jan.nijtmanswiki2026-10-20 14:31:27

Merged to [trunk], core-9-0-branch and core-8-6-branch

Many Thanks!

Log in (anonymous is fine) to add a comment.