You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

build.sh 1.5 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #!/bin/sh
  2. # Copyright (c) 2000-2003 The Apache Software Foundation. All rights
  3. # reserved.
  4. # OS specific support. $var _must_ be set to either true or false.
  5. cygwin=false;
  6. darwin=false;
  7. case "`uname`" in
  8. CYGWIN*) cygwin=true ;;
  9. Darwin*) darwin=true
  10. if [ -z "$JAVA_HOME" ] ; then
  11. JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
  12. fi
  13. ;;
  14. esac
  15. REALANTHOME=$ANT_HOME
  16. ANT_HOME=bootstrap
  17. export ANT_HOME
  18. if test ! -f bootstrap/lib/ant.jar -o ! -x bootstrap/bin/ant -o ! -x bootstrap/bin/antRun ; then
  19. /bin/sh ./bootstrap.sh
  20. fi
  21. if test ! -f bootstrap/lib/ant.jar -o ! -x bootstrap/bin/ant -o ! -x bootstrap/bin/antRun ; then
  22. echo Bootstrap FAILED
  23. exit
  24. fi
  25. LOCALCLASSPATH=lib/xercesImpl.jar:lib/xml-apis.jar
  26. # add in the dependency .jar files
  27. DIRLIBS=lib/optional/*.jar
  28. for i in ${DIRLIBS}
  29. do
  30. if [ "$i" != "${DIRLIBS}" ] ; then
  31. LOCALCLASSPATH=$LOCALCLASSPATH:"$i"
  32. fi
  33. done
  34. # make sure the classpath is in unix format
  35. if $cygwin ; then
  36. CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
  37. fi
  38. CLASSPATH=$LOCALCLASSPATH:$CLASSPATH
  39. # switch back to Windows format
  40. if $cygwin ; then
  41. CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
  42. fi
  43. export CLASSPATH
  44. if [ "$REALANTHOME" != "" ] ; then
  45. if $cygwin; then
  46. REALANTHOME=`cygpath --path --windows "$REALANTHOME"`
  47. fi
  48. ANT_INSTALL="-Dant.install=$REALANTHOME"
  49. else
  50. ANT_INSTALL="-emacs"
  51. fi
  52. bootstrap/bin/ant -emacs "$ANT_INSTALL" $*