Skip to content
Tcl Source Code History Of Ticket 0a908bb93bb99e1e
Login

History Of Ticket 0a908bb93bb99e1e

Artifacts Associated With Ticket 0a908bb93bb99e1e

  1. Ticket change [a796f9f214] (rid 259520) by serhiy.storchaka on 2026-10-20 16:28:19:

    1. cmimetype initialized to: "text/x-fossil-wiki"
    2. comment initialized to:
      After changing a header file, <tt>make</tt> does not rebuild most of the object files which include it: in <tt>unix/Makefile.in</tt> only some object files list some headers (<tt>$(COMPILEHDR)</tt>, <tt>$(IOHDR)</tt>, etc), in <tt>win/Makefile.in</tt> none, and <tt>make depend</tt> needs <tt>makedepend</tt> ([427101ffff], [427105ffff]). For example, changing <tt>generic/tcl.h</tt> or <tt>unix/tclUnixPort.h</tt> rebuilds nothing, and changing <tt>generic/tclInt.h</tt> rebuilds 3 object files. The same issue in Tk is [https://core.tcl-lang.org/tk/tktview/a0109510a8|Tk ticket a0109510a8].
      
      Proposed fix in branch [/timeline?r=header-dependencies|header-dependencies], the same as in Tk: if the compiler supports <tt>-MMD -MP</tt> (gcc and clang) and <tt>${MAKE-make}</tt> supports <tt>-include</tt>, the compiler writes the header dependencies of every object file into a <tt>.d</tt> file, which the Makefile includes. This is done in <tt>unix/</tt> and <tt>win/</tt> (MinGW, MSYS2, Cygwin). With it, changing <tt>tcl.h</tt> rebuilds 182 object files on Linux, <tt>tclInt.h</tt> 112 on Linux and 115 with MinGW and MSYS2. With <tt>win/makefile.vc</tt>, <tt>nmake -f makefile.vc depend</tt> already works.
      
    3. foundin initialized to: "9.1"
    4. login: "serhiy.storchaka"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. severity initialized to: "Minor"
    8. status initialized to: "Open"
    9. submitter initialized to: "serhiy.storchaka"
    10. subsystem initialized to: "53. Configuration and Build Tools"
    11. title initialized to:
      make does not rebuild object files after a header file is changed
      
    12. type initialized to: "Bug"