選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

compileTest.sh 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. #!/bin/sh
  2. # time compile of sources to aspectjtools and aspectjrt
  3. # using many compilers
  4. [ -n "$DEBUG" ] && set -vx
  5. ## redirect to stdout to avoid timing errors from console
  6. ### set for your system
  7. jdk14="${jdk14:-d:/jdk14}"
  8. jdk13="${jdk13:-j:/home/apps/jdk13}"
  9. jikes="${jikes:-j:/home/wes/dev/bin/win/jikes.exe}"
  10. aj110="${aj110:-j:/home/wes/dev/tools/aspectj-1.1.0}"
  11. aj111="${aj111:-j:/home/wes/dev/tools/aspectj-1.1.1rc1}"
  12. PS="${PS:-;}"
  13. #################
  14. ajdir=`dirname "$0"`/../..
  15. ajdir=`cd "$ajdir"; pwd`
  16. ajdir=`echo "$ajdir" | sed 's|/cygdrive/\([a-zA-Z]\)/|\1:/|'`
  17. allfiles="$ajdir/allfiles.lst"
  18. onefile="$ajdir/onefile.lst"
  19. srcdirs="ajbrowser ajde asm bridge org.aspectj.ajdt.core runtime taskdefs util weaver"
  20. libs="lib/ant/lib/ant.jar lib/bcel/bcel.jar lib/jdtcore-aj/jdtcore-for-aspectj.jar"
  21. classesDir="$ajdir/classes"
  22. ajc110=$aj110/bin/ajc
  23. ajc111=$aj111/bin/ajc
  24. classpath=""
  25. for i in $libs; do
  26. classpath="$classpath${PS}$ajdir/$i"
  27. done
  28. sourcepath=""
  29. sep=""
  30. for i in $srcdirs; do
  31. sourcepath="$sourcepath${sep}$ajdir/$i/src"
  32. [ -n "$sep" ] || sep="${PS}"
  33. done
  34. if [ ! -f "$allfiles" ] ; then
  35. for i in $srcdirs; do
  36. find "$ajdir/$i/src" -type f -name \*.java
  37. done > "$allfiles"
  38. fi
  39. if [ ! -f "$onefile" ] ; then
  40. echo "$ajdir/util/src/org/aspectj/util/PartialOrder.java" > "$onefile"
  41. fi
  42. [ -d "$classesDir" ] || mkdir "$classesDir"
  43. for argfile in "$onefile" "$allfiles" ; do
  44. for compiler in "$jdk14"/bin/javac "$jdk13"/bin/javac "$ajc110" "$ajc111" "$jikes" ; do
  45. rm -rf "$classesDir"/*
  46. if [ "$ajc111" = "$compiler" ] ; then
  47. cp="$aj111/lib/aspectjrt.jar$classpath"
  48. elif [ "$jikes" = "$compiler" ] ; then
  49. cp="$aj110/lib/aspectjrt.jar$classpath${PS}$jdk14/jre/lib/rt.jar${PS}$sourcepath"
  50. else
  51. cp="$aj110/lib/aspectjrt.jar$classpath"
  52. fi
  53. echo "##################################### $compiler $cp"
  54. start=`date +%s`
  55. $compiler \
  56. -d "$classesDir" -classpath "$cp" @"$argfile"
  57. end=`date +%s`
  58. duration=`expr $end - $start`
  59. echo "$duration ($start - $end) # $compiler"
  60. done
  61. done
  62. rm -f "$allfiles" "$onefile"
  63. exit