blob: 5127fc51b81bad3ed9b16890162897a3f4db226e [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' \
Chris Lattner60ec2652004-09-18 04:40:46 +000021 \! -name '*.lo' \
Reid Spencera60ff2e2004-07-26 22:52:44 +000022 \! -name '*.d' \
23 \! -name '*.dir' \
24 \! -name 'Sparc.burm.c' \
25 \! -name 'llvmAsmParser.cpp' \
26 \! -name 'llvmAsmParser.h' \
27 \! -name 'FileParser.cpp' \
28 \! -name 'FileParser.h' \
29 -exec $PROGRAM $ARGS {} \;
30else
31 echo "Can't find LLVM top directory in $TOPDIR"
32fi