From 52cbbdbc1680859f5303150d0699a1ebfaa485a4 Mon Sep 17 00:00:00 2001 From: jwang36 Date: Mon, 24 Jul 2006 08:02:37 +0000 Subject: [PATCH] Fixed EDKT118 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1079 6f19259b-4bc3-4df7-8a09-765794883524 --- .../tianocore/framework/tasks/MakeDeps.java | 14 +++------ .../org/tianocore/build/FfsProcess.java | 2 +- .../org/tianocore/build/GenBuildTask.java | 2 +- Tools/Source/TianoTools/MakeDeps/MakeDeps.c | 30 +++++++++---------- 4 files changed, 21 insertions(+), 27 deletions(-) diff --git a/Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/MakeDeps.java b/Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/MakeDeps.java index 7797b7adfd..446bf0d012 100644 --- a/Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/MakeDeps.java +++ b/Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/MakeDeps.java @@ -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; } diff --git a/Tools/Source/GenBuild/org/tianocore/build/FfsProcess.java b/Tools/Source/GenBuild/org/tianocore/build/FfsProcess.java index 641234e1e9..9371c7e6d5 100644 --- a/Tools/Source/GenBuild/org/tianocore/build/FfsProcess.java +++ b/Tools/Source/GenBuild/org/tianocore/build/FfsProcess.java @@ -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"); diff --git a/Tools/Source/GenBuild/org/tianocore/build/GenBuildTask.java b/Tools/Source/GenBuild/org/tianocore/build/GenBuildTask.java index 1f020b3cc1..e968fce041 100644 --- a/Tools/Source/GenBuild/org/tianocore/build/GenBuildTask.java +++ b/Tools/Source/GenBuild/org/tianocore/build/GenBuildTask.java @@ -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); diff --git a/Tools/Source/TianoTools/MakeDeps/MakeDeps.c b/Tools/Source/TianoTools/MakeDeps/MakeDeps.c index de1afea62f..e4206251e6 100755 --- a/Tools/Source/TianoTools/MakeDeps/MakeDeps.c +++ b/Tools/Source/TianoTools/MakeDeps/MakeDeps.c @@ -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");