From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4633 invoked by alias); 2 Jul 2019 08:38:14 -0000 Mailing-List: contact dwz-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: dwz-owner@sourceware.org Received: (qmail 4618 invoked by uid 89); 2 Jul 2019 08:38:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.100.3 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.6 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.1 spammy=facilitate X-Spam-Status: No, score=-24.6 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on sourceware.org X-Spam-Level: X-HELO: mx1.suse.de X-Virus-Scanned: by amavisd-new at test-mx.suse.de Date: Tue, 01 Jan 2019 00:00:00 -0000 From: Tom de Vries To: dwz@sourceware.org, jakub@redhat.com Cc: Matthias Klose Subject: [committed] Handle running configure in source dir Message-ID: <20190702083808.GA15199@delia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-SW-Source: 2019-q3/txt/msg00007.txt.bz2 Hi, The configure script was added to facilitate building in a separate build dir rather than in the source dir. It does this by generating a Makefile in the build dir that calls make using the Makefile in the source dir. However, running the configure in the source dir overwrites the Makefile in the source dir. Fix this by detecting running configure in the source dir, and not generating the unnecessary Makefile. Committed to trunk. Thanks, - Tom Handle running configure in source dir 2019-07-02 Tom de Vries * configure: Handle running in source dir. --- configure | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/configure b/configure index 24f3fd2..894f6be 100755 --- a/configure +++ b/configure @@ -1,6 +1,12 @@ #!/bin/sh srcdir=$(cd $(dirname $0); pwd -P) +if [ "$srcdir" = "$(pwd -P)" ]; then + # We're not in a separate build dir, but in the source dir, we already + # have a Makefile. + exit 0 +fi + cat > Makefile <