Add the rule to handle the naming change of industry standard header files.
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 5 Jul 2007 07:05:21 +0000 (07:05 +0000)
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 5 Jul 2007 07:05:21 +0000 (07:05 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3068 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Java/Source/MigrationTools/org/tianocore/migration/ModuleReader.java

index d65d72f..c72399e 100644 (file)
@@ -361,11 +361,32 @@ public final class ModuleReader implements Common.ForDoAll {
                                                                .group(1))) {\r
                                        templine = mtrinclude.group();\r
                                } else {\r
-                                       templine = MigrationTool.MIGRATIONCOMMENT\r
-                                                       + mtrinclude.group();\r
-                               }\r
-                               mtrinclude.appendReplacement(wholebuffer, templine);\r
-                       }\r
+                    String line = mtrinclude.group().toLowerCase();\r
+                    if (line.contains("pal.h")) {\r
+                        templine = "#include <IndustryStandard/Pal.h>\n";\r
+                    } else if (line.contains("sal.h")) {\r
+                        templine = "#include <IndustryStandard/Sal.h>\n";\r
+                    } else if (line.contains("pci22.h")) {\r
+                        templine = "#include <IndustryStandard/Pci22.h>\n";\r
+                    } else if (line.contains("pci23.h")) {\r
+                        templine = "#include <IndustryStandard/Pci23.h>\n";\r
+                    } else if (line.contains("pci30.h")) {\r
+                        templine = "#include <IndustryStandard/Pci30.h>\n";\r
+                    } else if (line.contains("pci.h")) {\r
+                        templine = "#include <IndustryStandard/Pci.h>\n";\r
+                    } else if (line.contains("acpi.h")) {\r
+                        templine = "#include <IndustryStandard/Acpi.h>\n";\r
+                    } else if (line.contains("scsi.h")) {\r
+                        templine = "#include <IndustryStandard/Scsi.h>\n";\r
+                    } else if (line.contains("usb.h")) {\r
+                        templine = "#include <IndustryStandard/Usb.h>\n";\r
+                    } else {\r
+                        templine = MigrationTool.MIGRATIONCOMMENT\r
+                                + mtrinclude.group();\r
+                    }\r
+                }\r
+                mtrinclude.appendReplacement(wholebuffer, templine);\r
+            }\r
                        mtrinclude.appendTail(wholebuffer);\r
                        return wholebuffer.toString();\r
                }\r