Reid Spencer | a60ff2e | 2004-07-26 22:52:44 +0000 | [diff] [blame^] | 1 | #!/bin/sh |
| 2 | # This is useful because it prints out all of the source files. Useful for |
| 3 | # greps. |
| 4 | PROGRAM=`which $1` |
| 5 | if [ ! -x "$PROGRAM" ]; then |
| 6 | echo "Can't execute $1" |
| 7 | exit 1 |
| 8 | fi |
| 9 | shift; |
| 10 | ARGS="$*" |
| 11 | TOPDIR=`pwd | sed -e 's#(.*/llvm).*#$1#'` |
| 12 | if test -d "$TOPDIR" ; then |
| 13 | cd $TOPDIR |
| 14 | echo $TOPDIR |
| 15 | find docs include lib tools utils projects -type f \ |
| 16 | \( -path '*/doxygen/*' -o -path '*/Burg/*' \) -prune -o \ |
| 17 | -name '*.[cdhyl]*' \ |
| 18 | \! -name '*~' \ |
| 19 | \! -name '#*' \ |
| 20 | \! -name '*.ll' \ |
| 21 | \! -name '*.d' \ |
| 22 | \! -name '*.dir' \ |
| 23 | \! -name 'Sparc.burm.c' \ |
| 24 | \! -name 'llvmAsmParser.cpp' \ |
| 25 | \! -name 'llvmAsmParser.h' \ |
| 26 | \! -name 'FileParser.cpp' \ |
| 27 | \! -name 'FileParser.h' \ |
| 28 | -exec $PROGRAM $ARGS {} \; |
| 29 | else |
| 30 | echo "Can't find LLVM top directory in $TOPDIR" |
| 31 | fi |