3 no if $] > 5.017011, warnings
=> 'experimental::smartmatch';
5 use File
::Copy qw
/copy/;
7 my ($format, $basename, $name) = @ARGV;
8 my $ret = fork // die $!;
10 $SIG{ALRM
} = sub {kill KILL
=> $ret};
16 exec 'gcc', qw
/-DONLINE_JUDGE -std=gnu11 -Wall -Wextra -O2 -o/, $basename, $name when 'C';
17 exec 'g++', qw
/-DONLINE_JUDGE -std=gnu++11 -fabi-version=6 -Wall -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']
31 gruntmaster-compile - Gruntmaster 6000 compiler frontend
35 gruntmaster-compile CPP file.cpp
36 gruntmaster-compile JAVA file.java
40 gruntmaster-compile is a very simple frontend to various comilers. It takes two arguments: the file format and the file name, and produces a compiled executable. The executable's name is the basename of the input file.
42 Compile commands for each format:
48 gcc -DONLINE_JUDGE -std=gnu11 -Wall -Wextra -O2 -o $output $input
52 g++ -DONLINE_JUDGE -std=gnu11 -fabi-version=6 -Wall -Wextra -O2 -o $output $input
56 gmcs -d:ONLINE_JUDGE $input
64 fpc -dONLINE_JUDGE -O2 -n $input
78 Marius Gavrilescu E<lt>marius@ieval.roE<gt>
80 =head1 COPYRIGHT AND LICENSE
82 Copyright (C) 2014 by Marius Gavrilescu
84 This program is free software: you can redistribute it and/or modify
85 it under the terms of the GNU Affero General Public License as published by
86 the Free Software Foundation, either version 3 of the License, or
87 (at your option) any later version.
This page took 0.023555 seconds and 4 git commands to generate.