From patchwork Wed Feb 3 15:30:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Campbell X-Patchwork-Id: 8204051 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 3B6F4BEEE5 for ; Wed, 3 Feb 2016 15:33:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6424F20221 for ; Wed, 3 Feb 2016 15:33:40 +0000 (UTC) Received: from lists.xen.org (lists.xenproject.org [50.57.142.19]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 78A552022D for ; Wed, 3 Feb 2016 15:33:39 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aQzOt-00046N-LF; Wed, 03 Feb 2016 15:31:23 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aQzOr-00046E-JT for xen-devel@lists.xen.org; Wed, 03 Feb 2016 15:31:21 +0000 Received: from [193.109.254.147] by server-6.bemta-14.messagelabs.com id B8/96-16618-84D12B65; Wed, 03 Feb 2016 15:31:20 +0000 X-Env-Sender: prvs=8347a21d9=Ian.Campbell@citrix.com X-Msg-Ref: server-8.tower-27.messagelabs.com!1454513475!17476792!1 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 7.35.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 57343 invoked from network); 3 Feb 2016 15:31:20 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-8.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 3 Feb 2016 15:31:20 -0000 X-IronPort-AV: E=Sophos;i="5.22,391,1449532800"; d="scan'208";a="329431326" From: Ian Campbell To: , , Date: Wed, 3 Feb 2016 15:30:55 +0000 Message-ID: <1454513456-7109-1-git-send-email-ian.campbell@citrix.com> X-Mailer: git-send-email 2.1.4 MIME-Version: 1.0 X-DLP: MIA2 Cc: Ian Campbell Subject: [Xen-devel] [PATCH 1/2] tools: consolidate Makefile runes to building+installing qemu-trad X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Currently both subdir-all-qemu-traditional-dir and subdir-install-... recurse into qemu-traditional-dir and run xen-setup, but with subtly different options (--extra-cflags was only passed for install). Consolidate these by having the install target depend on the all (build) target and only calling make install. There is a subtlty which is that qemu-trad's build is not completely isolated from xen.git and requires some environment variables etc. To handle this refactor the setup code into a make macro and $(call) it in both cases. Note that this doesn't actually omit a potential double call to configure, since all is still called during install, this is the same for qemu-xen. Note that it doesn't result in a double build in either case, since apparently the qemu configure is idempotent. Signed-off-by: Ian Campbell --- tools/Makefile | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/tools/Makefile b/tools/Makefile index 75fda58..454d0bf 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -184,28 +184,25 @@ qemu-xen-traditional-dir-force-update: qemu-xen-traditional-dir-find $(GIT) reset --hard $(QEMU_TRADITIONAL_REVISION); \ fi -subdir-all-qemu-xen-traditional-dir: qemu-xen-traditional-dir-find +qemu-traditional-recurse = \ set -e; \ $(buildmakevars2shellvars); \ export CONFIG_BLKTAP1=n; \ cd qemu-xen-traditional-dir; \ - $(QEMU_ROOT)/xen-setup \ - $(IOEMU_EXTRA_LDFLAGS) \ - --cpu=$(IOEMU_CPU_ARCH) \ - $(IOEMU_CONFIGURE_CROSS); \ - $(MAKE) all + $(1) -subdir-install-qemu-xen-traditional-dir: qemu-xen-traditional-dir-find - set -e; \ - $(buildmakevars2shellvars); \ - export CONFIG_BLKTAP1=n; \ - cd qemu-xen-traditional-dir; \ +subdir-all-qemu-xen-traditional-dir: qemu-xen-traditional-dir-find + $(call qemu-traditional-recurse,\ $(QEMU_ROOT)/xen-setup \ --extra-cflags="$(EXTRA_CFLAGS_QEMU_TRADITIONAL)" \ $(IOEMU_EXTRA_LDFLAGS) \ --cpu=$(IOEMU_CPU_ARCH) \ $(IOEMU_CONFIGURE_CROSS); \ - $(MAKE) install + $(MAKE) all \ + ) + +subdir-install-qemu-xen-traditional-dir: subdir-all-qemu-xen-traditional-dir + $(call qemu-traditional-recurse,$(MAKE) install) subdir-clean-qemu-xen-traditional-dir: set -e; if test -d qemu-xen-traditional-dir/.; then \