From patchwork Thu Apr 14 15:13:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laszlo Ersek X-Patchwork-Id: 65837 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp658708qge; Thu, 14 Apr 2016 08:13:52 -0700 (PDT) X-Received: by 10.66.66.167 with SMTP id g7mr21563069pat.111.1460646831853; Thu, 14 Apr 2016 08:13:51 -0700 (PDT) Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id g7si10380495pat.103.2016.04.14.08.13.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Apr 2016 08:13:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 28E0D1A222B; Thu, 14 Apr 2016 08:13:51 -0700 (PDT) X-Original-To: edk2-devel@ml01.01.org Delivered-To: edk2-devel@ml01.01.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id F0CB11A222B for ; Thu, 14 Apr 2016 08:13:49 -0700 (PDT) Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7A6FE7DCF0; Thu, 14 Apr 2016 15:13:49 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-113-89.phx2.redhat.com [10.3.113.89]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u3EFDfQO006538; Thu, 14 Apr 2016 11:13:48 -0400 From: Laszlo Ersek To: edk2-devel-01 Date: Thu, 14 Apr 2016 17:13:38 +0200 Message-Id: <1460646818-26390-4-git-send-email-lersek@redhat.com> In-Reply-To: <1460646818-26390-1-git-send-email-lersek@redhat.com> References: <1460646818-26390-1-git-send-email-lersek@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 Subject: [edk2] [PATCH 3/3] BaseTools: handleWsMacro: keep trailing os.sep in WORKSPACE substitution X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Liming Gao MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" The NASM utility requires a trailing directory separator for its -I and -i options (this is a documented requirement). The INF file "OvmfPkg/ResetVector/ResetVector.inf" conforms to it: [BuildOptions] *_*_IA32_NASMB_FLAGS = -I$(WORKSPACE)/UefiCpuPkg/ResetVector/Vtf0/ *_*_X64_NASMB_FLAGS = -I$(WORKSPACE)/UefiCpuPkg/ResetVector/Vtf0/ but handleWsMacro currently removes such trailing separators with the os.path.normpath() function, breaking the OVMF build. Restore the trailing separator when necessary. Cc: Yonghong Zhu Cc: Liming Gao Fixes: 2b1c08acfceb94326c67b7d8f9fe5d8ab4cb7f61 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek --- BaseTools/Source/Python/Common/MultipleWorkspace.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) -- 1.8.3.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel diff --git a/BaseTools/Source/Python/Common/MultipleWorkspace.py b/BaseTools/Source/Python/Common/MultipleWorkspace.py index d546c627a45a..e20ec692acfd 100644 --- a/BaseTools/Source/Python/Common/MultipleWorkspace.py +++ b/BaseTools/Source/Python/Common/MultipleWorkspace.py @@ -137,7 +137,11 @@ class MultipleWorkspace(object): Substr = str[MacroEndPos+1:] if Substr.startswith(os.sep): Substr = Substr[1:] - PathList[i] = str[0:MacroStartPos] + os.path.normpath(cls.join(cls.WORKSPACE, Substr)) + if Substr.endswith(os.sep): + Final = os.sep + else: + Final = '' + PathList[i] = str[0:MacroStartPos] + os.path.normpath(cls.join(cls.WORKSPACE, Substr)) + Final PathStr = ' '.join(PathList) return PathStr