| Ticket UUID: | be40b7361535190a04dedc5a301f49459c50b623 | ||
| Title: | nmake: rmdir and mkdir are picked from cygwin if available | ||
| Type: | Bug | Created on: | 2026-02-17 18:23:55 |
| Submitter: | oehhar | Assigned to: | hoehlmann |
| Subsystem: | 53. Configuration and Build Tools | Severity: | Minor |
| Priority: | 5 Medium | Last modified: | 2026-02-18 08:19:51 |
| Status: | Closed | Closed by: | jan.nijtmans |
| Resolution: | Fixed | Closed on: | 2026-02-18 08:19:51 |
| Version: | main | ||
| Description: | ||||
|
When building with present cygwin, the cygwin version of rmdir and mkdir are used. This causes the following error, as the parameters are different: /usr/bin/rmdir: `/S': Permission denied /usr/bin/rmdir: `/Q': No such file or directory /usr/bin/rmdir: `C:\\test\\fossil\\tk\\6a9bae5e-demo-dist-nmake\\win\\Release_AMD64_VC1944\\libtk.vfs\\tk_library\\demos': Directory not empty NMAKE : fatal error U1077: "rmdir /S /Q "C:\test\fossil\tk\6a9bae5e-demo-dist-nmake\win\Release_AMD64_VC1944\libtk.vfs\tk_library\demos"": Rückgabe-Code "0x1" This happened in this tk bug 6a9bae5e. It must be fixed here, as the rules.vc of TCL is used also for Tk. A local copy is ignored, if TCL has one. Csaba proposed the following fix: 1. makefile.vc includes rules-ext.vc, which in turn includes rules.vc. The latter defines RMDIR and MKDIR as follows: RMDIR = rmdir /S /Q ... MKDIR = mkdir This is dangerous, because rmdir and mkdir are not only Window (originally DOS) commands, but they are also present in cygwin and msys/mingw, being that these emulate a part of a Unix environment. And the cygwin commands seem to have precedence over the commands of the same name of Windows. IMHO, the above definitions should be replaced with RMDIR = rd /S /Q ... MKDIR = md This would be better because rd and md are not present in cygwin and msys/mingw, thus no command-related ambiguities could happen any longer. THanks for all, Harald | ||||
| User Comments: | ||||
oehhar added on 2026-02-17 18:34:30:
Csabas fix is now in [b1c564e37d], branch [be40b736-nmake-rmdir-cygwin-mixup]. For me, it solves the issue. Any objections to merge to 8.6,9.0, main branches? Thanks, Harald jan.nijtmans added on 2026-02-18 08:19:51:
> Any objections to merge to 8.6,9.0, main branches? [1a9be588232b2144] | ||||
