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.6064.1604888758445912459 for ; Sun, 08 Nov 2020 18:25:58 -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: aN0+T2akcgDo/Y3V1FI+GYAshHmfER9nbX/TabclCTtHCuYJivEBgUh/bTvvDVnLjkTiHTUqFn w169BjieAydA== X-IronPort-AV: E=McAfee;i="6000,8403,9799"; a="187685226" X-IronPort-AV: E=Sophos;i="5.77,462,1596524400"; d="scan'208";a="187685226" 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:25:57 -0800 IronPort-SDR: FSPK9tEJGIM387crXZrYIQvY2mMr4ChxY9OWI6tLIq9xhTiSXZjO66WOpQUfhyVAQXjzVZjTwI W7P9TTrGhuoQ== X-IronPort-AV: E=Sophos;i="5.77,462,1596524400"; d="scan'208";a="540648114" 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:25:55 -0800 From: "Mingyue Liang" To: devel@edk2.groups.io Cc: Bob Feng , Liming Gao , Yuwei Chen Subject: [PATCH.V2] BaseTools: Incremental build issue for included ASI file's deletion. Date: Mon, 9 Nov 2020 10:25:50 +0800 Message-Id: <20201109022550.1752-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. V2: Add BZ link. 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.29.2.windows.2