This is the mail archive of the insight@sources.redhat.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFC] Remove tcl/tk/itcl/itk dependencies from Makefile.in


In the neverending process of dealing with my favorite cygwin activity,
I decided that it would be best if I completely removed any tcl/tk stuff
from the source directory of the insight that I build.  Instead, I
wanted to use the --with-tclconfig and --with-tclinclude options to
point to another directory.

In the process of doing this, I found that there is a need for a
--with-itclconfig and (maybe) a --with-itkconfig.  Both options are
missing from configure.in.  Lack of those is easy enough to workaround
by priming config.cache but I'm wondering if it would be worthwhile to
implement them?

A larger problem however is the fact that currently, the options don't
completely work, since Makefile.in has settings for TCL_DEPS and TK_DEPS
which assumes that they live in gdb's build tree, e.g., in
../tcl/win/libtcl84.a.  This obviously isn't the case when using a
separate tcl/tk build.

The fix for this is really simple, however.  Remove the TCL_DEPS style
settings and just let the gdb link happen.  This means that you get a
linker error rather than a Makefile error but is that really a big deal?
If gdb automatically rebuilt the libtcl.a file when it was out-of-date,
I could see a reason for the dependency.  It doesn't do that, though.
So, presently you get the potentially more informative error message:

*** No rule to make target `../tcl/win/libtcl84.a', needed by `gdb.exe'.  Stop.

rather than (I propose):

ld: cannot find -ltk84

but the make error is wrong in the case where --with-tclconfig is used anyway.
And, if you're building gdb from the top-level, it's unlikely that libtcl*.a
will not be built.

Anyway, I've managed to build a version of gdb by removing TCL_DEPS,
TK_DEPS, ITCL_DEPS, and ITK_DEPS from the Makefile and I can kludge
something for my cygwin build system so that I can make this automatic.
I was just wondering if anyone would mind eliminating these
dependencies.

If the tclConfig.sh file provided anything useful which could be
extrapolated to put into the TCL_DEP, I'd use that but it doesn't seem
to do that.  It only provides a path to the library using -L/wherever
-ltcl84.  I could munge that together into /whatever/libtcl84.a but that
seems sort of fragile.

So, the question is: Is it ok to remove the tcl/tk/itcl/itk *_DEPS files
from the gdb Makefile?  This would also be a step in the direction of
allowing insight to be built from system tcl/tk libraries.

cgf


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]