]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Source/TianoTools/MakeDeps/MakeDeps.c
Fixed EDKT118
[mirror_edk2.git] / Tools / Source / TianoTools / MakeDeps / MakeDeps.c
index 1a090b3bedb886cc0d5998c77f20db21c6e7c905..e4206251e6b10ecc631e2ede080c0342e9cd772a 100755 (executable)
@@ -25,10 +25,10 @@ Abstract:
 #include <stdlib.h>\r
 #include <ctype.h>\r
 \r
-#include <Base.h>\r
-#include <UEfiBaseTypes.h>\r
+#include <Common/UefiBaseTypes.h>\r
+\r
 #include "EfiUtilityMsgs.h"\r
-#include <CommonLib.h>\r
+#include "CommonLib.h"\r
 \r
 //\r
 // Structure to maintain a linked list of strings\r
@@ -47,10 +47,10 @@ typedef struct _STRING_LIST {
 //\r
 // Define the relative paths used by the special #include macros\r
 //\r
-#define PROTOCOL_DIR_PATH       "Protocol\\"\r
-#define GUID_DIR_PATH           "Guid\\"\r
-#define ARCH_PROTOCOL_DIR_PATH  "ArchProtocol\\"\r
-#define PPI_PROTOCOL_DIR_PATH   "Ppi\\"\r
+#define PROTOCOL_DIR_PATH       "Protocol/"\r
+#define GUID_DIR_PATH           "Guid/"\r
+#define ARCH_PROTOCOL_DIR_PATH  "ArchProtocol/"\r
+#define PPI_PROTOCOL_DIR_PATH   "Ppi/"\r
 \r
 //\r
 // Use this structure to keep track of all the special #include forms\r
@@ -240,7 +240,7 @@ Returns:
       // Find the .extension\r
       //\r
       for (Cptr = TargetFileName + strlen (TargetFileName) - 1;\r
-           (*Cptr != '\\') && (Cptr > TargetFileName) && (*Cptr != '.');\r
+           (*Cptr != '\\' && *Cptr != '/') && (Cptr > TargetFileName) && (*Cptr != '.');\r
            Cptr--\r
           )\r
         ;\r
@@ -362,7 +362,7 @@ Returns:
     strcpy (SumDepsFile, mGlobals.SumDepsPath);\r
     strcat (SumDepsFile, FileName);\r
     for (Cptr = SumDepsFile + strlen (SumDepsFile) - 1;\r
-         (*Cptr != '\\') && (Cptr > SumDepsFile) && (*Cptr != '.');\r
+         (*Cptr != '\\' && *Cptr != '/') && (Cptr > SumDepsFile) && (*Cptr != '.');\r
          Cptr--\r
         )\r
       ;\r
@@ -550,7 +550,7 @@ Returns:
                 //\r
                 strcpy (MacroIncludeFileName, mMacroConversion[Index].PathName);\r
                 strcat (MacroIncludeFileName, Cptr);\r
-                strcat (MacroIncludeFileName, "\\");\r
+                strcat (MacroIncludeFileName, "/");\r
                 strcat (MacroIncludeFileName, Cptr);\r
                 strcat (MacroIncludeFileName, ".h");\r
                 //\r
@@ -867,8 +867,8 @@ ProcessArgs (
         }\r
 \r
         strcpy (NewList->Str, Argv[1]);\r
-        if (NewList->Str[strlen (NewList->Str) - 1] != '\\') {\r
-          strcat (NewList->Str, "\\");\r
+        if (NewList->Str[strlen (NewList->Str) - 1] != '\\' && NewList->Str[strlen (NewList->Str) - 1] != '/') {\r
+          strcat (NewList->Str, "/");\r
         }\r
         //\r
         // Add it to the end of the our list of include paths\r
@@ -953,10 +953,10 @@ ProcessArgs (
       //\r
       // Back up in the source file name to the last backslash and terminate after it.\r
       //\r
-      for (Index = strlen (NewList->Str) - 1; (Index > 0) && (NewList->Str[Index] != '\\'); Index--)\r
+      for (Index = strlen (NewList->Str) - 1; (Index > 0) && (NewList->Str[Index] != '\\' && NewList->Str[Index] != '/'); Index--)\r
         ;\r
       if (Index < 0) {\r
-        strcpy (NewList->Str, ".\\");\r
+        strcpy (NewList->Str, "./");\r
       } else {\r
         NewList->Str[Index + 1] = 0;\r
       }\r
@@ -1001,8 +1001,8 @@ ProcessArgs (
         }\r
 \r
         strcpy (NewList->Str, Argv[1]);\r
-        if (NewList->Str[strlen (NewList->Str) - 1] != '\\') {\r
-          strcat (NewList->Str, "\\");\r
+        if (NewList->Str[strlen (NewList->Str) - 1] != '\\' && NewList->Str[strlen (NewList->Str) - 1] != '/') {\r
+          strcat (NewList->Str, "/");\r
         }\r
 \r
         NewList->Next     = mGlobals.SubDirs;\r
@@ -1100,8 +1100,8 @@ ProcessArgs (
         //\r
         // Add slash on end if not there\r
         //\r
-        if (mGlobals.SumDepsPath[strlen (mGlobals.SumDepsPath) - 1] != '\\') {\r
-          strcat (mGlobals.SumDepsPath, "\\");\r
+        if (mGlobals.SumDepsPath[strlen (mGlobals.SumDepsPath) - 1] != '\\' && mGlobals.SumDepsPath[strlen (mGlobals.SumDepsPath) - 1] != '/') {\r
+          strcat (mGlobals.SumDepsPath, "/");\r
         }\r
       } else {\r
         Error (NULL, 0, 0, Argv[0], "option requires path to summary dependency files");\r