summary refs log tree commit diff
path: root/gnu/packages/javac.in
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-03-18 18:11:02 +0100
committerLudovic Courtès <ludo@gnu.org>2015-03-18 18:11:02 +0100
commit381c540b937a5e6e8b7007c9c0271ee816bf5417 (patch)
tree27191f25f05bbfd48dbf47bbd29f72cb7521482f /gnu/packages/javac.in
parent49689377a3bab8da08436455ca14a0432fa0e95f (diff)
parentf401b1e9934a6594d6d7586922aa987e0b24839b (diff)
downloadguix-381c540b937a5e6e8b7007c9c0271ee816bf5417.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/packages/javac.in')
-rw-r--r--gnu/packages/javac.in61
1 files changed, 0 insertions, 61 deletions
diff --git a/gnu/packages/javac.in b/gnu/packages/javac.in
deleted file mode 100644
index adb4dc1f6c..0000000000
--- a/gnu/packages/javac.in
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/usr/bin/perl -w
-
-# Taken from Gentoo:
-# http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-java/gcj-jdk/files/javac.in
-
-use strict;
-use constant NO_DUP_ARGS => qw(-source -target -d -encoding);
-use constant STRIP_ARGS => qw(-Werror -implicit:none -J-Xbootclasspath/p:);
-
-my $ECJ_WARNINGS="-nowarn";
-
-my ( @bcoption, @source15, @target15, @cp );
-push @bcoption, '-bootclasspath', '@RT_JAR@:@TOOLS_JAR@'
-    unless grep {$_ eq '-bootclasspath'} @ARGV;
-push @source15, '-source', '1.5'
-    unless grep {$_ eq '-source'} @ARGV;
-push @target15, '-target', '1.5'
-    unless grep {$_ eq '-target'} @ARGV;  
-push @cp, '-cp', '.'
-    unless grep {$_ =~ '\-c(p|lasspath)'} @ARGV or $ENV{CLASSPATH};
-my @ecj_parms = ($ECJ_WARNINGS, @bcoption, @source15, @target15, @cp);
-
-# Work around ecj's inability to handle duplicate command-line
-# options and unknown javac options.
-sub gen_ecj_opts
-{
-    my @new_args = @{$_[0]};
-
-    for my $opt (NO_DUP_ARGS) 
-    {
-	my @indices = reverse grep {$new_args[$_] eq $opt} 0..$#new_args;
-	if (@indices > 1) {
-	    shift @indices;    # keep last instance only
-	    splice @new_args, $_, 2 for @indices;
-	}
-    }
-
-    for my $opt (STRIP_ARGS) 
-    {
-	my @indices = reverse grep {$new_args[$_] eq $opt} 0..$#new_args;
-	splice @new_args, $_, 1 for @indices;
-    }
-
-    return \@new_args;
-}
-
-sub split_vm_args
-{
-    my @new_args = @{$_[0]};
-
-    my @vm_args = map { substr $_, 2 } grep $_ =~ /^-J/, @new_args;
-    my @javac_args = grep $_ !~ /^-J/, @new_args;
-
-    return (\@vm_args, \@javac_args);
-}
-
-my ($vm_args, $javac_args) = split_vm_args (gen_ecj_opts( \@ARGV ));
-my @CLASSPATH = ('@ECJ_JAR@');
-push @CLASSPATH, split /:/, $ENV{"CLASSPATH"} if exists $ENV{"CLASSPATH"};
-$ENV{"CLASSPATH"} = join ':', @CLASSPATH;
-exec '@JAVA@', @$vm_args, 'org.eclipse.jdt.internal.compiler.batch.Main', @ecj_parms, @$javac_args;