mirror of https://github.com/acidanthera/audk.git
Fixed EDKT118
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1079 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
ed1665f268
commit
52cbbdbc16
|
@ -195,16 +195,10 @@ public class MakeDeps extends Task {
|
||||||
/// Remove any duplicated path separator or inconsistent path separator
|
/// Remove any duplicated path separator or inconsistent path separator
|
||||||
///
|
///
|
||||||
private String cleanupPathName(String path) {
|
private String cleanupPathName(String path) {
|
||||||
try {
|
String separator = "\\" + File.separator;
|
||||||
path = (new File(path)).getCanonicalPath();
|
String duplicateSeparator = separator + "{2}";
|
||||||
} catch (IOException e) {
|
path = Path.translateFile(path);
|
||||||
String separator = "\\" + File.separator;
|
path = path.replaceAll(duplicateSeparator, separator);
|
||||||
String duplicateSeparator = separator + "{2}";
|
|
||||||
path = Path.translateFile(path);
|
|
||||||
path = path.replaceAll(duplicateSeparator, separator);
|
|
||||||
return path;
|
|
||||||
}
|
|
||||||
|
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -248,7 +248,7 @@ public class FfsProcess {
|
||||||
outofdateEle.appendChild(sourceEle);
|
outofdateEle.appendChild(sourceEle);
|
||||||
Element targetEle = document.createElement("targetfiles");
|
Element targetEle = document.createElement("targetfiles");
|
||||||
Element fileEle = document.createElement("file");
|
Element fileEle = document.createElement("file");
|
||||||
fileEle.setAttribute("name", "${BIN_DIR}\\" + targetFilename);
|
fileEle.setAttribute("name", "${BIN_DIR}" + File.separatorChar + targetFilename);
|
||||||
targetEle.appendChild(fileEle);
|
targetEle.appendChild(fileEle);
|
||||||
outofdateEle.appendChild(targetEle);
|
outofdateEle.appendChild(targetEle);
|
||||||
Element sequentialEle = document.createElement("sequential");
|
Element sequentialEle = document.createElement("sequential");
|
||||||
|
|
|
@ -242,7 +242,7 @@ public class GenBuildTask extends Ant {
|
||||||
//
|
//
|
||||||
if ((moduleId.isLibrary() == false && GlobalData.hasFpdModuleSA(fpdModuleId) == false)
|
if ((moduleId.isLibrary() == false && GlobalData.hasFpdModuleSA(fpdModuleId) == false)
|
||||||
|| GlobalData.isModuleBuilt(fpdModuleId)) {
|
|| GlobalData.isModuleBuilt(fpdModuleId)) {
|
||||||
continue;
|
return;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
GlobalData.registerBuiltModule(fpdModuleId);
|
GlobalData.registerBuiltModule(fpdModuleId);
|
||||||
|
|
|
@ -47,10 +47,10 @@ typedef struct _STRING_LIST {
|
||||||
//
|
//
|
||||||
// Define the relative paths used by the special #include macros
|
// Define the relative paths used by the special #include macros
|
||||||
//
|
//
|
||||||
#define PROTOCOL_DIR_PATH "Protocol\\"
|
#define PROTOCOL_DIR_PATH "Protocol/"
|
||||||
#define GUID_DIR_PATH "Guid\\"
|
#define GUID_DIR_PATH "Guid/"
|
||||||
#define ARCH_PROTOCOL_DIR_PATH "ArchProtocol\\"
|
#define ARCH_PROTOCOL_DIR_PATH "ArchProtocol/"
|
||||||
#define PPI_PROTOCOL_DIR_PATH "Ppi\\"
|
#define PPI_PROTOCOL_DIR_PATH "Ppi/"
|
||||||
|
|
||||||
//
|
//
|
||||||
// Use this structure to keep track of all the special #include forms
|
// Use this structure to keep track of all the special #include forms
|
||||||
|
@ -240,7 +240,7 @@ Returns:
|
||||||
// Find the .extension
|
// Find the .extension
|
||||||
//
|
//
|
||||||
for (Cptr = TargetFileName + strlen (TargetFileName) - 1;
|
for (Cptr = TargetFileName + strlen (TargetFileName) - 1;
|
||||||
(*Cptr != '\\') && (Cptr > TargetFileName) && (*Cptr != '.');
|
(*Cptr != '\\' && *Cptr != '/') && (Cptr > TargetFileName) && (*Cptr != '.');
|
||||||
Cptr--
|
Cptr--
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
@ -362,7 +362,7 @@ Returns:
|
||||||
strcpy (SumDepsFile, mGlobals.SumDepsPath);
|
strcpy (SumDepsFile, mGlobals.SumDepsPath);
|
||||||
strcat (SumDepsFile, FileName);
|
strcat (SumDepsFile, FileName);
|
||||||
for (Cptr = SumDepsFile + strlen (SumDepsFile) - 1;
|
for (Cptr = SumDepsFile + strlen (SumDepsFile) - 1;
|
||||||
(*Cptr != '\\') && (Cptr > SumDepsFile) && (*Cptr != '.');
|
(*Cptr != '\\' && *Cptr != '/') && (Cptr > SumDepsFile) && (*Cptr != '.');
|
||||||
Cptr--
|
Cptr--
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
@ -550,7 +550,7 @@ Returns:
|
||||||
//
|
//
|
||||||
strcpy (MacroIncludeFileName, mMacroConversion[Index].PathName);
|
strcpy (MacroIncludeFileName, mMacroConversion[Index].PathName);
|
||||||
strcat (MacroIncludeFileName, Cptr);
|
strcat (MacroIncludeFileName, Cptr);
|
||||||
strcat (MacroIncludeFileName, "\\");
|
strcat (MacroIncludeFileName, "/");
|
||||||
strcat (MacroIncludeFileName, Cptr);
|
strcat (MacroIncludeFileName, Cptr);
|
||||||
strcat (MacroIncludeFileName, ".h");
|
strcat (MacroIncludeFileName, ".h");
|
||||||
//
|
//
|
||||||
|
@ -867,8 +867,8 @@ ProcessArgs (
|
||||||
}
|
}
|
||||||
|
|
||||||
strcpy (NewList->Str, Argv[1]);
|
strcpy (NewList->Str, Argv[1]);
|
||||||
if (NewList->Str[strlen (NewList->Str) - 1] != '\\') {
|
if (NewList->Str[strlen (NewList->Str) - 1] != '\\' && NewList->Str[strlen (NewList->Str) - 1] != '/') {
|
||||||
strcat (NewList->Str, "\\");
|
strcat (NewList->Str, "/");
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// Add it to the end of the our list of include paths
|
// Add it to the end of the our list of include paths
|
||||||
|
@ -953,10 +953,10 @@ ProcessArgs (
|
||||||
//
|
//
|
||||||
// Back up in the source file name to the last backslash and terminate after it.
|
// Back up in the source file name to the last backslash and terminate after it.
|
||||||
//
|
//
|
||||||
for (Index = strlen (NewList->Str) - 1; (Index > 0) && (NewList->Str[Index] != '\\'); Index--)
|
for (Index = strlen (NewList->Str) - 1; (Index > 0) && (NewList->Str[Index] != '\\' && NewList->Str[Index] != '/'); Index--)
|
||||||
;
|
;
|
||||||
if (Index < 0) {
|
if (Index < 0) {
|
||||||
strcpy (NewList->Str, ".\\");
|
strcpy (NewList->Str, "./");
|
||||||
} else {
|
} else {
|
||||||
NewList->Str[Index + 1] = 0;
|
NewList->Str[Index + 1] = 0;
|
||||||
}
|
}
|
||||||
|
@ -1001,8 +1001,8 @@ ProcessArgs (
|
||||||
}
|
}
|
||||||
|
|
||||||
strcpy (NewList->Str, Argv[1]);
|
strcpy (NewList->Str, Argv[1]);
|
||||||
if (NewList->Str[strlen (NewList->Str) - 1] != '\\') {
|
if (NewList->Str[strlen (NewList->Str) - 1] != '\\' && NewList->Str[strlen (NewList->Str) - 1] != '/') {
|
||||||
strcat (NewList->Str, "\\");
|
strcat (NewList->Str, "/");
|
||||||
}
|
}
|
||||||
|
|
||||||
NewList->Next = mGlobals.SubDirs;
|
NewList->Next = mGlobals.SubDirs;
|
||||||
|
@ -1100,8 +1100,8 @@ ProcessArgs (
|
||||||
//
|
//
|
||||||
// Add slash on end if not there
|
// Add slash on end if not there
|
||||||
//
|
//
|
||||||
if (mGlobals.SumDepsPath[strlen (mGlobals.SumDepsPath) - 1] != '\\') {
|
if (mGlobals.SumDepsPath[strlen (mGlobals.SumDepsPath) - 1] != '\\' && mGlobals.SumDepsPath[strlen (mGlobals.SumDepsPath) - 1] != '/') {
|
||||||
strcat (mGlobals.SumDepsPath, "\\");
|
strcat (mGlobals.SumDepsPath, "/");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Error (NULL, 0, 0, Argv[0], "option requires path to summary dependency files");
|
Error (NULL, 0, 0, Argv[0], "option requires path to summary dependency files");
|
||||||
|
|
Loading…
Reference in New Issue