]> git.lyx.org Git - lyx.git/blob - development/tools/count_total_lines_of_compiled_code.sh
Use data from src/lyxwinres.rc to generate lyx.coff for the Windows
[lyx.git] / development / tools / count_total_lines_of_compiled_code.sh
1 #!/bin/bash
2
3 qt=$QTDIR/include
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 defines="-DQT_NO_STL -DQT_NO_KEYWORDS"
18 #for i in `find ../../src/frontends/qt4 -name '*.cpp'` ; do
19 #for i in `find ../../src/insets -name '*.cpp'` ; do
20 #for i in `find ../../src/mathed -name '*.cpp'` ; do
21 #for i in `find ../../src/support -name '*.cpp'` ; do
22 #for i in `find ../../src/graphics -name '*.cpp'` ; do
23 #for i in `find ../../src/graphics -name '*.cpp'` ; do
24 #for i in `find ../../src/support/chdir.cpp` ; do
25 for i in `find ../.. -name '*.cpp'` ; do
26 #for i in ../../src/frontends/qt4/GuiPrint.cpp ; do
27 #for i in ../../src/frontends/qt4/1.cpp ; do
28         #echo $i
29         #echo "g++ $inc $defines -E $i"
30         #g++ $inc $defines -E $i > tmp/`basename $i`
31         g++ $inc $defines -E $i > t
32         l=`g++ $inc $defines -E $i | wc -l`
33         f=`cat $i | wc -l`
34         s=$[s + l]
35         t=$[t + f]
36         printf "%10d %10d  %-40s\n" $l $f $i
37 done
38 echo "Total: compiled: $s  real: $t  ratio:" $[s / t]
39