summaryrefslogtreecommitdiff
path: root/Tools/CCode/Source/VfrCompile/VfrCompile.g
diff options
context:
space:
mode:
authorqouyang <qouyang@6f19259b-4bc3-4df7-8a09-765794883524>2006-11-16 10:19:07 +0000
committerqouyang <qouyang@6f19259b-4bc3-4df7-8a09-765794883524>2006-11-16 10:19:07 +0000
commitb609c89b77876ef144a2acdb31defbf1881437c2 (patch)
tree1b599437c85f1fd05392f36367d0b071d338dbfd /Tools/CCode/Source/VfrCompile/VfrCompile.g
parent888f61aa99e9dd6d680d51f73e5747afbfb78f80 (diff)
downloadedk2-platforms-b609c89b77876ef144a2acdb31defbf1881437c2.tar.xz
Fixed EDKT419.
Removing C Pre-Processing from VfrCompile Tool. Now the input file for VfrCompile tool should be *.i file which was preprocessed by compiler. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1964 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Tools/CCode/Source/VfrCompile/VfrCompile.g')
-rw-r--r--Tools/CCode/Source/VfrCompile/VfrCompile.g120
1 files changed, 60 insertions, 60 deletions
diff --git a/Tools/CCode/Source/VfrCompile/VfrCompile.g b/Tools/CCode/Source/VfrCompile/VfrCompile.g
index 44820bc31b..9fdd7caca6 100644
--- a/Tools/CCode/Source/VfrCompile/VfrCompile.g
+++ b/Tools/CCode/Source/VfrCompile/VfrCompile.g
@@ -172,69 +172,69 @@ Returns:
// on it.
//
fclose (VfrFptr);
- Len = strlen (PREPROCESSOR_OPTIONS) + strlen (gOptions.VfrFileName) + 10;
- if (gOptions.CPreprocessorOptions != NULL) {
- Len += strlen (gOptions.CPreprocessorOptions) + 1;
- }
- if (gOptions.IncludePaths != NULL) {
- Len += strlen (gOptions.IncludePaths) + 1;
- }
- Cmd = (char *)malloc (Len);
- if (Cmd == NULL) {
- Error (PROGRAM_NAME, 0, 0, NULL, "could not allocate memory");
- Cleanup();
- return STATUS_ERROR;
- }
- strcpy (Cmd, PREPROCESSOR_OPTIONS);
- if (gOptions.IncludePaths != NULL) {
- strcat (Cmd, gOptions.IncludePaths);
- strcat (Cmd, " ");
- }
- if (gOptions.CPreprocessorOptions != NULL) {
- strcat (Cmd, gOptions.CPreprocessorOptions);
- strcat (Cmd, " ");
- }
- strcat (Cmd, gOptions.VfrFileName);
-#ifndef __GNUC__
- Status = _spawnlp (_P_WAIT, PREPROCESSOR_COMMAND, Cmd, NULL);
-#else
- {
- char CommandLine[1000];
- char *p;
-
- //
- // Lean the slashes forward.
- //
- for (p = gOptions.PreprocessorOutputFileName; *p; p++) {
- if (*p=='\\') {
- *p=FILE_SEP_CHAR;
- }
- }
-
- //
- // Lean the slashes forward.
- //
- for (p = Cmd; *p; p++) {
- if (*p=='\\') {
- *p=FILE_SEP_CHAR;
- }
- }
-
- sprintf(CommandLine, "%s %s > %s", PREPROCESSOR_COMMAND, Cmd, gOptions.PreprocessorOutputFileName);
- Status = system (CommandLine);
- }
-#endif
- if (Status != 0) {
- Error (PROGRAM_NAME, 0, 0, gOptions.VfrFileName, "failed to spawn C preprocessor on VFR file");
- printf ("Command: '%s %s'\n", PREPROCESSOR_COMMAND, Cmd);
- Cleanup();
- return STATUS_ERROR;
- }
- free (Cmd);
+// Len = strlen (PREPROCESSOR_OPTIONS) + strlen (gOptions.VfrFileName) + 10;
+// if (gOptions.CPreprocessorOptions != NULL) {
+// Len += strlen (gOptions.CPreprocessorOptions) + 1;
+// }
+// if (gOptions.IncludePaths != NULL) {
+// Len += strlen (gOptions.IncludePaths) + 1;
+// }
+// Cmd = (char *)malloc (Len);
+// if (Cmd == NULL) {
+// Error (PROGRAM_NAME, 0, 0, NULL, "could not allocate memory");
+// Cleanup();
+// return STATUS_ERROR;
+// }
+// strcpy (Cmd, PREPROCESSOR_OPTIONS);
+// if (gOptions.IncludePaths != NULL) {
+// strcat (Cmd, gOptions.IncludePaths);
+// strcat (Cmd, " ");
+// }
+// if (gOptions.CPreprocessorOptions != NULL) {
+// strcat (Cmd, gOptions.CPreprocessorOptions);
+// strcat (Cmd, " ");
+// }
+// strcat (Cmd, gOptions.VfrFileName);
+//#ifndef __GNUC__
+// Status = _spawnlp (_P_WAIT, PREPROCESSOR_COMMAND, Cmd, NULL);
+//#else
+// {
+// char CommandLine[1000];
+// char *p;
+//
+// //
+// // Lean the slashes forward.
+// //
+// for (p = gOptions.PreprocessorOutputFileName; *p; p++) {
+// if (*p=='\\') {
+// *p=FILE_SEP_CHAR;
+// }
+// }
+//
+// //
+// // Lean the slashes forward.
+// //
+// for (p = Cmd; *p; p++) {
+// if (*p=='\\') {
+// *p=FILE_SEP_CHAR;
+// }
+// }
+//
+// sprintf(CommandLine, "%s %s > %s", PREPROCESSOR_COMMAND, Cmd, gOptions.PreprocessorOutputFileName);
+// Status = system (CommandLine);
+// }
+//#endif
+// if (Status != 0) {
+// Error (PROGRAM_NAME, 0, 0, gOptions.VfrFileName, "failed to spawn C preprocessor on VFR file");
+// printf ("Command: '%s %s'\n", PREPROCESSOR_COMMAND, Cmd);
+// Cleanup();
+// return STATUS_ERROR;
+// }
+// free (Cmd);
//
// Open the preprocessor output file
//
- if ((VfrFptr = fopen (gOptions.PreprocessorOutputFileName, "r")) == NULL) {
+ if ((VfrFptr = fopen (gOptions.VfrFileName, "r")) == NULL) {
Error (PROGRAM_NAME, 0, 0, "failed to open input VFR preprocessor output file",
gOptions.PreprocessorOutputFileName);
Cleanup();