From patchwork Mon Nov 5 18:14:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 150219 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp2931941ljp; Mon, 5 Nov 2018 10:18:00 -0800 (PST) X-Google-Smtp-Source: AJdET5erWtHdYFVWG277oIrS/Izl4opKPQ0Bo8ZgqlM3jmEz9VD3iReSmw4MPXn9UxPsyDfmyCR0 X-Received: by 2002:a37:5906:: with SMTP id n6-v6mr21340059qkb.73.1541441880640; Mon, 05 Nov 2018 10:18:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541441880; cv=none; d=google.com; s=arc-20160816; b=Nm/RgatL/K+IBAEfUOB5Gwl/mzTr555ia22yploHQbAO9eMjGAQayCvEfw5ZchbkUY JT1VBmQtJqdHPxzBlknlBx02a4c6AdTdmhKdAlrI9Sg/gUFK85GyQZLMWtyiZ8zlVOl6 UJzLcYYmgJ0O2LZwVdMRomEAqi+L0Qz0HLPuKhMyhUYBtLJ2cG8xAyX4uPfacz2cMxiX LKDEQiRNZqtqG3i1ygurk+p7K9VCw/vJL+rpOkM5ArzAZT2RW/tnvcMsf6NOpkL+HXQ/ ur3hw1t2VhF2kP75RZoNI4wVniFCtH8FPLemzuzEDUQ0WXLJvSwtSgBQKWlpfxDnmWoa DwzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:in-reply-to :content-disposition:mime-version:references:message-id:to:from:date; bh=z9TnIR/dyVThYWuW2zs0iz94ZqWkYM0QQn60fQLGqNc=; b=h2397eoWC4xwZoSXtyYcX4ByeA94v3knRT59m4+8KyovUvuB+sX7FB/SqFF5SDhVbv rKipDI6o3T1KIO4upChXSgB2XBO8k9AZO+5kNmcOBCS0pJ9SGVtloXwGioWj/LpOszeV f/zGaM1IZmbE+02J3B307VZtB7pjtHJ2BdXCdQWr+YvmQZ8wCHS9OIn4Cx1dO9111i/v 6AZ+8iliWDcmFrR0mAwrpupLdF7MoT4XAwRAzY5dZ5WuiJ4mHFxHAJIwD46Vq+jQAa2V 3HrD9hPZNvQxDjCBEbRPnutVF7+vA7wrJ8GFGAloNuX4MfWvRBQ/tcnx14i38l0b16sU 3Lbg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id s34si859280qtb.17.2018.11.05.10.18.00 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 05 Nov 2018 10:18:00 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1]:36878 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gJjRn-0000md-VL for patch@linaro.org; Mon, 05 Nov 2018 13:18:00 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59834) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gJjOe-00065B-Kk for qemu-devel@nongnu.org; Mon, 05 Nov 2018 13:14:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gJjOd-0000xH-7R for qemu-devel@nongnu.org; Mon, 05 Nov 2018 13:14:44 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35322) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gJjOc-0000ws-U9 for qemu-devel@nongnu.org; Mon, 05 Nov 2018 13:14:43 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 38BDC368E7; Mon, 5 Nov 2018 18:14:42 +0000 (UTC) Received: from redhat.com (ovpn-121-251.rdu2.redhat.com [10.10.121.251]) by smtp.corp.redhat.com (Postfix) with SMTP id B5F04600D6; Mon, 5 Nov 2018 18:14:34 +0000 (UTC) Date: Mon, 5 Nov 2018 13:14:34 -0500 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Message-ID: <20181105181353.39804-4-mst@redhat.com> References: <20181105181353.39804-1-mst@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20181105181353.39804-1-mst@redhat.com> X-Mutt-Fcc: =sent X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Mon, 05 Nov 2018 18:14:42 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 03/33] configure: Rename FILES variable to LINKS X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Richard Henderson , Gerd Hoffmann , Paolo Bonzini , =?utf-8?q?Marc-Andr=C3=A9?= Lureau Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Peter Maydell The FILES variable is used to accumulate a list of things to symlink from the source tree into the build tree. These don't have to be individual files; symlinking an entire directory of data files is also fine. Rename it to something less confusing before we add a few directories to it. Improve the comment to clarify what DIRS and LINKS do and why it's not a good idea to add things to LINKS with wildcarding. Signed-off-by: Peter Maydell --- configure | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) -- MST diff --git a/configure b/configure index bfdca8b814..52408ed307 100755 --- a/configure +++ b/configure @@ -7392,22 +7392,31 @@ if test "$ccache_cpp2" = "yes"; then echo "export CCACHE_CPP2=y" >> $config_host_mak fi -# build tree in object directory in case the source is not in the current directory +# If we're using a separate build tree, set it up now. +# DIRS are directories which we simply mkdir in the build tree; +# LINKS are things to symlink back into the source tree +# (these can be both files and directories). +# Caution: do not add files or directories here using wildcards. This +# will result in problems later if a new file matching the wildcard is +# added to the source tree -- nothing will cause configure to be rerun +# so the build tree will be missing the link back to the new file, and +# tests might fail. Prefer to keep the relevant files in their own +# directory and symlink the directory instead. DIRS="tests tests/tcg tests/tcg/cris tests/tcg/lm32 tests/libqos tests/qapi-schema tests/tcg/xtensa tests/qemu-iotests tests/vm" DIRS="$DIRS tests/fp" DIRS="$DIRS docs docs/interop fsdev scsi" DIRS="$DIRS pc-bios/optionrom pc-bios/spapr-rtas pc-bios/s390-ccw" DIRS="$DIRS roms/seabios roms/vgabios" -FILES="Makefile tests/tcg/Makefile qdict-test-data.txt" -FILES="$FILES tests/tcg/cris/Makefile tests/tcg/cris/.gdbinit" -FILES="$FILES tests/tcg/lm32/Makefile tests/tcg/xtensa/Makefile po/Makefile" -FILES="$FILES tests/fp/Makefile" -FILES="$FILES pc-bios/optionrom/Makefile pc-bios/keymaps" -FILES="$FILES pc-bios/spapr-rtas/Makefile" -FILES="$FILES pc-bios/s390-ccw/Makefile" -FILES="$FILES roms/seabios/Makefile roms/vgabios/Makefile" -FILES="$FILES pc-bios/qemu-icon.bmp" -FILES="$FILES .gdbinit scripts" # scripts needed by relative path in .gdbinit +LINKS="Makefile tests/tcg/Makefile qdict-test-data.txt" +LINKS="$LINKS tests/tcg/cris/Makefile tests/tcg/cris/.gdbinit" +LINKS="$LINKS tests/tcg/lm32/Makefile tests/tcg/xtensa/Makefile po/Makefile" +LINKS="$LINKS tests/fp/Makefile" +LINKS="$LINKS pc-bios/optionrom/Makefile pc-bios/keymaps" +LINKS="$LINKS pc-bios/spapr-rtas/Makefile" +LINKS="$LINKS pc-bios/s390-ccw/Makefile" +LINKS="$LINKS roms/seabios/Makefile roms/vgabios/Makefile" +LINKS="$LINKS pc-bios/qemu-icon.bmp" +LINKS="$LINKS .gdbinit scripts" # scripts needed by relative path in .gdbinit for bios_file in \ $source_path/pc-bios/*.bin \ $source_path/pc-bios/*.lid \ @@ -7419,10 +7428,10 @@ for bios_file in \ $source_path/pc-bios/u-boot.* \ $source_path/pc-bios/palcode-* do - FILES="$FILES pc-bios/$(basename $bios_file)" + LINKS="$LINKS pc-bios/$(basename $bios_file)" done mkdir -p $DIRS -for f in $FILES ; do +for f in $LINKS ; do if [ -e "$source_path/$f" ] && [ "$pwd_is_source_path" != "y" ]; then symlink "$source_path/$f" "$f" fi