3 no if $] > 5.017011, warnings
=> 'experimental::smartmatch';
5 use File
::Copy qw
/copy/;
6 use File
::Basename qw
/fileparse/;
8 my ($format, $name) = @ARGV;
9 my $basename = fileparse
$name, qr/\..*/;
11 my $ret = fork // die $!;
13 $SIG{ALRM
} = sub {kill KILL
=> $ret};
19 exec 'gcc', qw
/-DONLINE_JUDGE -std=gnu11 -Wall -Wextra -O2 -o/, $basename, $name when 'C';
20 exec 'g++', qw
/-DONLINE_JUDGE -std=gnu++11 -fabi-version=6 -Wall -Wextra -O2 -o/, $basename, $name when 'CPP';
21 exec 'gmcs', '-d:ONLINE_JUDGE', $name when 'MONO';
22 exec 'javac', $name when 'JAVA';
23 exec 'fpc', qw
/-dONLINE_JUDGE -O2/, $name when 'PASCAL';
24 exec 'go', qw
/build -compiler gc/, $name when 'GOLANG';
25 exec 'go', qw
/build -compiler gccgo/, $name, when 'GCCGO';
26 exec 'ghc', qw
/-DONLINE_JUDGE -Wall -O2 -o/, $basename, $name when 'HASKELL';
28 when ([qw
/PERL PYTHON/]){
29 copy
$name, $basename;
42 gruntmaster-compile - Gruntmaster 6000 compiler frontend
46 gruntmaster-compile CPP file.cpp
47 gruntmaster-compile JAVA file.java
51 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.
53 Compile commands for each format:
59 gcc -DONLINE_JUDGE -std=gnu11 -Wall -Wextra -O2 -o $output $input
63 g++ -DONLINE_JUDGE -std=gnu++11 -fabi-version=6 -Wall -Wextra -O2 -o $output $input
67 gmcs -d:ONLINE_JUDGE $input
75 fpc -dONLINE_JUDGE -O2 $input
79 go build -compiler gc $input
83 go build -compiler gccgo $input
87 ghc -DONLINE_JUDGE -Wall -O2 -o $output $input
101 Marius Gavrilescu E<lt>marius@ieval.roE<gt>
103 =head1 COPYRIGHT AND LICENSE
105 Copyright (C) 2014 by Marius Gavrilescu
107 This program is free software: you can redistribute it and/or modify
108 it under the terms of the GNU Affero General Public License as published by
109 the Free Software Foundation, either version 3 of the License, or
110 (at your option) any later version.
This page took 0.027757 seconds and 5 git commands to generate.