Add the rule to handle the naming change of industry standard header files.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3068 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
qhuang8 2007-07-05 07:05:21 +00:00
parent b6fc09bf79
commit 8a7f0c4c6b
1 changed files with 26 additions and 5 deletions

View File

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