#!/bin/sh # This file is in the public domain # $FreeBSD$ 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 "no effect" } else { if ($3 == 0) { printf "+%d", $3 } else { printf "" printf "+%d", M, t, $3 printf "" } if ($5 == 0) { printf "-%d", $5 } else { printf "" printf "-%d", M, t, $5 printf "" } if ($7 == 0) { printf "*%d", $7 } else { printf "" printf "*%d", M, t, $7 printf "" } printf "%d", $9 printf "%d", -$11 } printf "\n" d = 1 } END { if (d != 1) { printf "" } } ' $3/stats mkdir -p $HDIR/$4 cp $3/r*.txt $HDIR/$4 || true ) HDIR=${ODIR}/HTML rm -rf ${HDIR} mkdir -p ${HDIR} H=${HDIR}/index.html echo ' ' > $H echo ' FreeBSD Build Options Survey ' >> $H echo '

The table is explained at the bottom


' >> $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 for i in bw iw w do echo "" >> $H echo "" >> $H echo "" >> $H echo "" >> $H echo "" >> $H done echo "" >> $H majcol ( ) ( echo "" >> $H if [ ! -f $3/$1/done ] ; then echo "" >> $H elif [ -f $3/$1/_.success ] ; then table_td $2 $1 $3 $4 >> $H else echo "" >> $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 echo "" >> $H echo "" >> $H majcol bw r $m $md majcol iw r $m $md majcol w r $m $md echo "" >> $H done echo "
src.confMK_FOOBuildWorldInstallWorldWorld
ADCKBDelta
no data yetfailed
" >> $H
	cat $m/src.conf >> $H
	echo "
" >> $H
	if [ -f $m/bw/_.sc ] ; then
		comm -13 ${RDIR}/Ref/_.sc $m/bw/_.sc >> $H
	fi
	echo "
" >> $H echo '

How to read this table

The table has five major columns.

  1. 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

  2. MK_FOO

    Internal build flags affected by this option

  3. Buildworld

    What happens when the option is given to buildworld but not installworld

    Ie:
    	make buildworld WITH_FOO=yes
    	make installworld 
    
  4. Installworld

    What happens when the option is given to installworld but not buildworld

    Ie:
    	make buildworld 
    	make installworld WITH_FOO=yes
    
  5. 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

  1. 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

  2. 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

  3. 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)

  4. KB

    Size of installed operating system in kilobytes

  5. Delta

    Size change in kilobytes relative to the option not be given


' >> $H echo '

Valid HTML 4.01 Transitional

' >> $H echo "" >> $H echo "rsync phk" rsync -r $HDIR/. phk@phk:www/misc/build_options