blob: b94328e75a7134e503dbfa7c151a48e5685d4f9a [file] [log] [blame]
Reid Spencera60ff2e2004-07-26 22:52:44 +00001#!/bin/sh
2# This is useful because it prints out all of the source files. Useful for
3# greps.
4PROGRAM=`which $1`
5if [ ! -x "$PROGRAM" ]; then
6 echo "Can't execute $1"
7 exit 1
8fi
9shift;
10ARGS="$*"
11TOPDIR=`pwd | sed -e 's#(.*/llvm).*#$1#'`
12if 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 {} \;
29else
30 echo "Can't find LLVM top directory in $TOPDIR"
31fi