public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH 1/1] BaseTools: Incremental build issue for included ASI file's deletion.
@ 2020-11-06  5:55 Mingyue Liang
  2020-11-06 11:18 ` Bob Feng
  0 siblings, 1 reply; 3+ messages in thread
From: Mingyue Liang @ 2020-11-06  5:55 UTC (permalink / raw)
  To: devel; +Cc: Bob Feng, Liming Gao, Yuwei Chen

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 <mingyuex.liang@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
---
 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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] BaseTools: Incremental build issue for included ASI file's deletion.
  2020-11-06  5:55 [PATCH 1/1] BaseTools: Incremental build issue for included ASI file's deletion Mingyue Liang
@ 2020-11-06 11:18 ` Bob Feng
  2020-11-09  2:28   ` Mingyue Liang
  0 siblings, 1 reply; 3+ messages in thread
From: Bob Feng @ 2020-11-06 11:18 UTC (permalink / raw)
  To: Liang, MingyueX, devel@edk2.groups.io; +Cc: Liming Gao, Chen, Christine

Please add this BZ to the patch commit message.
https://bugzilla.tianocore.org/show_bug.cgi?id=2972

Thanks,
Bob

-----Original Message-----
From: Mingyue Liang <mingyuex.liang@intel.com> 
Sent: Friday, November 6, 2020 1:55 PM
To: devel@edk2.groups.io
Cc: Feng, Bob C <bob.c.feng@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>; Chen, Christine <yuwei.chen@intel.com>
Subject: [PATCH 1/1] BaseTools: Incremental build issue for included ASI file's deletion.

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 <mingyuex.liang@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
---
 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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] BaseTools: Incremental build issue for included ASI file's deletion.
  2020-11-06 11:18 ` Bob Feng
@ 2020-11-09  2:28   ` Mingyue Liang
  0 siblings, 0 replies; 3+ messages in thread
From: Mingyue Liang @ 2020-11-09  2:28 UTC (permalink / raw)
  To: Feng, Bob C, devel@edk2.groups.io; +Cc: Liming Gao, Chen, Christine

V2 version updated.
Patch link in https://edk2.groups.io/g/devel/message/67133

Thanks,
MIngyue

-----Original Message-----
From: Feng, Bob C <bob.c.feng@intel.com> 
Sent: Friday, November 6, 2020 7:19 PM
To: Liang, MingyueX <mingyuex.liang@intel.com>; devel@edk2.groups.io
Cc: Liming Gao <gaoliming@byosoft.com.cn>; Chen, Christine <yuwei.chen@intel.com>
Subject: RE: [PATCH 1/1] BaseTools: Incremental build issue for included ASI file's deletion.

Please add this BZ to the patch commit message.
https://bugzilla.tianocore.org/show_bug.cgi?id=2972

Thanks,
Bob

-----Original Message-----
From: Mingyue Liang <mingyuex.liang@intel.com> 
Sent: Friday, November 6, 2020 1:55 PM
To: devel@edk2.groups.io
Cc: Feng, Bob C <bob.c.feng@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>; Chen, Christine <yuwei.chen@intel.com>
Subject: [PATCH 1/1] BaseTools: Incremental build issue for included ASI file's deletion.

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 <mingyuex.liang@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
---
 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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-11-09  2:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-06  5:55 [PATCH 1/1] BaseTools: Incremental build issue for included ASI file's deletion Mingyue Liang
2020-11-06 11:18 ` Bob Feng
2020-11-09  2:28   ` Mingyue Liang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox