Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 #!/bin/sh | |
| 2 | |
| 3 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | |
| 4 # Use of this source code is governed by a BSD-style license that can be | |
| 5 # found in the LICENSE file. | |
| 6 | |
| 7 if [[ a"`ctags --version | head -1 | grep \"^Exuberant Ctags\"`" == "a" ]]; then | |
|
jln (very slow on Chromium)
2013/10/07 23:56:26
This is a bash form for test, but you're executing
jww
2013/10/08 20:19:23
Done.
| |
| 8 cat <<EOF | |
| 9 You must be using Exuberant Ctags, not just standard GNU ctags. If you are on | |
| 10 Debian or a related flavor of Linux, you may want to try running | |
| 11 apt-get install exuberant-ctags. | |
| 12 EOF | |
| 13 exit | |
| 14 fi | |
| 15 | |
| 16 CHROME_SRC_DIR="`pwd`" | |
|
jln (very slow on Chromium)
2013/10/07 23:56:26
$PWD?
jww
2013/10/08 20:19:23
Done.
| |
| 17 | |
| 18 fail() { | |
| 19 echo "Failed to create ctags for $1" | |
| 20 exit 1 | |
| 21 } | |
| 22 | |
| 23 ctags_cmd() { | |
| 24 echo "ctags --languages=C++ $1 --exclude=.git -R -f .tmp_tags" | |
| 25 } | |
| 26 | |
| 27 build_dir() { | |
| 28 local extraexcludes="" | |
| 29 if [[ a"$1" == "a--extra-excludes" ]]; then | |
| 30 extraexcludes="--exclude=third_party --exclude=build --exclude=out" | |
| 31 shift | |
| 32 fi | |
| 33 | |
| 34 cd "$CHROME_SRC_DIR/$1" || fail $1 | |
| 35 # Redirect error messages so they aren't seen because they are almost always | |
| 36 # errors about components that you just happen to have not built (NaCl, for | |
| 37 # example). | |
| 38 $(ctags_cmd "$extraexcludes") 2> /dev/null || fail $1 | |
| 39 mv -f .tmp_tags .tags | |
| 40 } | |
| 41 | |
| 42 # We always build the top level but leave all submodules as optional. | |
| 43 build_dir --extra-excludes "" "top level" | |
| 44 | |
| 45 # Build any other directies that are listed on the command line. | |
| 46 for dir in $@; do | |
| 47 build_dir "$1" | |
| 48 shift | |
| 49 done | |
| OLD | NEW |