OLD | NEW |
(Empty) | |
| 1 #!/bin/bash |
| 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 |
| 4 # BSD-style license that can be found in the LICENSE file. |
| 5 # |
| 6 # This script executes code generation tools found in the analyzer |
| 7 # "tool" directory. |
| 8 |
| 9 set -e |
| 10 |
| 11 function follow_links() { |
| 12 file="$1" |
| 13 while [ -h "$file" ]; do |
| 14 # On Mac OS, readlink -f doesn't work. |
| 15 file="$(readlink "$file")" |
| 16 done |
| 17 echo "$file" |
| 18 } |
| 19 |
| 20 # Unlike $0, $BASH_SOURCE points to the absolute path of this file. |
| 21 PROG_NAME="$(follow_links "$BASH_SOURCE")" |
| 22 |
| 23 SCRIPT_DIR="$(cd "${PROG_NAME%/*}" ; pwd -P)" |
| 24 |
| 25 ROOT_DIR="$(cd "${SCRIPT_DIR}/../../.." ; pwd -P)" |
| 26 |
| 27 BIN_DIR="${ROOT_DIR}/sdk/bin" |
| 28 |
| 29 if [ -z "$DART_CONFIGURATION" ]; |
| 30 then |
| 31 DART_CONFIGURATION="ReleaseIA32" |
| 32 fi |
| 33 |
| 34 if [[ `uname` == 'Darwin' ]]; |
| 35 then |
| 36 BUILD_DIR="${ROOT_DIR}/xcodebuild/$DART_CONFIGURATION" |
| 37 else |
| 38 BUILD_DIR="${ROOT_DIR}/out/$DART_CONFIGURATION" |
| 39 fi |
| 40 |
| 41 PKG_DIR="${BUILD_DIR}/packages" |
| 42 |
| 43 DART="${BIN_DIR}/dart" |
| 44 |
| 45 declare -a VM_OPTIONS |
| 46 VM_OPTIONS+=("--checked") |
| 47 VM_OPTIONS+=("--package-root=${PKG_DIR}") |
| 48 |
| 49 cd "${SCRIPT_DIR}" |
| 50 "${DART}" "${VM_OPTIONS[@]}" "task_dependency_graph/generate.dart" |
OLD | NEW |