diff options
Diffstat (limited to 'Tools/Source/MigrationTools')
-rw-r--r-- | Tools/Source/MigrationTools/org/tianocore/migration/ModuleInfo.java | 7 | ||||
-rw-r--r-- | Tools/Source/MigrationTools/org/tianocore/migration/ModuleReader.java | 6 |
2 files changed, 5 insertions, 8 deletions
diff --git a/Tools/Source/MigrationTools/org/tianocore/migration/ModuleInfo.java b/Tools/Source/MigrationTools/org/tianocore/migration/ModuleInfo.java index 49dde8b..fdc6aca 100644 --- a/Tools/Source/MigrationTools/org/tianocore/migration/ModuleInfo.java +++ b/Tools/Source/MigrationTools/org/tianocore/migration/ModuleInfo.java @@ -60,14 +60,11 @@ public final class ModuleInfo { public final Set<String> ppi = new HashSet<String>();
public final void enroll(String filepath) throws Exception {
- String[] temp;
if (filepath.contains(".c") || filepath.contains(".C") || filepath.contains(".h") ||
filepath.contains(".H") || filepath.contains(".dxs") || filepath.contains(".uni")) {
- temp = filepath.split("\\\\");
- localmodulesources.add(temp[temp.length - 1]);
+ localmodulesources.add(filepath.replace(modulepath + "\\", ""));
} else if (filepath.contains(".inf") || filepath.contains(".msa")) {
- temp = filepath.split("\\\\");
- msaorinf.add(temp[temp.length - 1]);
+ msaorinf.add(filepath.replace(modulepath + "\\", ""));
}
}
diff --git a/Tools/Source/MigrationTools/org/tianocore/migration/ModuleReader.java b/Tools/Source/MigrationTools/org/tianocore/migration/ModuleReader.java index 2dcd6d2..d55cf6e 100644 --- a/Tools/Source/MigrationTools/org/tianocore/migration/ModuleReader.java +++ b/Tools/Source/MigrationTools/org/tianocore/migration/ModuleReader.java @@ -27,9 +27,9 @@ public final class ModuleReader { public static final void ModuleScan(ModuleInfo m) throws Exception {
mi = m;
-
+
Common.toDoAll(mi.modulepath, ModuleInfo.class.getMethod("enroll", String.class), mi, null, Common.FILE);
-
+
String filename = null;
if (mi.msaorinf.isEmpty()) {
ModuleInfo.ui.println("No INF nor MSA file found!");
@@ -42,7 +42,7 @@ public final class ModuleReader { } else if (filename.contains(".msa")) {
readMsa(filename);
}
-
+
CommentOutNonLocalHFile();
parsePreProcessedSourceCode();
|