Description:
fix for -o option for fpc-2.0.0 git-svn-id: http://theory.cpe.ku.ac.th/grader/judge/trunk/scripts@226 6386c4cd-e34a-4fa8-8920-d93eb39b512e
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r54:a67009b340d8 - - 1 file changed: 2 inserted, 1 deleted

@@ -67,40 +67,41
67 fi
67 fi
68 talk " message file: $MESSAGE_FILE"
68 talk " message file: $MESSAGE_FILE"
69
69
70 # Remove any remaining output files or message files.
70 # Remove any remaining output files or message files.
71 rm -Rf $OUTPUT_FILE
71 rm -Rf $OUTPUT_FILE
72 rm -Rf $MESSAGE_FILE
72 rm -Rf $MESSAGE_FILE
73
73
74 # Check if the source file exists before attempt compiling.
74 # Check if the source file exists before attempt compiling.
75 if [ ! -f $SOURCE_FILE ]
75 if [ ! -f $SOURCE_FILE ]
76 then
76 then
77 talk "ERROR: The source file does not exist!"
77 talk "ERROR: The source file does not exist!"
78 echo "ERROR: The source file did not exist." > $MESSAGE_FILE
78 echo "ERROR: The source file did not exist." > $MESSAGE_FILE
79 exit 127
79 exit 127
80 fi
80 fi
81
81
82 # Compile.
82 # Compile.
83 if [ $PROG_LANG = "c" ]
83 if [ $PROG_LANG = "c" ]
84 then
84 then
85 $C_COMPILER $SOURCE_FILE -o $OUTPUT_FILE $C_OPTIONS 2>$MESSAGE_FILE
85 $C_COMPILER $SOURCE_FILE -o $OUTPUT_FILE $C_OPTIONS 2>$MESSAGE_FILE
86 elif [ $PROG_LANG = "c++" ]
86 elif [ $PROG_LANG = "c++" ]
87 then
87 then
88 $CPLUSPLUS_COMPILER $SOURCE_FILE -o $OUTPUT_FILE $CPLUSPLUS_OPTIONS 2>$MESSAGE_FILE
88 $CPLUSPLUS_COMPILER $SOURCE_FILE -o $OUTPUT_FILE $CPLUSPLUS_OPTIONS 2>$MESSAGE_FILE
89 elif [ $PROG_LANG = "pas" ]
89 elif [ $PROG_LANG = "pas" ]
90 then
90 then
91 - $PASCAL_COMPILER $SOURCE_FILE -o$OUTPUT_FILE $PASCAL_OPTIONS >$MESSAGE_FILE
91 + $PASCAL_COMPILER $SOURCE_FILE -ooutpas $PASCAL_OPTIONS >$MESSAGE_FILE
92 + mv outpas $OUTPUT_FILE
92 else
93 else
93 talk "ERROR: Invalid language specified!"
94 talk "ERROR: Invalid language specified!"
94 echo "ERROR: Invalid language specified!" > $MESSAGE_FILE
95 echo "ERROR: Invalid language specified!" > $MESSAGE_FILE
95 exit 127
96 exit 127
96 fi
97 fi
97
98
98 # Report success or failure.
99 # Report success or failure.
99 if [ -f $OUTPUT_FILE ]
100 if [ -f $OUTPUT_FILE ]
100 then
101 then
101 talk "Compilation was successful!"
102 talk "Compilation was successful!"
102 else
103 else
103 talk "ERROR: Something was wrong during the compilation!"
104 talk "ERROR: Something was wrong during the compilation!"
104 talk "Dumping compiler message:"
105 talk "Dumping compiler message:"
105 #cat $MESSAGE_FILE
106 #cat $MESSAGE_FILE
106 fi
107 fi
You need to be logged in to leave comments. Login now