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.6 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #!/bin/sh
  2. # Copyright 2000-2004 The Apache Software Foundation
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. # OS specific support. $var _must_ be set to either true or false.
  16. cygwin=false;
  17. darwin=false;
  18. case "`uname`" in
  19. CYGWIN*) cygwin=true ;;
  20. Darwin*) darwin=true
  21. if [ -z "$JAVA_HOME" ] ; then
  22. JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
  23. fi
  24. ;;
  25. esac
  26. REALANTHOME=$ANT_HOME
  27. if [ -z "$PWD" ]; then
  28. ANT_HOME=./bootstrap
  29. else
  30. ANT_HOME="$PWD"/bootstrap
  31. fi
  32. export ANT_HOME
  33. if test ! -f bootstrap/lib/ant.jar -o ! -x bootstrap/bin/ant -o ! -x bootstrap/bin/antRun ; then
  34. /bin/sh ./bootstrap.sh
  35. fi
  36. if test ! -f bootstrap/lib/ant.jar -o ! -x bootstrap/bin/ant -o ! -x bootstrap/bin/antRun ; then
  37. echo Bootstrap FAILED
  38. exit
  39. fi
  40. if [ "$REALANTHOME" != "" ] ; then
  41. if $cygwin; then
  42. REALANTHOME=`cygpath --windows "$REALANTHOME"`
  43. fi
  44. ANT_INSTALL="-Dant.install=$REALANTHOME"
  45. else
  46. ANT_INSTALL="-emacs"
  47. fi
  48. bootstrap/bin/ant -nouserlib -lib lib/optional "$ANT_INSTALL" $*