llvm.org GIT mirror llvm / b27b78f
Base the implementation on the llvmdo script so that we only have to maintain the logic for "what counts as a source file" in one place. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16442 91177308-0d34-0410-b5e6-96231b3b80d8 Reid Spencer 15 years ago
3 changed file(s) with 11 addition(s) and 38 deletion(s). Raw diff Collapse all Expand all
1414 # The script takes no arguments but does expect to be run from the top llvm
1515 # source directory.
1616 #
17 TOPDIR=`pwd | sed -e 's#(.*/llvm).*#$1#'`
17 TOPDIR=`pwd | sed -e 's#\(.*/llvm\).*#\1#'`
1818 if test -d "$TOPDIR" ; then
1919 cd $TOPDIR
20 find include lib tools utils examples -type f -name '*.[cdhyltp]*' \
21 \! -name '*~' \
22 \! -name '#*' \
23 \! -name '*.ll' \
24 \! -name '*.lo' \
25 \! -name '*.d' \
26 \! -name '*.dir' \
27 \! -name 'Sparc.burm.c' \
28 \! -name 'llvmAsmParser.cpp' \
29 \! -name 'llvmAsmParser.h' \
30 \! -name 'FileParser.cpp' \
31 \! -name 'FileParser.h' \
32 -exec wc -l {} \; | awk '\
20 ./utils/llvmdo -dirs "include lib tools test utils examples" wc -l | awk '\
3321 BEGIN { loc=0; } \
3422 { loc += $1; } \
3523 END { print loc; }'
0 #!/bin/sh
11 # This is useful because it prints out all of the source files. Useful for
22 # greps.
3 find docs include lib tools utils examples projects -name \*.\[cdhylt\]\* | grep -v Lexer.cpp | \
4 grep -v llvmAsmParser.cpp | grep -v llvmAsmParser.h | grep -v '~$' | \
5 grep -v '\.ll$' | grep -v .flc | grep -v Sparc.burm.c | grep -v '\.d$' |\
6 grep -v '\.dir$' | grep -v '\.la$' | \
7 grep -v /Burg/ | grep -v '\.lo' | grep -v '\.inc$' | grep -v '\.libs' | \
8 grep -v TableGen/FileParser.cpp | grep -v TableGen/FileParser.h
9
3 TOPDIR=`pwd | sed -e 's#\(.*/llvm\).*#\1#'`
4 if test -d "$TOPDIR" ; then
5 cd $TOPDIR
6 ./utils/llvmdo -dirs "include lib tools utils examples projects" echo
7 else
8 echo "Can't find LLVM top directory in $TOPDIR"
9 fi
0 #!/bin/sh
11 # This is useful because it prints out all of the source files. Useful for
22 # greps.
3 PATTERN="$*"
4 TOPDIR=`pwd | sed -e 's#(.*/llvm).*#$1#'`
3 TOPDIR=`pwd | sed -e 's#\(.*/llvm\).*#\1#'`
54 if test -d "$TOPDIR" ; then
65 cd $TOPDIR
7 find docs include lib tools utils examples projects -type f \
8 \( -path '*/doxygen/*' -o -path '*/Burg/*' \) -prune -o \
9 -name '*.[cdhylt]*' \
10 \! -name '*~' \
11 \! -name '#*' \
12 \! -name '*.ll' \
13 \! -name '*.lo' \
14 \! -name '*.d' \
15 \! -name '*.dir' \
16 \! -name 'Sparc.burm.c' \
17 \! -name 'llvmAsmParser.cpp' \
18 \! -name 'llvmAsmParser.h' \
19 \! -name 'FileParser.cpp' \
20 \! -name 'FileParser.h' \
21 -exec egrep -H -n "$PATTERN" {} \;
6 ./utils/llvmdo -dirs "include lib tools utils docs examples test projects" egrep -H -n "$*"
227 else
238 echo "Can't find LLVM top directory in $TOPDIR"
249 fi