This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] make run
- From: Sergio Durigan Junior <sergiodj at redhat dot com>
- To: Doug Evans <dje at google dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 30 Sep 2013 21:39:08 -0300
- Subject: Re: [patch] make run
- Authentication-results: sourceware.org; auth=none
- References: <yjt2txh2aqq0 dot fsf at ruffy dot mtv dot corp dot google dot com>
On Monday, September 30 2013, Doug Evans wrote:
> 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).
Decisions from yesterday's chat? :-P
> 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
It looks good to me (with the PHONY addition). Thanks for doing that!
BTW, I think it would be good to explicitly mention the --data-directory
option there too (if it's not mentioned yet, of course).
> 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 $@
--
Sergio