From 8a7f0c4c6b814fe50a18ed0c96e3d871e98bd224 Mon Sep 17 00:00:00 2001 From: qhuang8 Date: Thu, 5 Jul 2007 07:05:21 +0000 Subject: 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 --- .../org/tianocore/migration/ModuleReader.java | 31 ++++++++++++++++++---- 1 file changed, 26 insertions(+), 5 deletions(-) (limited to 'Tools') diff --git a/Tools/Java/Source/MigrationTools/org/tianocore/migration/ModuleReader.java b/Tools/Java/Source/MigrationTools/org/tianocore/migration/ModuleReader.java index d65d72fa44..c72399ea2c 100644 --- a/Tools/Java/Source/MigrationTools/org/tianocore/migration/ModuleReader.java +++ b/Tools/Java/Source/MigrationTools/org/tianocore/migration/ModuleReader.java @@ -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 \n"; + } else if (line.contains("sal.h")) { + templine = "#include \n"; + } else if (line.contains("pci22.h")) { + templine = "#include \n"; + } else if (line.contains("pci23.h")) { + templine = "#include \n"; + } else if (line.contains("pci30.h")) { + templine = "#include \n"; + } else if (line.contains("pci.h")) { + templine = "#include \n"; + } else if (line.contains("acpi.h")) { + templine = "#include \n"; + } else if (line.contains("scsi.h")) { + templine = "#include \n"; + } else if (line.contains("usb.h")) { + templine = "#include \n"; + } else { + templine = MigrationTool.MIGRATIONCOMMENT + + mtrinclude.group(); + } + } + mtrinclude.appendReplacement(wholebuffer, templine); + } mtrinclude.appendTail(wholebuffer); return wholebuffer.toString(); } -- cgit v1.2.3