From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 57842 invoked by alias); 17 Jan 2020 18:24:41 -0000 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 Received: (qmail 57820 invoked by uid 89); 17 Jan 2020 18:24:40 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-5.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 17 Jan 2020 18:24:39 +0000 Received: from [172.16.0.95] (192-222-181-218.qc.cable.ebox.net [192.222.181.218]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 3AEC21E47D; Fri, 17 Jan 2020 13:24:37 -0500 (EST) Subject: Re: [RFA/gdb-9-branch] Abort configure immediately if building GDB in tree To: Joel Brobecker Cc: gdb-patches@sourceware.org, Tom Tromey References: <20200105073000.1012-1-brobecker@adacore.com> <4d350c75-6e52-5c4c-5901-4c391970b643@simark.ca> <20200117181554.GB7007@adacore.com> From: Simon Marchi Message-ID: Date: Fri, 17 Jan 2020 18:24:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <20200117181554.GB7007@adacore.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2020-01/txt/msg00556.txt.bz2 On 2020-01-17 1:15 p.m., Joel Brobecker wrote: > Hi Simon, > > Thanks for the review. > >>> +if test x"${enable_gdb}" != x"no"; then >>> + # For this branch, we do not support building GDB in-tree. >>> + # Try to detect whether we are in this situation or not by >>> + # searching for a couple of known files in the source directory. >>> + if test -f gnulib/update-gnulib.sh -a -f gdb/ChangeLog; then >>> + AC_MSG_ERROR([GDB must be configured and built in a directory separate from its sources]) >> >> Finish the message with a period? > > Of course! FWIW, I modeled this to other calls to AC_MSG_ERROR ;-) > >> Some people who only know the "./configure && make && make install" recipe >> might not know how (or that it's even possible) to configure and build in a >> separate directory, so they'll be stuck there. I think it would be helpful >> to give an example of how to do that, like: >> >> GDB must be configured and built in a directory separate from its sources. >> >> To do so, create a dedicated directory for your GDB build and invoke the configure >> script from that directory: >> >> $ mkdir my-gdb-build >> $ cd my-gdb-build >> $ ../path/to/gdb-x.y.z/configure [configure args] >> $ make >> >> Otherwise, that looks good to me. > > Attached is a revised patch. I chose to use the same sequence as > the one in gdb/README, just for consistency. LGTM, thanks!