From nobody Thu Apr 25 20:24:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1602082723; cv=none; d=zohomail.com; s=zohoarc; b=jjAjH0kUCErcAQp990ltciZmtvMJmOlUs14sfz/CqJRMwkqDRCNJ26NUwPDFr55lS/WFjM5kzeUQ5g0Qqarg0uuXUdG0lvCu8TGVrxC3BLZfwfw0A3CQ/gC5vS7R2nLFoZywQr4TBLkiLDFM0+9e9+KXFa9QSmAtNvvz4fvD9K4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1602082723; h=Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:Message-ID:Sender:Subject:To; bh=haEUgaMcw51snUi9L0Gn8vKe1VOqQBnoCMF1n9ZX6e0=; b=eGHBfLHZi1CE2izI5dC5P0mux5OL8Wq3Bn+0aTBaClrd7e5ireg9+kdv9imhp4v1JpkuRZ9FFMhSyrKQvNRPlKzTxtlVYZmZoIgXocjook59F7DEIpVJmYajbhqUG6Ztckiqy/EQughb+M6arlPjTPmRlhg9x+6ukwP8BKwkrQE= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1602082723475721.841502063796; Wed, 7 Oct 2020 07:58:43 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.3549.10151 (Exim 4.92) (envelope-from ) id 1kQAtQ-0000EO-71; Wed, 07 Oct 2020 14:58:12 +0000 Received: by outflank-mailman (output) from mailman id 3549.10151; Wed, 07 Oct 2020 14:58:12 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQAtQ-0000EH-2W; Wed, 07 Oct 2020 14:58:12 +0000 Received: by outflank-mailman (input) for mailman id 3549; Wed, 07 Oct 2020 14:58:10 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQAtO-0000EC-F3 for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 14:58:10 +0000 Received: from foss.arm.com (unknown [217.140.110.172]) by us1-rack-iad1.inumbo.com (Halon) with ESMTP id 37f9e5d1-c3bc-4f9c-a7b2-3b36f8c8695d; Wed, 07 Oct 2020 14:58:08 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8044F106F; Wed, 7 Oct 2020 07:58:08 -0700 (PDT) Received: from e109506-lin.cambridge.arm.com (e109506-lin.cambridge.arm.com [10.1.198.23]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 14DAF3F66B; Wed, 7 Oct 2020 07:58:06 -0700 (PDT) Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQAtO-0000EC-F3 for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 14:58:10 +0000 Received: from foss.arm.com (unknown [217.140.110.172]) by us1-rack-iad1.inumbo.com (Halon) with ESMTP id 37f9e5d1-c3bc-4f9c-a7b2-3b36f8c8695d; Wed, 07 Oct 2020 14:58:08 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8044F106F; Wed, 7 Oct 2020 07:58:08 -0700 (PDT) Received: from e109506-lin.cambridge.arm.com (e109506-lin.cambridge.arm.com [10.1.198.23]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 14DAF3F66B; Wed, 7 Oct 2020 07:58:06 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 37f9e5d1-c3bc-4f9c-a7b2-3b36f8c8695d From: Bertrand Marquis To: xen-devel@lists.xenproject.org Cc: Andrew Cooper , George Dunlap , Ian Jackson , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Doug Goldstein , Daniel De Graaf Subject: [PATCH v2] build: always use BASEDIR for xen sub-directory Date: Wed, 7 Oct 2020 15:57:51 +0100 Message-Id: X-Mailer: git-send-email 2.17.1 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Modify Makefiles using $(XEN_ROOT)/xen to use $(BASEDIR) instead. This is removing the dependency to xen subdirectory preventing using a wrong configuration file when xen subdirectory is duplicated for compilation tests. BASEDIR is set in xen/lib/x86/Makefile as this Makefile is directly called from the tools build and install process and BASEDIR is not set there. Signed-off-by: Bertrand Marquis Acked-by: Jan Beulich --- Changes in v2: Fix tools installation by setting BASEDIR in lib/x86 Makefile. --- xen/common/Makefile | 6 +++--- xen/include/xen/lib/x86/Makefile | 6 ++++-- xen/tools/kconfig/Makefile.kconfig | 2 +- xen/xsm/flask/Makefile | 4 ++-- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/xen/common/Makefile b/xen/common/Makefile index b3b60a1ba2..083f62acb6 100644 --- a/xen/common/Makefile +++ b/xen/common/Makefile @@ -78,14 +78,14 @@ obj-$(CONFIG_UBSAN) +=3D ubsan/ obj-$(CONFIG_NEEDS_LIBELF) +=3D libelf/ obj-$(CONFIG_HAS_DEVICE_TREE) +=3D libfdt/ =20 -CONF_FILE :=3D $(if $(patsubst /%,,$(KCONFIG_CONFIG)),$(XEN_ROOT)/xen/)$(K= CONFIG_CONFIG) +CONF_FILE :=3D $(if $(patsubst /%,,$(KCONFIG_CONFIG)),$(BASEDIR)/)$(KCONFI= G_CONFIG) config.gz: $(CONF_FILE) gzip -c $< >$@ =20 config_data.o: config.gz =20 -config_data.S: $(XEN_ROOT)/xen/tools/binfile - $(SHELL) $(XEN_ROOT)/xen/tools/binfile $@ config.gz xen_config_data +config_data.S: $(BASEDIR)/tools/binfile + $(SHELL) $(BASEDIR)/tools/binfile $@ config.gz xen_config_data =20 clean:: rm -f config_data.S config.gz 2>/dev/null diff --git a/xen/include/xen/lib/x86/Makefile b/xen/include/xen/lib/x86/Mak= efile index 408d69c99e..c3b9ebe961 100644 --- a/xen/include/xen/lib/x86/Makefile +++ b/xen/include/xen/lib/x86/Makefile @@ -1,8 +1,10 @@ include $(XEN_ROOT)/Config.mk =20 +BASEDIR =3D $(XEN_ROOT)/xen + .PHONY: all all: cpuid-autogen.h =20 -cpuid-autogen.h: $(XEN_ROOT)/xen/include/public/arch-x86/cpufeatureset.h $= (XEN_ROOT)/xen/tools/gen-cpuid.py - $(PYTHON) $(XEN_ROOT)/xen/tools/gen-cpuid.py -i $< -o $@.new +cpuid-autogen.h: $(BASEDIR)/include/public/arch-x86/cpufeatureset.h $(BASE= DIR)/tools/gen-cpuid.py + $(PYTHON) $(BASEDIR)/tools/gen-cpuid.py -i $< -o $@.new $(call move-if-changed,$@.new,$@) diff --git a/xen/tools/kconfig/Makefile.kconfig b/xen/tools/kconfig/Makefil= e.kconfig index 065f4b8471..799321ec4d 100644 --- a/xen/tools/kconfig/Makefile.kconfig +++ b/xen/tools/kconfig/Makefile.kconfig @@ -9,7 +9,7 @@ Q :=3D kecho :=3D : =20 # eventually you'll want to do out of tree builds -srctree :=3D $(XEN_ROOT)/xen +srctree :=3D $(BASEDIR) objtree :=3D $(srctree) src :=3D tools/kconfig obj :=3D $(src) diff --git a/xen/xsm/flask/Makefile b/xen/xsm/flask/Makefile index 50bec20a1e..637159ad82 100644 --- a/xen/xsm/flask/Makefile +++ b/xen/xsm/flask/Makefile @@ -35,8 +35,8 @@ $(subst include/,%/,$(AV_H_FILES)): $(AV_H_DEPEND) $(mkac= cess) FORCE obj-bin-$(CONFIG_XSM_FLASK_POLICY) +=3D flask-policy.o flask-policy.o: policy.bin =20 -flask-policy.S: $(XEN_ROOT)/xen/tools/binfile - $(SHELL) $(XEN_ROOT)/xen/tools/binfile -i $@ policy.bin xsm_flask_init_po= licy +flask-policy.S: $(BASEDIR)/tools/binfile + $(SHELL) $(BASEDIR)/tools/binfile -i $@ policy.bin xsm_flask_init_policy =20 FLASK_BUILD_DIR :=3D $(CURDIR) POLICY_SRC :=3D $(FLASK_BUILD_DIR)/xenpolicy-$(XEN_FULLVERSION) --=20 2.17.1