X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=Tools%2FSource%2FTianoTools%2FMakeDeps%2FMakeDeps.c;h=e4206251e6b10ecc631e2ede080c0342e9cd772a;hp=a459348079c600231b2551aa63d26eb54b95b787;hb=52cbbdbc1680859f5303150d0699a1ebfaa485a4;hpb=b09da165c00a17a435da6d41aef8ca24e84025e4 diff --git a/Tools/Source/TianoTools/MakeDeps/MakeDeps.c b/Tools/Source/TianoTools/MakeDeps/MakeDeps.c index a459348079..e4206251e6 100755 --- a/Tools/Source/TianoTools/MakeDeps/MakeDeps.c +++ b/Tools/Source/TianoTools/MakeDeps/MakeDeps.c @@ -25,9 +25,10 @@ Abstract: #include #include -#include -#include +#include + #include "EfiUtilityMsgs.h" +#include "CommonLib.h" // // Structure to maintain a linked list of strings @@ -46,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 @@ -239,7 +240,7 @@ Returns: // Find the .extension // for (Cptr = TargetFileName + strlen (TargetFileName) - 1; - (*Cptr != '\\') && (Cptr > TargetFileName) && (*Cptr != '.'); + (*Cptr != '\\' && *Cptr != '/') && (Cptr > TargetFileName) && (*Cptr != '.'); Cptr-- ) ; @@ -361,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-- ) ; @@ -549,7 +550,7 @@ Returns: // strcpy (MacroIncludeFileName, mMacroConversion[Index].PathName); strcat (MacroIncludeFileName, Cptr); - strcat (MacroIncludeFileName, "\\"); + strcat (MacroIncludeFileName, "/"); strcat (MacroIncludeFileName, Cptr); strcat (MacroIncludeFileName, ".h"); // @@ -866,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 @@ -952,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; } @@ -1000,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; @@ -1099,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");