| OLD | NEW |
| 1 #!/usr/bin/env bash | 1 #!/usr/bin/env bash |
| 2 # Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 2 # Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 3 # for details. All rights reserved. Use of this source code is governed by a | 3 # for details. All rights reserved. Use of this source code is governed by a |
| 4 # BSD-style license that can be found in the LICENSE file. | 4 # BSD-style license that can be found in the LICENSE file. |
| 5 # | 5 # |
| 6 # This script generates the following files, based on the contents of | 6 # This script generates the following files, based on the contents of |
| 7 # spec_input.html: | 7 # spec_input.html: |
| 8 # | 8 # |
| 9 # - ../../doc/api.html: The human-readable API spec. | 9 # - ../../doc/api.html: The human-readable API spec. |
| 10 # | 10 # |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 echo "$file" | 25 echo "$file" |
| 26 } | 26 } |
| 27 | 27 |
| 28 # Unlike $0, $BASH_SOURCE points to the absolute path of this file. | 28 # Unlike $0, $BASH_SOURCE points to the absolute path of this file. |
| 29 PROG_NAME="$(follow_links "$BASH_SOURCE")" | 29 PROG_NAME="$(follow_links "$BASH_SOURCE")" |
| 30 | 30 |
| 31 SCRIPT_DIR="$(cd "${PROG_NAME%/*}" ; pwd -P)" | 31 SCRIPT_DIR="$(cd "${PROG_NAME%/*}" ; pwd -P)" |
| 32 | 32 |
| 33 ROOT_DIR="$(cd "${SCRIPT_DIR}/../../../.." ; pwd -P)" | 33 ROOT_DIR="$(cd "${SCRIPT_DIR}/../../../.." ; pwd -P)" |
| 34 | 34 |
| 35 BIN_DIR="${ROOT_DIR}/sdk/bin" | 35 if [[ $1 == '--arch' && $2 == 'x64' ]]; |
| 36 | 36 then |
| 37 if [ -z "$DART_CONFIGURATION" ]; | 37 DART_CONFIGURATION="ReleaseX64" |
| 38 elif [ -z "$DART_CONFIGURATION" ]; |
| 38 then | 39 then |
| 39 DART_CONFIGURATION="ReleaseIA32" | 40 DART_CONFIGURATION="ReleaseIA32" |
| 40 fi | 41 fi |
| 41 | 42 |
| 42 if [[ `uname` == 'Darwin' ]]; | 43 if [[ `uname` == 'Darwin' ]]; |
| 43 then | 44 then |
| 44 BUILD_DIR="${ROOT_DIR}/xcodebuild/$DART_CONFIGURATION" | 45 if [[ $GYP_GENERATORS == 'ninja' ]]; |
| 45 else | 46 then |
| 46 BUILD_DIR="${ROOT_DIR}/out/$DART_CONFIGURATION" | 47 BUILD_DIR="${ROOT_DIR}/out/$DART_CONFIGURATION" |
| 48 else |
| 49 BUILD_DIR="${ROOT_DIR}/xcodebuild/$DART_CONFIGURATION" |
| 50 fi |
| 47 fi | 51 fi |
| 48 | 52 |
| 49 PKG_DIR="${BUILD_DIR}/packages" | 53 PKG_FILE="${ROOT_DIR}/pkg/analysis_server/.packages" |
| 50 | 54 |
| 51 DART="${BIN_DIR}/dart" | 55 DART="${BUILD_DIR}/dart-sdk/bin/dart" |
| 52 | 56 |
| 53 declare -a VM_OPTIONS | 57 declare -a VM_OPTIONS |
| 54 VM_OPTIONS+=("--checked") | 58 VM_OPTIONS+=("--checked") |
| 55 VM_OPTIONS+=("--package-root=${PKG_DIR}") | 59 VM_OPTIONS+=("--packages=${PKG_FILE}") |
| 56 | 60 |
| 57 cd "${SCRIPT_DIR}" | 61 cd "${SCRIPT_DIR}" |
| 58 "${DART}" "${VM_OPTIONS[@]}" "generate_all.dart" | 62 "${DART}" "${VM_OPTIONS[@]}" "generate_all.dart" |
| OLD | NEW |