From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.151; helo=mga17.intel.com; envelope-from=bob.c.feng@intel.com; receiver=edk2-devel@lists.01.org Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (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 CB392211BA45F for ; Thu, 24 Jan 2019 21:05:05 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Jan 2019 21:05:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,519,1539673200"; d="scan'208";a="294272539" Received: from shwdepsi1121.ccr.corp.intel.com ([10.239.158.47]) by orsmga005.jf.intel.com with ESMTP; 24 Jan 2019 21:05:03 -0800 From: "Feng, Bob C" To: edk2-devel@lists.01.org Cc: Zhijux Fan , Bob Feng , Liming Gao , Yonghong Zhu Date: Fri, 25 Jan 2019 12:56:08 +0800 Message-Id: <20190125045626.14700-16-bob.c.feng@intel.com> X-Mailer: git-send-email 2.20.1.windows.1 In-Reply-To: <20190125045626.14700-1-bob.c.feng@intel.com> References: <20190125045626.14700-1-bob.c.feng@intel.com> MIME-Version: 1.0 Subject: [Patch 15/33] Basetools: It went wrong when use os.linesep X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jan 2019 05:05:06 -0000 Content-Transfer-Encoding: 8bit From: Zhijux Fan in python2 and python3,use of line breaks Cc: Bob Feng Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan --- BaseTools/Source/Python/AutoGen/AutoGen.py | 10 +++++----- BaseTools/Source/Python/AutoGen/GenMake.py | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py index 0bed416c52..00ed804e62 100644 --- a/BaseTools/Source/Python/AutoGen/AutoGen.py +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py @@ -679,31 +679,31 @@ class WorkspaceAutoGen(AutoGen): # # Create BuildOptions Macro & PCD metafile, also add the Active Platform and FDF file. # content = 'gCommandLineDefines: ' content += str(GlobalData.gCommandLineDefines) - content += os.linesep + content += TAB_LINE_BREAK content += 'BuildOptionPcd: ' content += str(GlobalData.BuildOptionPcd) - content += os.linesep + content += TAB_LINE_BREAK content += 'Active Platform: ' content += str(self.Platform) - content += os.linesep + content += TAB_LINE_BREAK if self.FdfFile: content += 'Flash Image Definition: ' content += str(self.FdfFile) - content += os.linesep + content += TAB_LINE_BREAK SaveFileOnChange(os.path.join(self.BuildDir, 'BuildOptions'), content, False) # # Create PcdToken Number file for Dynamic/DynamicEx Pcd. # PcdTokenNumber = 'PcdTokenNumber: ' if Pa.PcdTokenNumber: if Pa.DynamicPcdList: for Pcd in Pa.DynamicPcdList: - PcdTokenNumber += os.linesep + PcdTokenNumber += TAB_LINE_BREAK PcdTokenNumber += str((Pcd.TokenCName, Pcd.TokenSpaceGuidCName)) PcdTokenNumber += ' : ' PcdTokenNumber += str(Pa.PcdTokenNumber[Pcd.TokenCName, Pcd.TokenSpaceGuidCName]) SaveFileOnChange(os.path.join(self.BuildDir, 'PcdTokenNumber'), PcdTokenNumber, False) diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py b/BaseTools/Source/Python/AutoGen/GenMake.py index 0e886967cc..3094a555e0 100644 --- a/BaseTools/Source/Python/AutoGen/GenMake.py +++ b/BaseTools/Source/Python/AutoGen/GenMake.py @@ -546,12 +546,12 @@ cleanlib: NewStr.append(Str) UnexpandMacroStr = ' '.join(UnexpandMacro) NewRespStr = ' '.join(NewStr) SaveFileOnChange(RespFile, NewRespStr, False) ToolsDef.append("%s = %s" % (Resp, UnexpandMacroStr + ' @' + RespFile)) - RespFileListContent += '@' + RespFile + os.linesep - RespFileListContent += NewRespStr + os.linesep + RespFileListContent += '@' + RespFile + TAB_LINE_BREAK + RespFileListContent += NewRespStr + TAB_LINE_BREAK SaveFileOnChange(RespFileList, RespFileListContent, False) else: if os.path.exists(RespFileList): os.remove(RespFileList) -- 2.20.1.windows.1