Make this script not care where it is run from by getting the llvm src
authorReid Spencer <rspencer@reidspencer.com>
Fri, 11 Aug 2006 21:55:31 +0000 (21:55 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Fri, 11 Aug 2006 21:55:31 +0000 (21:55 +0000)
root from the llvm-config script.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29632 91177308-0d34-0410-b5e6-96231b3b80d8

utils/countloc.sh

index fe77de9184621a8ffa4b14dd8fdcbc5e91760ed1..736b8805df674a0bfe00336ecb60069f40c59ba0 100755 (executable)
@@ -19,7 +19,7 @@
 # details.
 ##===----------------------------------------------------------------------===##
 
-TOPDIR=`pwd | sed -e 's#\(.*/llvm\).*#\1#'`
+TOPDIR=`llvm-config --src-root`
 if test -d "$TOPDIR" ; then
   cd $TOPDIR
   ./utils/llvmdo -dirs "include lib tools test utils examples" wc -l | awk '\