From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30527 invoked by alias); 27 Sep 2012 09:17:45 -0000 Received: (qmail 30518 invoked by uid 22791); 27 Sep 2012 09:17:44 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_NO X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 27 Sep 2012 09:17:40 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id E680D1C7D94; Thu, 27 Sep 2012 05:17:39 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id t1KGnm0OHcOG; Thu, 27 Sep 2012 05:17:39 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id A2F391C7BC9; Thu, 27 Sep 2012 05:17:39 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 0B084C87C9; Thu, 27 Sep 2012 11:17:37 +0200 (CEST) Date: Thu, 27 Sep 2012 09:17:00 -0000 From: Joel Brobecker To: Khoo Yit Phang Cc: Jan Kratochvil , GDB Patches Subject: Re: [PATCH] Also install data-directory into the build directory as computed by relocate_gdb_directory Message-ID: <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) 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-09/txt/msg00616.txt.bz2 Does anyone have any objection to this approach in principle? > 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