public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* RFC: More fixes to insights ln -s
@ 2000-03-14 23:13 Andrew Cagney
  2000-03-15 10:21 ` James Ingham
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Cagney @ 2000-03-14 23:13 UTC (permalink / raw)
  To: Insight (GDB GUI); +Cc: GDB Patches

Hello,

The attatched patch makes the make target ``all-gdbtk'' which creates a
link more robust.  Fernando noted that it issued a warning when it
didn't need to.  It could also trip up if there was an invalid old link.

Ok?

	Andrew
Wed Mar 15 17:32:48 2000  Andrew Cagney  <cagney@b1.cygnus.com>

	* Makefile.in (all-gdbtk): Check for an existing link/directory.
  	Re-format warning message.

Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.12
diff -p -r1.12 Makefile.in
*** Makefile.in	2000/03/04 07:11:38	1.12
--- Makefile.in	2000/03/15 07:09:53
*************** fork-child.o: fork-child.c gdb_wait.h $(
*** 1260,1273 ****
  	$(inferior_h) target.h terminal.h gdbthread.h gdb_string.h
  
  all-gdbtk:
! 	if test "$(LN_S)" = "ln -s" -a ! -d gdbtcl/images ; then \
! 	  echo linking ${srcdir}/gdbtk/library to gdbtcl ; \
! 	  $(LN_S) ${srcdir}/gdbtk/library gdbtcl ; \
! 	else \
! 	  echo Warning: Unable to link ${srcdir}/gdbtk/library to gdbtcl. ; \
! 	  echo "         " You will need to do a ; \
! 	  echo "         " make install before you are able to run the GUI. ; \
! 	fi
  
  clean-gdbtk:
  	rm -f gdbtcl
--- 1260,1278 ----
  	$(inferior_h) target.h terminal.h gdbthread.h gdb_string.h
  
  all-gdbtk:
! 	@if test ! -d gdbtcl/images ; then \
! 	  if test "$(LN_S)" = "ln -s" ; then \
! 	    echo linking ${srcdir}/gdbtk/library to gdbtcl ; \
! 	    rm -f gdbtcl ; \
! 	    test ! -r gdbtcl || exit 1 ; \
! 	    $(LN_S) ${srcdir}/gdbtk/library gdbtcl ; \
! 	  else \
! 	    echo "Warning:" ; \
! 	    echo "Unable to link ${srcdir}/gdbtk/library to gdbtcl." ; \
! 	    echo "You will need to do a \`make install' before you are" ; \
! 	    echo "able to run the GUI." ; \
! 	  fi ; \
! 	else true ; fi
  
  clean-gdbtk:
  	rm -f gdbtcl

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

* Re: RFC: More fixes to insights ln -s
  2000-03-14 23:13 RFC: More fixes to insights ln -s Andrew Cagney
@ 2000-03-15 10:21 ` James Ingham
  2000-03-26 22:34   ` Andrew Cagney
  0 siblings, 1 reply; 3+ messages in thread
From: James Ingham @ 2000-03-15 10:21 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: Insight (GDB GUI), GDB Patches

Andrew,

I haven't really been paying that much attention to this configure
stuff of late, sorry...  But now that I think of it, I am pretty sure
all these link machinations are wholly unnecessary.  I munged the gdb
startup code around so that gdb will find its library files from the
build directory without using the link at all.  Moreover, when you
fail at making the link gdb will still work in GUI mode.  So maybe we
can just bag all this?  

However, it would be good to make sure that this is not some wierdness 
in my environment that makes it work.  What about others?  If you
delete the gdbtcl link in your build directory, can you still run gdb
in gui mode from the gdb build directory?  If this is true for others
as well, then we should just drop the extra complexity.

Jim
 > Hello,
 > 
 > The attatched patch makes the make target ``all-gdbtk'' which creates a
 > link more robust.  Fernando noted that it issued a warning when it
 > didn't need to.  It could also trip up if there was an invalid old link.
 > 
 > Ok?
 > 
 > 	AndrewWed Mar 15 17:32:48 2000  Andrew Cagney  <cagney@b1.cygnus.com>
 > 
 > 	* Makefile.in (all-gdbtk): Check for an existing link/directory.
 >   	Re-format warning message.
 > 
 > Index: Makefile.in
 > ===================================================================
 > RCS file: /cvs/src/src/gdb/Makefile.in,v
 > retrieving revision 1.12
 > diff -p -r1.12 Makefile.in
 > *** Makefile.in	2000/03/04 07:11:38	1.12
 > --- Makefile.in	2000/03/15 07:09:53
 > *************** fork-child.o: fork-child.c gdb_wait.h $(
 > *** 1260,1273 ****
 >   	$(inferior_h) target.h terminal.h gdbthread.h gdb_string.h
 >   
 >   all-gdbtk:
 > ! 	if test "$(LN_S)" = "ln -s" -a ! -d gdbtcl/images ; then \
 > ! 	  echo linking ${srcdir}/gdbtk/library to gdbtcl ; \
 > ! 	  $(LN_S) ${srcdir}/gdbtk/library gdbtcl ; \
 > ! 	else \
 > ! 	  echo Warning: Unable to link ${srcdir}/gdbtk/library to gdbtcl. ; \
 > ! 	  echo "         " You will need to do a ; \
 > ! 	  echo "         " make install before you are able to run the GUI. ; \
 > ! 	fi
 >   
 >   clean-gdbtk:
 >   	rm -f gdbtcl
 > --- 1260,1278 ----
 >   	$(inferior_h) target.h terminal.h gdbthread.h gdb_string.h
 >   
 >   all-gdbtk:
 > ! 	@if test ! -d gdbtcl/images ; then \
 > ! 	  if test "$(LN_S)" = "ln -s" ; then \
 > ! 	    echo linking ${srcdir}/gdbtk/library to gdbtcl ; \
 > ! 	    rm -f gdbtcl ; \
 > ! 	    test ! -r gdbtcl || exit 1 ; \
 > ! 	    $(LN_S) ${srcdir}/gdbtk/library gdbtcl ; \
 > ! 	  else \
 > ! 	    echo "Warning:" ; \
 > ! 	    echo "Unable to link ${srcdir}/gdbtk/library to gdbtcl." ; \
 > ! 	    echo "You will need to do a \`make install' before you are" ; \
 > ! 	    echo "able to run the GUI." ; \
 > ! 	  fi ; \
 > ! 	else true ; fi
 >   
 >   clean-gdbtk:
 >   	rm -f gdbtcl

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

* Re: RFC: More fixes to insights ln -s
  2000-03-15 10:21 ` James Ingham
@ 2000-03-26 22:34   ` Andrew Cagney
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Cagney @ 2000-03-26 22:34 UTC (permalink / raw)
  To: James Ingham; +Cc: Insight (GDB GUI), GDB Patches

James Ingham wrote:
> 
> Andrew,
> 
> I haven't really been paying that much attention to this configure
> stuff of late, sorry...  But now that I think of it, I am pretty sure
> all these link machinations are wholly unnecessary.  I munged the gdb
> startup code around so that gdb will find its library files from the
> build directory without using the link at all.  Moreover, when you
> fail at making the link gdb will still work in GUI mode.  So maybe we
> can just bag all this?
> 
> However, it would be good to make sure that this is not some wierdness
> in my environment that makes it work.  What about others?  If you
> delete the gdbtcl link in your build directory, can you still run gdb
> in gui mode from the gdb build directory?  If this is true for others
> as well, then we should just drop the extra complexity.

FYI,

I applied the attatched.  I don't have the time to look at your
environment :-(

	Andrew
Mon Mar 27 16:26:11 2000  Andrew Cagney  <cagney@b1.cygnus.com>

	* Makefile.in (all-gdbtk): Check for an existing link/directory.
  	Re-format warning message.  Document that post 5.0 this can be
 	deleted.

Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.14
diff -p -r1.14 Makefile.in
*** Makefile.in	2000/03/20 20:38:22	1.14
--- Makefile.in	2000/03/27 06:29:37
*************** findvar.o: findvar.c $(defs_h) $(gdbcore
*** 1260,1274 ****
  fork-child.o: fork-child.c gdb_wait.h $(defs_h) $(gdbcore_h) \
  	$(inferior_h) target.h terminal.h gdbthread.h gdb_string.h
  
  all-gdbtk:
! 	if test "$(LN_S)" = "ln -s" -a ! -d gdbtcl/images ; then \
! 	  echo linking ${srcdir}/gdbtk/library to gdbtcl ; \
! 	  $(LN_S) ${srcdir}/gdbtk/library gdbtcl ; \
! 	else \
! 	  echo Warning: Unable to link ${srcdir}/gdbtk/library to gdbtcl. ; \
! 	  echo "         " You will need to do a ; \
! 	  echo "         " make install before you are able to run the GUI. ; \
! 	fi
  
  clean-gdbtk:
  	rm -f gdbtcl
--- 1260,1282 ----
  fork-child.o: fork-child.c gdb_wait.h $(defs_h) $(gdbcore_h) \
  	$(inferior_h) target.h terminal.h gdbthread.h gdb_string.h
  
+ # FIXME: cagney/2000-03-27: Post 5.0 this link code can be removed.
+ # It should now be possible to run GDBtk from the build directory
+ # without the link in place.
  all-gdbtk:
! 	@if test ! -d gdbtcl/images ; then \
! 	  if test "$(LN_S)" = "ln -s" ; then \
! 	    echo linking ${srcdir}/gdbtk/library to gdbtcl ; \
! 	    rm -f gdbtcl ; \
! 	    test ! -r gdbtcl || exit 1 ; \
! 	    $(LN_S) ${srcdir}/gdbtk/library gdbtcl ; \
! 	  else \
! 	    echo "Warning:" ; \
! 	    echo "Unable to link ${srcdir}/gdbtk/library to gdbtcl." ; \
! 	    echo "You will need to do a \`make install' before you are" ; \
! 	    echo "able to run the GUI." ; \
! 	  fi ; \
! 	else true ; fi
  
  clean-gdbtk:
  	rm -f gdbtcl

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

end of thread, other threads:[~2000-03-26 22:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-03-14 23:13 RFC: More fixes to insights ln -s Andrew Cagney
2000-03-15 10:21 ` James Ingham
2000-03-26 22:34   ` Andrew Cagney

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