From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web08.7932.1604642146368520826 for ; Thu, 05 Nov 2020 21:55:46 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.43, mailfrom: mingyuex.liang@intel.com) IronPort-SDR: RTdqG5C7CQZ0+gaDVyJbFflXzssQggBbKQyMmcXw4O/h3cRljXc/NtlH69gMduqA+3SMQuzgHv 6HOh+RXaECzQ== X-IronPort-AV: E=McAfee;i="6000,8403,9796"; a="254212290" X-IronPort-AV: E=Sophos;i="5.77,455,1596524400"; d="scan'208";a="254212290" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Nov 2020 21:55:42 -0800 IronPort-SDR: y4ygan50xcWpEsPC2mdRYYHY/aVSbwbGCU10oDXejW7nZbgR/1UtbgN/ABXiibBsGti1QQNmkb OPPgmVtI6yvA== X-IronPort-AV: E=Sophos;i="5.77,455,1596524400"; d="scan'208";a="539711003" Received: from bob-desktop.ccr.corp.intel.com ([10.239.49.38]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Nov 2020 21:55:31 -0800 From: "Mingyue Liang" To: devel@edk2.groups.io Cc: Bob Feng , Liming Gao , Yuwei Chen Subject: [PATCH 1/1] BaseTools: Incremental build issue for included ASI file's deletion. Date: Fri, 6 Nov 2020 13:55:27 +0800 Message-Id: <20201106055527.722-1-mingyuex.liang@intel.com> X-Mailer: git-send-email 2.28.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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, the DEPs file is deleted. Signed-off-by: Mingyue Liang Cc: Bob Feng Cc: Liming Gao Cc: Yuwei Chen --- 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.28.0.windows.1