From c14037d0a206a11dc6e921a23af8a0db85685b36 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Sun, 31 Jul 2005 15:42:25 +0000 Subject: [PATCH] Add stuff to HTML output. --- tools/tools/build_option_survey/mkhtml.sh | 108 +++++++++++++++++----- 1 file changed, 86 insertions(+), 22 deletions(-) diff --git a/tools/tools/build_option_survey/mkhtml.sh b/tools/tools/build_option_survey/mkhtml.sh index 6ecb79c16da2..cff7aea0f088 100644 --- a/tools/tools/build_option_survey/mkhtml.sh +++ b/tools/tools/build_option_survey/mkhtml.sh @@ -10,70 +10,134 @@ ref_blk=`awk 'NR == 2 {print $3}' Tmp/Ref/_.df` echo $ref_blk H=HTML/index.html -echo "" > ${H} +echo ' +

FreeBSD Build Option Survey

+

+This table shows the effect on various build options NO_* build +options in FreeBSD. +

+For each option is shown the effect of applying it to buildworld +alone, installworld alone or to both. +

+For each case is shown the size of the installworld image, the +delta compared to the full installworld and the number of file +system entries added, deleted or changed by the option. +

+The add/delete/change fields link to "mtree(1) -f -f" output +for the relevant files. +For the "changed" data, the first line is the reference copy +and the second line is the result of the applied option. +

Technical notes

+

+This table is generated by software that can be found in +src/tools/tools/build_option_survey. +

+The installworld is made onto a 200MB UFS1 filesystem with +4k blocksize and 512 bytes fragmentsize. This matches +use nanoBSDs filesystem creation usage. +

+For reasons of randomness, the "usr/share/man/whatis" file varies +in size from installworld to installworld, and this generally +dithers the results by a few blocks in one or the other direction. +' > ${H} +echo "

This table was created on `uname -rm` at `date`" >> ${H} +echo "


" >> ${H} echo "" >> ${H} echo ' - + - - - + + + - + - + - + ' >> $H echo '' >> $H echo "" >> $H -echo "" >> $H +echo "" >> $H echo "" >> $H -echo "" >> $H +echo "" >> $H echo "" >> $H -echo "" >> $H +echo "" >> $H echo "" >> $H -cat no_list | while read o +grep -v '#' no_list | while read o do + echo "# $o" m=`echo "$o=YES" | md5` echo "" >> $H echo "" >> $H - for d in iw bw w + for d in bw iw w do if [ ! -d Tmp/$m/$d ] ; then - echo "" >> $H + echo "" >> $H continue fi if [ ! -f Tmp/$m/$d/_.df ] ; then - echo "" >> $H + echo "" >> $H continue fi blk=`awk 'NR == 2 {print $3}' Tmp/$m/$d/_.df` echo "" >> $H echo "" >> $H - mtree -f Tmp/Ref/_.mtree -f Tmp/$m/$d/_.mtree | - sed '/^ /d' > HTML/$m.$d.mtree.txt + mtree -f Tmp/Ref/_.mtree -f Tmp/$m/$d/_.mtree \ + > HTML/$m.$d.mtree.txt - sub=`grep -cv '^ ' < HTML/$m.$d.mtree.txt` - add=`grep -c '^ ' < HTML/$m.$d.mtree.txt` - echo "" >> $H - echo "" >> $H + grep '^[^ ]' \ + HTML/$m.$d.mtree.txt > HTML/$m.$d.sub.txt + grep '^ [^ ]' \ + HTML/$m.$d.mtree.txt > HTML/$m.$d.add.txt + sed ' + /^ [^ ]/d + /^[^ ]/d + / file$/d + / dir$/d + / link$/d + ' HTML/$m.$d.mtree.txt > HTML/$m.$d.chg.txt + + rm -f HTML/$m.$d.mtree.txt + + sub=`wc -l < HTML/$m.$d.sub.txt` + add=`wc -l < HTML/$m.$d.add.txt` + chg=`wc -l < HTML/$m.$d.chg.txt` + chg=`expr $chg / 2` + if [ $add -eq 0 ] ; then + echo "" >> $H + rm -f HTML/$m.$d.add.txt + else + echo "" >> $H + fi + if [ $sub -eq 0 ] ; then + echo "" >> $H + rm -f HTML/$m.$d.sub.txt + else + echo "" >> $H + fi + if [ $chg -eq 0 ] ; then + echo "" >> $H + rm -f HTML/$m.$d.chg.txt + else + echo "" >> $H + fi done echo "" >> $H @@ -81,5 +145,5 @@ done echo "
Build option surveyBuild option survey
make.confInstallWorldBuildWorldBuild + InstallWorldBuildWorldInstallWorldBuild + InstallWorld
Blocks DeltaFilesFiles Blocks DeltaFilesFiles Blocks DeltaFilesFiles
[empty]$ref_blk$ref_blk$ref_blk
" >> $H cat Tmp/$m/iw/make.conf >> $H echo "------------------$blk`expr $blk - $ref_blk`+$add-$sub+$add+$add-$sub-$sub*$chg*$chg
" >> ${H} echo "" >> ${H} -scp -r HTML phk@critter:/tmp +#scp -r HTML phk@critter:/tmp #scp -r HTML phk@phk:www/misc/kernel_options