projects
/
gruntmaster-daemon.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add javascript
[gruntmaster-daemon.git]
/
gruntmaster-compile
diff --git
a/gruntmaster-compile
b/gruntmaster-compile
index 0ab18fc693a86dc0a72f9779217b8c3ac7514639..3599621a741b3dab66170af972b7d349575b31e7 100755
(executable)
--- a/
gruntmaster-compile
+++ b/
gruntmaster-compile
@@
-30,6
+30,9
@@
given ($format){
exec 'go', qw/build -compiler gccgo/, $name, when 'GCCGO';
exec 'ghc', qw/-DONLINE_JUDGE -Wall -O2 -o/, $basename, $name when 'HASKELL';
exec 'rustc', qw/-O -o/, $basename, $name when 'RUST';
exec 'go', qw/build -compiler gccgo/, $name, when 'GCCGO';
exec 'ghc', qw/-DONLINE_JUDGE -Wall -O2 -o/, $basename, $name when 'HASKELL';
exec 'rustc', qw/-O -o/, $basename, $name when 'RUST';
+ exec 'obc', qw/-x -o/, $basename, $name when 'OBERON';
+ exec 'ocamlopt', qw/-o/, $basename, $name when 'OCAML';
+ exec 'gdc', qw/-DONLINE_JUDGE -Wall -O2 -frelease -fno-bounds-check -o/, $basename, $name when 'D';
when ('BRAINFUCK') {
system 'bfc', $name and die "bfc failed: errno=$! return=$?";
when ('BRAINFUCK') {
system 'bfc', $name and die "bfc failed: errno=$! return=$?";
@@
-38,14
+41,16
@@
given ($format){
exit
}
exit
}
- when ([qw/GOLFSCRIPT J
ULIA PERL PHP PYTHON
RUBY SBCL/]){
+ when ([qw/GOLFSCRIPT J
AVASCRIPT JULIA PERL PHP PYTHON PYTHON3
RUBY SBCL/]){
open IN, '<', $name;
open OUT, '>', $basename;
print OUT "#!/usr/bin/golfscript\n" if $_ eq 'GOLFSCRIPT';
print OUT "#!/usr/bin/julia -O\n" if $_ eq 'JULIA';
open IN, '<', $name;
open OUT, '>', $basename;
print OUT "#!/usr/bin/golfscript\n" if $_ eq 'GOLFSCRIPT';
print OUT "#!/usr/bin/julia -O\n" if $_ eq 'JULIA';
+ print OUT "#!/usr/bin/node\n" if $_ eq 'JAVASCRIPT';
print OUT "#!/usr/bin/perl\n" if $_ eq 'PERL';
print OUT "#!/usr/bin/php -d ONLINE_JUDGE=true\n" if $_ eq 'PHP';
print OUT "#!/usr/bin/perl\n" if $_ eq 'PERL';
print OUT "#!/usr/bin/php -d ONLINE_JUDGE=true\n" if $_ eq 'PHP';
- print OUT "#!/usr/bin/python\n" if $_ eq 'PYTHON';
+ print OUT "#!/usr/bin/python2.7\n" if $_ eq 'PYTHON';
+ print OUT "#!/usr/bin/python3\n" if $_ eq 'PYTHON3';
print OUT "#!/usr/bin/ruby\n" if $_ eq 'RUBY';
print OUT "#!/usr/bin/sbcl --script\n" if $_ eq 'SBCL';
print OUT while <IN>;
print OUT "#!/usr/bin/ruby\n" if $_ eq 'RUBY';
print OUT "#!/usr/bin/sbcl --script\n" if $_ eq 'SBCL';
print OUT while <IN>;
@@
-118,6
+123,14
@@
Compile commands for each format:
ghc -DONLINE_JUDGE -Wall -O2 -o $output $input
ghc -DONLINE_JUDGE -Wall -O2 -o $output $input
+=item OCAML
+
+ ocamlc -o $output $input
+
+=item OBERON
+
+ obc -x -o $output $input
+
=item RUST
rustc -O -o $output $input
=item RUST
rustc -O -o $output $input
This page took
0.009733 seconds
and
4
git commands to generate.