]> git.lyx.org Git - lyx.git/blob - development/tools/count_total_lines_of_compiled_code.sh
I'll find a solution for the 'dirList problem', Abdel.
[lyx.git] / development / tools / count_total_lines_of_compiled_code.sh
1 #!/bin/bash
2
3 qt=/usr/include/qt4
4 build=../../../build
5
6 inc="-I$qt -I$qt/QtCore -I$qt/QtGui"
7 inc="$inc -I$build/src"
8 inc="$inc -I$build/src/frontends/qt4"
9 inc="$inc -I../../boost"
10 inc="$inc -I../../src"
11 inc="$inc -I../../src/frontends"
12 inc="$inc -I../../src/frontends/controllers"
13 inc="$inc -I../../src/frontends/qt4"
14
15 s=0
16 t=0
17 #for i in `find ../../src/frontends/qt4 -name '*.cpp'` ; do
18 #for i in `find ../../src/insets -name '*.cpp'` ; do
19 #for i in `find ../../src/mathed -name '*.cpp'` ; do
20 #for i in `find ../../src/support -name '*.cpp'` ; do
21 #for i in `find ../../src/graphics -name '*.cpp'` ; do
22 #for i in `find ../../src/graphics -name '*.cpp'` ; do
23 #for i in `find ../../src/support/chdir.cpp` ; do
24 for i in `find ../.. -name '*.cpp'` ; do
25         #echo $i
26         #echo "g++ $inc -DQT_NO_STL -E $i"
27         #g++ $inc -DQT_NO_STL -E $i > tmp/`basename $i`
28         g++ $inc -DQT_NO_STL -E $i > t
29         l=`g++ $inc -DQT_NO_STL -E $i | wc -l`
30         f=`cat $i | wc -l`
31         s=$[s + l]
32         t=$[t + f]
33         printf "%10d %10d  %-40s\n" $l $f $i
34 done
35 echo "Total: compiled: $s  real: $t  ratio:" $[s / t]
36