Commit Graph

12 Commits

Author SHA1 Message Date
Reid Spencer
6ae928fc69 This script takes arguments so remove the check for number of arguments,
just check the first arg to see if its -topdir.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29694 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-15 03:48:22 +00:00
Reid Spencer
ca7592a1ba Make all tools that use llvmdo have a -topdir option that allows the top
source dir for LLVM to be specified explicitly. This removes the dependency
on the llvm-config script. If the option is not given, then the scripts use
llvm-config which should be both built and in the PATH. This arrangement
provides a useful default for most developers but also allows the nightly
tester to execute countloc.sh before llvm-config is built and without
altering the PATH.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29663 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-14 18:49:05 +00:00
Reid Spencer
1e75b7b015 Make llvmdo and llvmgrep invulnerable to where they are run from by getting
the llvm source root from the llvm-config command. The dependency now is
that the correct llvm-config command is in the path. For most developers
this is the case.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29630 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-11 21:53:27 +00:00
Reid Spencer
09a053a777 Allow a sequence of digits at the end of the directory name when trying to
determine the top directory. This allows the tool to find the correct top
directory when you have something like:

   /x/llvm
   /x/llvm2
   /x/llvm3

Previously the scripts would always find /x/llvm even if you were in the
llvm2 or llvm3 directory because the pattern didn't allow the digits at
the end of the path.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26751 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-14 06:08:05 +00:00
Reid Spencer
054defa746 Make these scripts work on SunOS too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16805 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-07 16:03:21 +00:00
Reid Spencer
181e65dff1 Documentation upgrade.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16445 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-20 08:09:36 +00:00
Reid Spencer
b27b78f6a4 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
2004-09-20 07:22:23 +00:00
Chris Lattner
60ec2655bb Don't include libtool "object" files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16391 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-18 04:40:46 +00:00
Reid Spencer
8eecb149ef Add the examples directory to these scripts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16030 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-24 17:42:33 +00:00
Chris Lattner
6a1e0e6c7b Include .td and .txt files in the greps. This will allow me to find symbols in
them, and also count them in the LOC of LLVM for the nightly tester.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15786 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-15 22:54:31 +00:00
Reid Spencer
23a354d1f1 Fix some thinkos in the script (error handling, proper argument handling).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14676 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-07 21:19:01 +00:00
Reid Spencer
2d67208306 A utility to search the LLVM source tree for a grep pattern. This is a
replacement for getsrcs.sh which now generates too much text to put on a
Linux command line. The approach taken with llvmgrep is to execute a find
command and execute a grep on each file that matches the name pattern. The
arguments to this script are the same as those of egrep. Note that the -H
and -n options to egrep will always be passed so that you always get the
file and line number of matches.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14255 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-19 20:32:55 +00:00