public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* [RFC] Remove tcl/tk/itcl/itk dependencies from Makefile.in
@ 2003-02-07  3:22 Christopher Faylor
  2003-02-07  3:59 ` Keith Seitz
  0 siblings, 1 reply; 3+ messages in thread
From: Christopher Faylor @ 2003-02-07  3:22 UTC (permalink / raw)
  To: insight

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFC] Remove tcl/tk/itcl/itk dependencies from Makefile.in
  2003-02-07  3:22 [RFC] Remove tcl/tk/itcl/itk dependencies from Makefile.in Christopher Faylor
@ 2003-02-07  3:59 ` Keith Seitz
  2003-02-07  4:09   ` Christopher Faylor
  0 siblings, 1 reply; 3+ messages in thread
From: Keith Seitz @ 2003-02-07  3:59 UTC (permalink / raw)
  To: Chris Faylor; +Cc: insight

On Thu, 2003-02-06 at 19:23, Christopher Faylor wrote:

> 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.

You've built insight using "standard", installed versions of Tcl, Tk,
Itcl? THAT'S WONDERFUL!

> 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.

Well, here's the idea I had in mind... We would like to support two
building methodologies. One where we are using the tcl, tk, etc from the
build tree and one where we use the installed versions.

If we're building with the installed versions, there should be no
dependency (obviously). If we're building tcl et al, then we should have
the dependency.

I believe that this can be done easily enough. My rough outline of the
process looks something like: if --with-*config and it exists, use it.
If not, assume build tree. If --with-tclconfig was specified and it
exists, use that directory to search for *config.sh, too. Same for
--with-tcl-headers and --with-tcl-library. I think this is what the
likes of BLT use, and it seems a reasonable (if lengthy) approach.

Of course, as you observe, there is a ton of hacking to do at gdb's m4
files. I was actually planning to do this some day, when I get back to
finishing the gdb/Insight split and we have our own configury and
Makefiles, but, well, that never seems to happen. I know.. I'm a bad
maintainer.

Anyway, not to discourage, I think that I would check if I could find a
suitable Tcl, Tk, etc in the build tree and then set TCL_DEPS and
TK_DEPS accordingly, even if the --with-* stuff isn't in yet.

Does this sound like a reasonably way to inch forward?
Keith


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFC] Remove tcl/tk/itcl/itk dependencies from Makefile.in
  2003-02-07  3:59 ` Keith Seitz
@ 2003-02-07  4:09   ` Christopher Faylor
  0 siblings, 0 replies; 3+ messages in thread
From: Christopher Faylor @ 2003-02-07  4:09 UTC (permalink / raw)
  To: insight

On Thu, Feb 06, 2003 at 08:03:50PM -0800, Keith Seitz wrote:
>On Thu, 2003-02-06 at 19:23, Christopher Faylor wrote:
>>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.
>
>You've built insight using "standard", installed versions of Tcl, Tk,
>Itcl?  THAT'S WONDERFUL!

I've built it using versions from a separate "build" area on cygwin.  I
haven't tried it with the installed version (/usr/lib, /usr/include)
since it seems to need internal include files that aren't normally
installed.  I didn't check this, though.

>> 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.
>
>Well, here's the idea I had in mind... We would like to support two
>building methodologies. One where we are using the tcl, tk, etc from the
>build tree and one where we use the installed versions.
>
>If we're building with the installed versions, there should be no
>dependency (obviously). If we're building tcl et al, then we should have
>the dependency.
>
>I believe that this can be done easily enough. My rough outline of the
>process looks something like: if --with-*config and it exists, use it.
>If not, assume build tree. If --with-tclconfig was specified and it
>exists, use that directory to search for *config.sh, too. Same for
>--with-tcl-headers and --with-tcl-library. I think this is what the
>likes of BLT use, and it seems a reasonable (if lengthy) approach.

Doh.  I was going to suggest just this scenario as an alternate plan in
my email and I forgot (sssuurrreee I did).  So, I agree this is a good
idea.

>Anyway, not to discourage, I think that I would check if I could find a
>suitable Tcl, Tk, etc in the build tree and then set TCL_DEPS and
>TK_DEPS accordingly, even if the --with-* stuff isn't in yet.
>
>Does this sound like a reasonably way to inch forward?

Yes.

I'll probably poke around a little and see what would be required to get
something like this into the current configury.  In my "copious spare
time" of course.

<side track>
Chuckle.  Get it?  I don't really have "copious" spare time but I used
that adjective anyway.  It's just so hilarious that it bears repetition.
In fact, I think we should make it an English-language requirement that
the term "spare time" cannot be used without wryly adding "copious" in
front of it.

This is just like one cannot type "Windows" anymore.  You have to say
"Windoze" or "Winblows" or "Window$".  It was mildly humorous once, so
the 100,000th repetition must make it hilarious...
</side track>

cgf

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-02-07  4:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-07  3:22 [RFC] Remove tcl/tk/itcl/itk dependencies from Makefile.in Christopher Faylor
2003-02-07  3:59 ` Keith Seitz
2003-02-07  4:09   ` Christopher Faylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).