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:
jwang36 2006-07-24 08:02:37 +00:00
parent ed1665f268
commit 52cbbdbc16
4 changed files with 21 additions and 27 deletions

View File

@ -195,16 +195,10 @@ public class MakeDeps extends Task {
/// Remove any duplicated path separator or inconsistent path separator
///
private String cleanupPathName(String path) {
try {
path = (new File(path)).getCanonicalPath();
} catch (IOException e) {
String separator = "\\" + File.separator;
String duplicateSeparator = separator + "{2}";
path = Path.translateFile(path);
path = path.replaceAll(duplicateSeparator, separator);
return path;
}
String separator = "\\" + File.separator;
String duplicateSeparator = separator + "{2}";
path = Path.translateFile(path);
path = path.replaceAll(duplicateSeparator, separator);
return path;
}

View File

@ -248,7 +248,7 @@ public class FfsProcess {
outofdateEle.appendChild(sourceEle);
Element targetEle = document.createElement("targetfiles");
Element fileEle = document.createElement("file");
fileEle.setAttribute("name", "${BIN_DIR}\\" + targetFilename);
fileEle.setAttribute("name", "${BIN_DIR}" + File.separatorChar + targetFilename);
targetEle.appendChild(fileEle);
outofdateEle.appendChild(targetEle);
Element sequentialEle = document.createElement("sequential");

View File

@ -242,7 +242,7 @@ public class GenBuildTask extends Ant {
//
if ((moduleId.isLibrary() == false && GlobalData.hasFpdModuleSA(fpdModuleId) == false)
|| GlobalData.isModuleBuilt(fpdModuleId)) {
continue;
return;
}
else {
GlobalData.registerBuiltModule(fpdModuleId);

View File

@ -47,10 +47,10 @@ typedef struct _STRING_LIST {
//
// Define the relative paths used by the special #include macros
//
#define PROTOCOL_DIR_PATH "Protocol\\"
#define GUID_DIR_PATH "Guid\\"
#define ARCH_PROTOCOL_DIR_PATH "ArchProtocol\\"
#define PPI_PROTOCOL_DIR_PATH "Ppi\\"
#define PROTOCOL_DIR_PATH "Protocol/"
#define GUID_DIR_PATH "Guid/"
#define ARCH_PROTOCOL_DIR_PATH "ArchProtocol/"
#define PPI_PROTOCOL_DIR_PATH "Ppi/"
//
// Use this structure to keep track of all the special #include forms
@ -240,7 +240,7 @@ Returns:
// Find the .extension
//
for (Cptr = TargetFileName + strlen (TargetFileName) - 1;
(*Cptr != '\\') && (Cptr > TargetFileName) && (*Cptr != '.');
(*Cptr != '\\' && *Cptr != '/') && (Cptr > TargetFileName) && (*Cptr != '.');
Cptr--
)
;
@ -362,7 +362,7 @@ Returns:
strcpy (SumDepsFile, mGlobals.SumDepsPath);
strcat (SumDepsFile, FileName);
for (Cptr = SumDepsFile + strlen (SumDepsFile) - 1;
(*Cptr != '\\') && (Cptr > SumDepsFile) && (*Cptr != '.');
(*Cptr != '\\' && *Cptr != '/') && (Cptr > SumDepsFile) && (*Cptr != '.');
Cptr--
)
;
@ -550,7 +550,7 @@ Returns:
//
strcpy (MacroIncludeFileName, mMacroConversion[Index].PathName);
strcat (MacroIncludeFileName, Cptr);
strcat (MacroIncludeFileName, "\\");
strcat (MacroIncludeFileName, "/");
strcat (MacroIncludeFileName, Cptr);
strcat (MacroIncludeFileName, ".h");
//
@ -867,8 +867,8 @@ ProcessArgs (
}
strcpy (NewList->Str, Argv[1]);
if (NewList->Str[strlen (NewList->Str) - 1] != '\\') {
strcat (NewList->Str, "\\");
if (NewList->Str[strlen (NewList->Str) - 1] != '\\' && NewList->Str[strlen (NewList->Str) - 1] != '/') {
strcat (NewList->Str, "/");
}
//
// 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.
//
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) {
strcpy (NewList->Str, ".\\");
strcpy (NewList->Str, "./");
} else {
NewList->Str[Index + 1] = 0;
}
@ -1001,8 +1001,8 @@ ProcessArgs (
}
strcpy (NewList->Str, Argv[1]);
if (NewList->Str[strlen (NewList->Str) - 1] != '\\') {
strcat (NewList->Str, "\\");
if (NewList->Str[strlen (NewList->Str) - 1] != '\\' && NewList->Str[strlen (NewList->Str) - 1] != '/') {
strcat (NewList->Str, "/");
}
NewList->Next = mGlobals.SubDirs;
@ -1100,8 +1100,8 @@ ProcessArgs (
//
// Add slash on end if not there
//
if (mGlobals.SumDepsPath[strlen (mGlobals.SumDepsPath) - 1] != '\\') {
strcat (mGlobals.SumDepsPath, "\\");
if (mGlobals.SumDepsPath[strlen (mGlobals.SumDepsPath) - 1] != '\\' && mGlobals.SumDepsPath[strlen (mGlobals.SumDepsPath) - 1] != '/') {
strcat (mGlobals.SumDepsPath, "/");
}
} else {
Error (NULL, 0, 0, Argv[0], "option requires path to summary dependency files");