2 # This is useful because it prints out all of the source files. Useful for
5 if test $# -lt 1 ; then
6 echo "Usage: llvmdo [-dirs "DIRNAMES..."] PROGRAM ARGS...";
10 if test "$1" = "-dirs" ; then
13 elif test -z "$LLVMDO_DIRS" ; then
14 LLVMDO_DIRS="include lib tools test utils docs examples projects"
17 if test ! -x "$PROGRAM" ; then
18 echo "Can't execute $1"
23 TOPDIR=`pwd | sed -e 's#\(.*/llvm\).*#\1#'`
24 if test -d "$TOPDIR" ; then
26 find $LLVMDO_DIRS -type f \
28 -path 'docs/doxygen/*' -o \
29 -path 'docs/CommandGuide/html/*' -o \
30 -path 'docs/CommandGuide/man/*' -o \
31 -path 'docs/CommandGuide/ps/*' -o \
32 -path 'docs/CommandGuide/man/*' -o \
33 -path 'docs/HistoricalNotes/*' -o \
34 -path 'utils/Burg/*' -o \
35 -path 'docs/img/*' -o \
38 -name '*.[cdhyltp]*' \
50 \! -name 'Sparc.burm.c' \
51 \! -name 'llvmAsmParser.cpp' \
52 \! -name 'llvmAsmParser.h' \
53 \! -name 'FileParser.cpp' \
54 \! -name 'FileParser.h' \
55 \! -name 'StackerParser.h' \
56 \! -name 'StackerParser.cpp' \
57 -exec $PROGRAM $ARGS {} \; \
60 echo "Can't find LLVM top directory in $TOPDIR"