Description:
[grader] fix cmdline error
git-svn-id: http://theory.cpe.ku.ac.th/grader/judge/trunk/scripts@184 6386c4cd-e34a-4fa8-8920-d93eb39b512e
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r48:9aeaed99df74 - - 1 file changed: 7 inserted, 7 deleted
@@ -20,9 +20,9 | |||
|
20 | 20 | export CPLUSPLUS_COMPILER=/usr/bin/g++ |
|
21 | 21 | export PASCAL_COMPILER=/usr/bin/gpc |
|
22 | 22 | |
|
23 | - export C_OPTIONS="-O2 -Wall" | |
|
24 | - export CPLUSPLUS_OPTIONS="-O2 -Wall" | |
|
25 | - export PASCAL_OPTIONS="-O2 -Wall" | |
|
23 | + export C_OPTIONS="-O2 -s -static -lm -Wall" | |
|
24 | + export CPLUSPLUS_OPTIONS="-O2 -s -static -lm -Wall" | |
|
25 | + export PASCAL_OPTIONS="-O2 -XS -lm -Wall" | |
|
26 | 26 | |
|
27 | 27 | # Check for the correct number of arguments. Otherwise, print usage. |
|
28 | 28 | if [ $# -eq 0 -o $# -gt 4 ] |
@@ -82,13 +82,13 | |||
|
82 | 82 | # Compile. |
|
83 | 83 | if [ $PROG_LANG = "c" ] |
|
84 | 84 | then |
|
85 |
- $C_COMPILER $ |
|
|
85 | + $C_COMPILER $SOURCE_FILE -o $OUTPUT_FILE $C_OPTIONS 2>$MESSAGE_FILE | |
|
86 | 86 | elif [ $PROG_LANG = "c++" ] |
|
87 | 87 | then |
|
88 |
- $CPLUSPLUS_COMPILER $ |
|
|
88 | + $CPLUSPLUS_COMPILER $SOURCE_FILE -o $OUTPUT_FILE $CPLUSPLUS_OPTIONS 2>$MESSAGE_FILE | |
|
89 | 89 | elif [ $PROG_LANG = "pascal" ] |
|
90 | 90 | then |
|
91 |
- $PASCAL_COMPILER $ |
|
|
91 | + $PASCAL_COMPILER $SOURCE_FILE -o $OUTPUT_FILE $PASCAL_OPTIONS 2>$MESSAGE_FILE | |
|
92 | 92 | else |
|
93 | 93 | talk "ERROR: Invalid language specified!" |
|
94 | 94 | echo "ERROR: Invalid language specified!" > $MESSAGE_FILE |
@@ -103,4 +103,4 | |||
|
103 | 103 | talk "ERROR: Something was wrong during the compilation!" |
|
104 | 104 | talk "Dumping compiler message:" |
|
105 | 105 | #cat $MESSAGE_FILE |
|
106 | - fi No newline at end of file | |
|
106 | + fi |
You need to be logged in to leave comments.
Login now