public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [patch] make run
@ 2013-09-30 22:29 Doug Evans
  2013-09-30 22:36 ` Doug Evans
  2013-10-01  0:39 ` Sergio Durigan Junior
  0 siblings, 2 replies; 3+ messages in thread
From: Doug Evans @ 2013-09-30 22:29 UTC (permalink / raw)
  To: gdb-patches

Hi.
Since we can't agree on making gdb runnable from its build directory
(without having to manually specify --data-directory)
I plan to commit this patch (if there are no objections).

I plan to add an entry for it in the Hints section of the
wikified internals manual as well.
https://sourceware.org/gdb/wiki/InternalsManual


2013-09-30  Doug Evans  <dje@google.com>

	* Makefile.in (GDBFLAGS): New variable.
	(run): New rule.

Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.1270
diff -u -p -r1.1270 Makefile.in
--- Makefile.in	25 Sep 2013 23:17:11 -0000	1.1270
+++ Makefile.in	30 Sep 2013 22:17:58 -0000
@@ -178,6 +178,9 @@ INTL_CFLAGS = @INCINTL@
 # Did the user give us a --with-gdb-datadir option?
 GDB_DATADIR = @GDB_DATADIR@
 
+# Flags to pass to gdb when invoked with "make run".
+GDBFLAGS =
+
 # Helper code from gnulib.
 GNULIB_BUILDDIR = build-gnulib
 LIBGNU = $(GNULIB_BUILDDIR)/import/libgnu.a
@@ -1339,6 +1342,9 @@ data-directory/Makefile: data-directory/
 	  CONFIG_LINKS= \
 	  $(SHELL) config.status
 
+run: Makefile
+	./gdb$(EXEEXT) --data-directory=`pwd`/data-directory $(GDBFLAGS)
+
 jit-reader.h: $(srcdir)/jit-reader.in
 	$(SHELL) config.status $@
 

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

end of thread, other threads:[~2013-10-01  0:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-30 22:29 [patch] make run Doug Evans
2013-09-30 22:36 ` Doug Evans
2013-10-01  0:39 ` Sergio Durigan Junior

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