view javac.in @ 867:47be7e06b551

2008-05-20 Lillian Angel <langel@redhat.com> * Makefile.am: Updated JAVAC calls so ecj wrapper script is used. * Makefile.in: Regenerated. * aclocal.m4: Likewise. * configure: Likewise. * javac.in: Updated to use source 1.6 instead of 1.5.
author Lillian Angel <langel@redhat.com>
date Tue, 20 May 2008 11:15:37 -0400
parents c3357ed52323
children d72271b9d9ef
line wrap: on
line source

#!/bin/sh

case "$*" in
  *-bootclasspath*) ;;
  *) bcoption="-bootclasspath @LIBGCJ_JAR@"
esac

# Work around ecj's inability to handle duplicate command-line
# options.

NEW_ARGS="$@"

if echo "$@" | grep -q '\-source\ .*\-source\ '
then
  NEW_ARGS=`echo $NEW_ARGS | sed -e 's/-source\ *1\.[3456]//1'`
fi

if echo "$@" | grep -q '\-d\ .*\-d\ '
then
  NEW_ARGS=`echo $NEW_ARGS | sed -e 's/-d\ *[^\ ]*//1'`
fi

if echo "$@" | grep -q '\-encoding\ .*\-encoding\ '
then
  NEW_ARGS=`echo $NEW_ARGS | sed -e 's/-encoding\ *[^\ ]*//1'`
fi

if echo "$@" | grep -q '\-Werror'
then
  NEW_ARGS=`echo $NEW_ARGS | sed -e 's/-Werror//1'`
fi

CLASSPATH=@ECJ_JAR@${CLASSPATH:+:}$CLASSPATH \
  @JAVA@ org.eclipse.jdt.internal.compiler.batch.Main -1.6 -nowarn $bcoption $NEW_ARGS