X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=development%2Ftools%2Fcount_total_lines_of_compiled_code.sh;h=95a248236e73553f482b474ec36351be233781ea;hb=c7ecd10c452f7ea085bc6574823b7a929e4975a7;hp=65bb92bf5b86e0d8d6316f87f1da59ae33f3e56c;hpb=45482a947da901597b59933459ab528036fe8959;p=lyx.git diff --git a/development/tools/count_total_lines_of_compiled_code.sh b/development/tools/count_total_lines_of_compiled_code.sh index 65bb92bf5b..95a248236e 100755 --- a/development/tools/count_total_lines_of_compiled_code.sh +++ b/development/tools/count_total_lines_of_compiled_code.sh @@ -1,6 +1,6 @@ #!/bin/bash -qt=/usr/include/qt4 +qt=$QTDIR/include build=../../../build inc="-I$qt -I$qt/QtCore -I$qt/QtGui" @@ -13,14 +13,27 @@ inc="$inc -I../../src/frontends/controllers" inc="$inc -I../../src/frontends/qt4" s=0 -#for i in `find ../../src/frontends/qt4 -name *.cpp` ; do +t=0 +defines="-DQT_NO_STL -DQT_NO_KEYWORDS" +#for i in `find ../../src/frontends/qt4 -name '*.cpp'` ; do +#for i in `find ../../src/insets -name '*.cpp'` ; do +#for i in `find ../../src/mathed -name '*.cpp'` ; do +#for i in `find ../../src/support -name '*.cpp'` ; do +#for i in `find ../../src/graphics -name '*.cpp'` ; do +#for i in `find ../../src/graphics -name '*.cpp'` ; do +#for i in `find ../../src/support/chdir.cpp` ; do for i in `find ../.. -name '*.cpp'` ; do +#for i in ../../src/frontends/qt4/GuiPrint.cpp ; do +#for i in ../../src/frontends/qt4/1.cpp ; do #echo $i - #echo "g++ $inc -DQT_NO_STL -E $i" - #g++ $inc -DQT_NO_STL -E $i > tmp/`basename $i` - l=`g++ $inc -DQT_NO_STL -E $i | wc -l` + #echo "g++ $inc $defines -E $i" + #g++ $inc $defines -E $i > tmp/`basename $i` + g++ $inc $defines -E $i > t + l=`g++ $inc $defines -E $i | wc -l` + f=`cat $i | wc -l` s=$[s + l] - printf "%10d %-40s\n" $l $i + t=$[t + f] + printf "%10d %10d %-40s\n" $l $f $i done -echo "Total: $s" +echo "Total: compiled: $s real: $t ratio:" $[s / t]