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.7 KiB

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