From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11811 invoked by alias); 3 Oct 2012 21:31:38 -0000 Received: (qmail 11652 invoked by uid 22791); 3 Oct 2012 21:31:37 -0000 X-SWARE-Spam-Status: No, hits=-6.6 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-vb0-f41.google.com (HELO mail-vb0-f41.google.com) (209.85.212.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 03 Oct 2012 21:31:27 +0000 Received: by vbkv13 with SMTP id v13so9557871vbk.0 for ; Wed, 03 Oct 2012 14:31:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-system-of-record:x-gm-message-state; bh=6SpsiLFct4eQPvXqcKaI60yCUOTwDapJs8kg7vt5eZU=; b=jiLMPWciwID11mmOIUGFKmg7UOMWs9bfitO24TfDPdNjWN9VWerT0fxSPwtVnSn7yN 7tqthme24iNhiBNuGwcR/gL0uHDYc+PxtGg/e3AJr3nUu4O2I4h5jpybjexiaOaOpmgp qf+gWXpZ6PjTJj6oEE0b19RuKt1pyUlJGu6XzBOH7Y5q9lMNn++G/V3lraU1NEuoEkMW YN17y0fyVyuqS8BqGmsdj6DwAHbRpuRxDEDitMIYHrlxD1s4AfLyMf5oV8RRYhT5qzd0 n1uKq5FYQCsB0DC9l3E2i2bvtD4YbJOi/slu8g1NUXgP+WBQlk5UJRGYYP4uHGVs4jhg VBaQ== MIME-Version: 1.0 Received: by 10.221.0.74 with SMTP id nl10mr1855558vcb.47.1349299886270; Wed, 03 Oct 2012 14:31:26 -0700 (PDT) Received: by 10.52.24.239 with HTTP; Wed, 3 Oct 2012 14:31:26 -0700 (PDT) In-Reply-To: <20120927091737.GB2980@adacore.com> References: <78B3333C-92F9-474D-8352-087C5A0F575B@cs.umd.edu> <20120924072945.GA4146@adacore.com> <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> <20120927091737.GB2980@adacore.com> Date: Wed, 03 Oct 2012 21:31:00 -0000 Message-ID: Subject: Re: [PATCH] Also install data-directory into the build directory as computed by relocate_gdb_directory From: Doug Evans To: Joel Brobecker Cc: Khoo Yit Phang , Jan Kratochvil , GDB Patches Content-Type: text/plain; charset=ISO-8859-1 X-System-Of-Record: true X-Gm-Message-State: ALoCoQnBtMc/sykypZKFaF5lS8bicfbpoNrN1qIOg4p8am6T2i3rbYxsTTNc51dNiwRFWIesJZayXHYug2SrPspX5Zd4QCozAroPazOesJKphCGzMtdRfYIVKUf7zKvdOacFdNNqYoDgXIsk9gqjdE9FYpXJCSkVfNkZwP4u/gWholMryahpqfHC/5+ZO5BrxjXG1hLmwnE/BPJxbF2jiCqJE0r9r1up8g== X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-10/txt/msg00049.txt.bz2 On Thu, Sep 27, 2012 at 2:17 AM, Joel Brobecker 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 >> >> * 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