[PATCH] Also install data-directory into the build directory as computed by relocate_gdb_directory
Doug Evans
dje@google.com
Wed Oct 3 21:31:00 GMT 2012
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
More information about the Gdb-patches
mailing list