summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/Preprocessor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Slice/Preprocessor.cpp')
-rw-r--r--cpp/src/Slice/Preprocessor.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/cpp/src/Slice/Preprocessor.cpp b/cpp/src/Slice/Preprocessor.cpp
index 1a6b716fe55..01b8fb19aa4 100644
--- a/cpp/src/Slice/Preprocessor.cpp
+++ b/cpp/src/Slice/Preprocessor.cpp
@@ -230,6 +230,37 @@ Slice::Preprocessor::printMakefileDependencies(Language lang)
}
break;
}
+ case VisualBasic:
+ {
+ //
+ // Change .cpp suffix to .vb suffix.
+ //
+ char buf[1024];
+ while(fgets(buf, sizeof(buf), cppHandle) != NULL)
+ {
+ char* dot;
+ char* colon = strchr(buf, ':');
+ if(colon != NULL)
+ {
+ *colon = '\0';
+ dot = strrchr(buf, '.');
+ *colon = ':';
+ if(dot != NULL)
+ {
+ if(strncmp(dot, ".cpp:", 5) == 0)
+ {
+ *dot = '\0';
+ fputs(buf, stdout);
+ fputs(".vb", stdout);
+ fputs(colon, stdout);
+ continue;
+ }
+ }
+ }
+ fputs(buf, stdout);
+ }
+ break;
+ }
default:
{
abort();