aboutsummaryrefslogtreecommitdiffstats
path: root/build/scripts/compileTest.sh
blob: f6a5b3a1703a3b26f21602b29253ee753f73288b (plain)
1
2
3
4
5
6
7
8
pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888888 } /* Comment.Single */
.highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #333333 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #666666 } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #008800 } /* Keyword.Pseudo */
.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #0000DD; font-weight: bold
#!/bin/sh
# time compile of sources to aspectjtools and aspectjrt
# using many compilers

[ -n "$DEBUG" ] && set -vx


## redirect to stdout to avoid timing errors from console

### set for your system
jdk14="${jdk14:-d:/jdk14}"
jdk13="${jdk13:-j:/home/apps/jdk13}"
jikes="${jikes:-j:/home/wes/dev/bin/win/jikes.exe}"
aj110="${aj110:-j:/home/wes/dev/tools/aspectj-1.1.0}"
aj111="${aj111:-j:/home/wes/dev/tools/aspectj-1.1.1rc1}"
PS="${PS:-;}"

#################
ajdir=`dirname "$0"`/../..
ajdir=`cd "$ajdir"; pwd`
ajdir=`echo "$ajdir" | sed 's|/cygdrive/\([a-zA-Z]\)/|\1:/|'`
allfiles="$ajdir/allfiles.lst"
onefile="$ajdir/onefile.lst"
srcdirs="ajbrowser ajde asm bridge org.aspectj.ajdt.core runtime taskdefs util weaver"
libs="lib/ant/lib/ant.jar lib/bcel/bcel.jar libx/jdtcore-aj/jdtcore-for-aspectj.jar"

classesDir="$ajdir/classes"
ajc110=$aj110/bin/ajc
ajc111=$aj111/bin/ajc

classpath=""
for i in $libs; do
  classpath="$classpath${PS}$ajdir/$i"
done
sourcepath=""
sep=""
for i in $srcdirs; do
  sourcepath="$sourcepath${sep}$ajdir/$i/src"
  [ -n "$sep" ] || sep="${PS}"
done


if [ ! -f "$allfiles" ] ; then
  for i in $srcdirs; do
    find "$ajdir/$i/src" -type f -name \*.java
  done > "$allfiles"
fi

if [ ! -f "$onefile" ] ; then
  echo "$ajdir/util/src/org/aspectj/util/PartialOrder.java" > "$onefile"
fi

[ -d "$classesDir" ] || mkdir "$classesDir"

for argfile in "$onefile" "$allfiles" ; do
for compiler in "$jdk14"/bin/javac "$jdk13"/bin/javac "$ajc110" "$ajc111" "$jikes" ; do
  rm -rf "$classesDir"/*
  if [ "$ajc111" = "$compiler" ] ; then
    cp="$aj111/lib/aspectjrt.jar$classpath"
  elif [ "$jikes" = "$compiler" ] ; then
    cp="$aj110/lib/aspectjrt.jar$classpath${PS}$jdk14/jre/lib/rt.jar${PS}$sourcepath"
  else
    cp="$aj110/lib/aspectjrt.jar$classpath"
  fi
  echo "##################################### $compiler $cp"
  start=`date +%s`
  $compiler \
    -d "$classesDir" -classpath "$cp" @"$argfile"
  end=`date +%s`
  duration=`expr $end - $start`
  echo "$duration ($start - $end) # $compiler"
done
done

rm -f "$allfiles" "$onefile"
exit