From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mx.groups.io with SMTP id smtpd.web11.6320.1604890289112615372 for ; Sun, 08 Nov 2020 18:51:29 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.88, mailfrom: mingyuex.liang@intel.com) IronPort-SDR: ABEtHYjVbg/X0j5juLOOSgGSQWuFQHyK27jszqg4EHyBZynCCxJRtxhGrNuCJ9xtSxtfQSYDhv qIkKIoSGvy3A== X-IronPort-AV: E=McAfee;i="6000,8403,9799"; a="187686835" X-IronPort-AV: E=Sophos;i="5.77,462,1596524400"; d="scan'208";a="187686835" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Nov 2020 18:51:28 -0800 IronPort-SDR: PgerWoDa39p0W15iLoyH/MUMEOF8PMie6sV5sgntibnbahfYF4uvmtlV7YSCD7GHaolGsMynL5 Bvqaj6xgNA/Q== X-IronPort-AV: E=Sophos;i="5.77,462,1596524400"; d="scan'208";a="540655610" Received: from bob-desktop.ccr.corp.intel.com ([10.239.49.41]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Nov 2020 18:51:26 -0800 From: "Mingyue Liang" To: devel@edk2.groups.io Cc: Bob Feng , Liming Gao , Yuwei Chen Subject: [PATCH.V3] BaseTools: Incremental build issue for included ASI file's deletion. Date: Mon, 9 Nov 2020 10:51:21 +0800 Message-Id: <20201109025121.1269-1-mingyuex.liang@intel.com> X-Mailer: git-send-email 2.29.2.windows.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2972 When using incremental build to delete an included xxx.asi file from the ASL file, the xxx.asl.trim.deps file generated by previous build process will not be deleted from the OUTPUT directory, which caused the dependency file still include the xxx.asl.trim.deps file. If the include file is deleted and DEPs is empty. Signed-off-by: Mingyue Liang Cc: Bob Feng Cc: Liming Gao Cc: Yuwei Chen --- V3: Modify Version Description location. BaseTools/Source/Python/Trim/Trim.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/BaseTools/Source/Python/Trim/Trim.py b/BaseTools/Source/Python/Trim/Trim.py index 776474b20349..c479f7d2b2e7 100644 --- a/BaseTools/Source/Python/Trim/Trim.py +++ b/BaseTools/Source/Python/Trim/Trim.py @@ -372,8 +372,7 @@ def TrimAslFile(Source, Target, IncludePathFile,AslDeps = False): AslIncludes = [] Lines = DoInclude(Source, '', IncludePathList,IncludeFileList=AslIncludes,filetype='ASL') AslIncludes = [item for item in AslIncludes if item !=Source] - if AslDeps and AslIncludes: - SaveFileOnChange(os.path.join(os.path.dirname(Target),os.path.basename(Source))+".trim.deps", " \\\n".join([Source+":"] +AslIncludes),False) + SaveFileOnChange(os.path.join(os.path.dirname(Target),os.path.basename(Source))+".trim.deps", " \\\n".join([Source+":"] +AslIncludes),False) # # Undef MIN and MAX to avoid collision in ASL source code -- 2.29.2.windows.2