Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: d1e82f889ce8bcb4cd2ef1a75a6f20b80532095c72f4487af2d10600139d0e21
Ticket: be40b7361535190a04dedc5a301f49459c50b623
nmake: rmdir and mkdir are picked from cygwin if available
User & Date: oehhar on 2026-02-17 18:23:55
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-wiki"
  4. comment changed to:
    When building with present cygwin, the cygwin version of rmdir and mkdir are used. This causes the following error, as the parameters are different:
    
    <verbatim>
    /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"</verbatim>
    
    This happened in this [https://core.tcl-lang.org/tk/info/6a9bae5e8da5cdbe|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:
    
    <verbatim>
    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.
    </verbatim>
    
    THanks for all,
    Harald
    
  5. foundin changed to: "main"
  6. is_private changed to: "0"
  7. login: "oehhar"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "0f366eb3e9e2fcab52b8ebacd197db9047186a5f"
  10. resolution changed to: "None"
  11. severity changed to: "Minor"
  12. status changed to: "Open"
  13. submitter changed to: "oehhar"
  14. subsystem changed to: "53. Configuration and Build Tools"
  15. title changed to:
    nmake: rmdir and mkdir are picked from cygwin if available
    
  16. type changed to: "Bug"