This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Also install data-directory into the build directory as computed by relocate_gdb_directory
- From: Doug Evans <dje at google dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: Khoo Yit Phang <khooyp at cs dot umd dot edu>, Jan Kratochvil <jan dot kratochvil at redhat dot com>, GDB Patches <gdb-patches at sourceware dot org>
- Date: Wed, 3 Oct 2012 14:31:26 -0700
- Subject: Re: [PATCH] Also install data-directory into the build directory as computed by relocate_gdb_directory
- References: <78B3333C-92F9-474D-8352-087C5A0F575B@cs.umd.edu> <20120924072945.GA4146@adacore.com> <AF12A41C-7B71-45F6-9496-1C8797774D58@cs.umd.edu> <20120924145910.GE4146@adacore.com> <2878953E-B698-43F3-989A-A551D96BAB62@cs.umd.edu> <20120924152641.GF4146@adacore.com> <9F52A338-A158-44DC-90C1-F46503859613@cs.umd.edu> <285502C6-1395-4049-9D55-031EDA3AD06D@cs.umd.edu> <20120924170348.GI4146@adacore.com> <CC9CEDC8-8941-43A8-88EA-DAB1B671DD32@cs.umd.edu> <20120927091737.GB2980@adacore.com>
On Thu, Sep 27, 2012 at 2:17 AM, Joel Brobecker <brobecker@adacore.com> wrote:
> Does anyone have any objection to this approach in principle?
I'm not entirely comfortable with this yet, but I might be persuaded.
Alternative: Is there a robust enough test to determine gdb is being
run from its build directory?
If so, you could use that to change the default value of
data-directory to $obj/gdb/data-directory.
>> 2012-09-24 Khoo Yit Phang <khooyp@cs.umd.edu>
>>
>> * data-directory/Makefile.in (all): Also install data-directory
>> into the build directory at the location computed by
>> relocate_gdb_directory when gdb is run from the build directory.
>
> It took me a long time to understand why you had to do things the way
> you do. I would have prefered a patch that just needs to call make with
> a new value for "prefix" set to "$(top_build_dir)/..", rather . But it
> would not work if configured with --with-gdb-datadir.
>
> There is an issue, I think, with your patch, unfortunately: I think
> it requires GNU Make, as you are using variable substitution which
> I do not think is available with all flavors of make.
>
> There are only so many options I can see:
> 1. Conditionalize this feature to having GNU Make. Not sure how to do
> that, though;
> 2. Compute the in-tree directory locations during the configure
> step.
>
> Option (2) is going to be a little more work, but maybe someone has
> another simpler suggestion.
>
>> diff --git a/gdb/data-directory/Makefile.in b/gdb/data-directory/Makefile.in
>> --- a/gdb/data-directory/Makefile.in
>> +++ b/gdb/data-directory/Makefile.in
>> @@ -95,8 +95,14 @@
>> "RUNTEST=$(RUNTEST)" \
>> "RUNTESTFLAGS=$(RUNTESTFLAGS)"
>>
>> +# Also install data-directory into the build directory at the location
>> +# computed by relocate_gdb_directory when gdb is run from the build directory.
>> .PHONY: all
>> all: stamp-syscalls stamp-python
>> + @$(MAKE) $(FLAGS_TO_PASS) \
>> + "SYSCALLS_INSTALL_DIR=$(top_builddir)/../$(SYSCALLS_INSTALL_DIR:$(prefix)/%=%)" \
>> + "PYTHON_INSTALL_DIR=$(top_builddir)/../$(PYTHON_INSTALL_DIR:$(prefix)/%=%)" \
>> + install-only
>>
>> # For portability's sake, we need to handle systems that don't have
>> # symbolic links.
>
>
> --
> Joel