]> iEval git - gruntmaster-daemon.git/blame_incremental - gruntmaster-compile
Fix LICENSE in Makefile.PL
[gruntmaster-daemon.git] / gruntmaster-compile
... / ...
CommitLineData
1#!/usr/bin/perl -w
2use v5.14;
3no if $] > 5.017011, warnings => 'experimental::smartmatch';
4
5use File::Copy qw/copy/;
6
7my ($format, $basename, $name) = @ARGV;
8my $ret = fork // die $!;
9if ($ret) {
10 $SIG{ALRM} = sub {kill KILL => $ret};
11 alarm 5;
12 wait;
13 exit $? >> 8
14} else {
15 given ($format){
16 exec 'gcc', qw/-DONLINE_JUDGE -std=gnu11 -Wextra -O2 -o/, $basename, $name when 'C';
17 exec 'g++', qw/-DONLINE_JUDGE -std=gnu++11 -fabi-version=6 -Wextra -O2 -o/, $basename, $name when 'CPP';
18 exec 'gmcs', '-d:ONLINE_JUDGE', $name when 'MONO';
19 exec 'javac', $name when 'JAVA';
20 exec 'fpc', qw/-dONLINE_JUDGE -O2 -n/, $name when 'PASCAL';
21 copy $name, $basename when ['PERL', 'PYTHON']
22 }
23}
This page took 0.018549 seconds and 4 git commands to generate.