BaseTools: add '-p' for Linux 'cp' command.
Currently BaseTools use 'cp' command for PcdValueInit and GenMake process, as the command can not keep the time info of the source file, which will cause incremental build issue in Linux system, thus the '-p' need be added to keep the source file's attributes in copy process. This patch fixes this issue. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Signed-off-by: Yuwei Chen <yuwei.chen@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
This commit is contained in:
committed by
mergify[bot]
parent
07c8e5e59b
commit
176016387f
@ -2932,7 +2932,7 @@ class DscBuildData(PlatformBuildClassObject):
|
||||
MakeApp = MakeApp + PcdMakefileEnd
|
||||
MakeApp = MakeApp + AppTarget % ("""\tcopy $(APPLICATION) $(APPFILE) /y """)
|
||||
else:
|
||||
MakeApp = MakeApp + AppTarget % ("""\tcp $(APPLICATION) $(APPFILE) """)
|
||||
MakeApp = MakeApp + AppTarget % ("""\tcp -p $(APPLICATION) $(APPFILE) """)
|
||||
MakeApp = MakeApp + '\n'
|
||||
IncludeFileFullPaths = []
|
||||
for includefile in IncludeFiles:
|
||||
@ -2955,7 +2955,7 @@ class DscBuildData(PlatformBuildClassObject):
|
||||
else:
|
||||
PcdValueCommonPath = os.path.normpath(mws.join(GlobalData.gGlobalDefines["EDK_TOOLS_PATH"], "Source/C/Common/PcdValueCommon.c"))
|
||||
MakeApp = MakeApp + '%s/PcdValueCommon.c : %s\n' % (self.OutputPath, PcdValueCommonPath)
|
||||
MakeApp = MakeApp + '\tcp -f %s %s/PcdValueCommon.c\n' % (PcdValueCommonPath, self.OutputPath)
|
||||
MakeApp = MakeApp + '\tcp -p -f %s %s/PcdValueCommon.c\n' % (PcdValueCommonPath, self.OutputPath)
|
||||
MakeFileName = os.path.join(self.OutputPath, 'Makefile')
|
||||
MakeApp += "$(OBJECTS) : %s\n" % MakeFileName
|
||||
SaveFileOnChange(MakeFileName, MakeApp, False)
|
||||
|
Reference in New Issue
Block a user