#87 Script for Making Dependency Information

open
5
2001-08-24
2001-05-27
No

There has been some discussion recently online (in the Tcler's chat and elsewhere) about how
Tcl's dependency information is seriously out-of-date. Normally this does not matter (most
people just build everything from scratch) but given the number of people now developing in
the core, it is becoming more important to have accurate dependency information in the core.
However, it was discovered that makedepend (and gcc -M) do not always get this information
right with Tcl's build structure. This Tcl script is intended to be a replacement for that that allows
dependency information to be built relatively easily and accurately.

Discussion

  • Donal K. Fellows

    makedep.tcl

     
  • miguel sofer

    miguel sofer - 2001-05-28

    Logged In: YES
    user_id=148712

    This is a 'solution' to bugs 427101 and 427105

     
  • Andreas Kupries

    Andreas Kupries - 2001-08-24
    • assigned_to: nobody --> stwo
     
  • Mo DeJong

    Mo DeJong - 2001-09-18

    Logged In: YES
    user_id=90858

    I still don't understand how this script is to be
    run. It is the old chicken and the egg problem.
    How does one run a Tcl script before building Tcl?
    Typically, the `make depend` target appends a
    bunch of additional deps to the Makefile. But,
    we can't expect people to have Tcl around before
    building Tcl.

     
  • miguel sofer

    miguel sofer - 2001-09-18

    Logged In: YES
    user_id=148712

    Well, the only ones who *really* need dependency information
    are developers - ie, those that modify some files andwant to
    rebuild partially. It is not important if you are building
    from scratch (from a distro, or after 'make clean').

    I think it is safe to assume that core developers do have a
    working version of Tcl, so that this script indeed solves
    the problem for them/us.

     
  • Donal K. Fellows

    Logged In: YES
    user_id=79902

    The intention is that this script is only used by people
    developing the core; when you're building for installation,
    you just make the lot and don't worry about when you need to
    rebuild. OTOH, if you make a far-reaching change in tclIO.h
    to some structure definition, you'd *really* like to check
    that everything that depends on it rebuilds correctly...

     
  • Mo DeJong

    Mo DeJong - 2003-03-27

    Logged In: YES
    user_id=90858

    I looked at this script and tried to adapt it to the
    existing build
    environment, but I was not able to get it working. The script
    assumes that the src dir is the build dir. Unless it can be
    rewritten
    so that it works with run in a build dir that is not the
    source dir,
    I can't approve it.

     
  • Donal K. Fellows

    Logged In: YES
    user_id=79902

    I don't quite see what the problem is. The script assumes
    that it is being run in the directory where generated .o
    files will be produced and where the makefile is. It is
    configured (by default) to search the current directory (and
    its sibling directories compat and generic) for source
    files, but the directories searched may be configured
    through the use of the -directory flag.

    For example (the '-directory -' option removes the built-in
    search path) and trying to solve the sort of problem that
    you described:
    tclsh makedep.tcl -directory - \ -directory $(SRCLOC)/compat \ -directory $(SRCLOC)/generic \ -directory $(SRCLOC)/unix

    You can also control the name of the makefile that is
    modified with the -makefile option. The script does not
    currently allow configuring of the file extensions, but it
    shouldn't be hard to add that.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks