#!/bin/sh # This file is in the public domain # $FreeBSD: stable/11/tools/tools/build_option_survey/mkhtml.sh 157132 2006-03-25 21:51:46Z phk $ set -e sh reduce.sh OPLIST=`sh listallopts.sh` ODIR=/usr/obj/`pwd` RDIR=${ODIR}/_.result export ODIR RDIR table_td () ( awk -v R=$1 -v T=$2 -v M=$4 ' BEGIN { t= R "-" T } $1 == t { if ($3 == 0 && $5 == 0 && $7 == 0) { printf "
src.conf | " >> $H echo "MK_FOO | " >> $H echo "" >> $H echo " | BuildWorld | " >> $H echo "" >> $H echo " | InstallWorld | " >> $H echo "" >> $H echo " | World | " >> $H echo "||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | " >> $H echo "D | " >> $H echo "C | " >> $H echo "KB | " >> $H echo "Delta | " >> $H done echo "" >> $H if [ ! -f $3/$1/done ] ; then echo " | no data yet | " >> $H elif [ -f $3/$1/_.success ] ; then table_td $2 $1 $3 $4 >> $H else echo "failed | " >> $H fi ) for o in $OPLIST do md=`echo "${o}=foo" | md5` m=${RDIR}/$md if [ ! -d $m ] ; then continue fi if [ ! -f $m/stats ] ; then continue fi echo "=== mkhtml ${d}_${o}" echo "||||||||||||
" >> $H cat $m/src.conf >> $H echo " | " >> $H
echo "" >> $H if [ -f $m/bw/_.sc ] ; then comm -13 ${RDIR}/Ref/_.sc $m/bw/_.sc >> $H fi echo " | " >> $H
majcol bw r $m $md
majcol iw r $m $md
majcol w r $m $md
echo "
The table has five major columns.
src.conf
The name of the option being tested
All options are tested both in their WITH_FOO and WITHOUT_FOO variants but if the option has no effect (ie: is the default) it will not appear in the table
MK_FOO
Internal build flags affected by this option
Buildworld
What happens when the option is given to buildworld but not installworld
Ie: make buildworld WITH_FOO=yes make installworld
Installworld
What happens when the option is given to installworld but not buildworld
Ie: make buildworld make installworld WITH_FOO=yes
World
What happens when the option is given to both buildworld and installworld
Ie: make buildworld WITH_FOO=yes make installworld WITH_FOO=yes
Inside each of the last three major columns there are five subcolumns
A
Number of added files/directories (relative to the option not be given
If non-zero, the number links to a list of the added files/directories
D
Number of deleted files/directories (relative to the option not be given
If non-zero, the number links to a list of the files not installed files/directories
C
Number of changed files/directories (relative to the option not be given
If non-zero, the number links to a list of the files/directories which are differnet (two lines each)
KB
Size of installed operating system in kilobytes
Delta
Size change in kilobytes relative to the option not be given