head 1.6;
access;
symbols
RELENG_9_1_0_RELEASE:1.5.16.1.4.2
RELENG_9_1:1.5.16.1.0.4
RELENG_9_1_BP:1.5.16.1
RELENG_8_3_0_RELEASE:1.5.10.1.8.1
RELENG_8_3:1.5.10.1.0.8
RELENG_8_3_BP:1.5.10.1
RELENG_9_0_0_RELEASE:1.5.16.1.2.1
RELENG_9_0:1.5.16.1.0.2
RELENG_9_0_BP:1.5.16.1
RELENG_9:1.5.0.16
RELENG_9_BP:1.5
RELENG_7_4_0_RELEASE:1.5.14.1
RELENG_8_2_0_RELEASE:1.5.10.1.6.1
RELENG_7_4:1.5.0.14
RELENG_7_4_BP:1.5
RELENG_8_2:1.5.10.1.0.6
RELENG_8_2_BP:1.5.10.1
RELENG_8_1_0_RELEASE:1.5.10.1.4.1
RELENG_8_1:1.5.10.1.0.4
RELENG_8_1_BP:1.5.10.1
RELENG_7_3_0_RELEASE:1.5.12.1
RELENG_7_3:1.5.0.12
RELENG_7_3_BP:1.5
RELENG_8_0_0_RELEASE:1.5.10.1.2.1
RELENG_8_0:1.5.10.1.0.2
RELENG_8_0_BP:1.5.10.1
RELENG_8:1.5.0.10
RELENG_8_BP:1.5
RELENG_7_2_0_RELEASE:1.5.8.1
RELENG_7_2:1.5.0.8
RELENG_7_2_BP:1.5
RELENG_7_1_0_RELEASE:1.5.6.1
RELENG_7_1:1.5.0.6
RELENG_7_1_BP:1.5
RELENG_7_0_0_RELEASE:1.5
RELENG_7_0:1.5.0.4
RELENG_7_0_BP:1.5
RELENG_7:1.5.0.2
RELENG_7_BP:1.5;
locks; strict;
comment @# @;
1.6
date 2012.11.17.01.54.08; author svnexp; state Exp;
branches;
next 1.5;
1.5
date 2006.03.25.21.51.46; author phk; state Exp;
branches
1.5.2.1
1.5.6.1
1.5.8.1
1.5.10.1
1.5.12.1
1.5.14.1
1.5.16.1;
next 1.4;
1.4
date 2006.03.25.10.50.40; author phk; state Exp;
branches;
next 1.3;
1.3
date 2005.08.09.09.27.11; author phk; state Exp;
branches;
next 1.2;
1.2
date 2005.07.31.15.42.25; author phk; state Exp;
branches;
next 1.1;
1.1
date 2005.07.31.14.16.13; author phk; state Exp;
branches;
next ;
1.5.2.1
date 2012.11.17.08.08.13; author svnexp; state Exp;
branches;
next ;
1.5.6.1
date 2008.11.25.02.59.29; author kensmith; state Exp;
branches;
next ;
1.5.8.1
date 2009.04.15.03.14.26; author kensmith; state Exp;
branches;
next ;
1.5.10.1
date 2009.08.03.08.13.06; author kensmith; state Exp;
branches
1.5.10.1.2.1
1.5.10.1.4.1
1.5.10.1.6.1
1.5.10.1.8.1;
next 1.5.10.2;
1.5.10.2
date 2012.11.17.10.37.13; author svnexp; state Exp;
branches;
next ;
1.5.10.1.2.1
date 2009.10.25.01.10.29; author kensmith; state Exp;
branches;
next ;
1.5.10.1.4.1
date 2010.06.14.02.09.06; author kensmith; state Exp;
branches;
next ;
1.5.10.1.6.1
date 2010.12.21.17.09.25; author kensmith; state Exp;
branches;
next ;
1.5.10.1.8.1
date 2012.03.03.06.15.13; author kensmith; state Exp;
branches;
next 1.5.10.1.8.2;
1.5.10.1.8.2
date 2012.11.17.08.25.47; author svnexp; state Exp;
branches;
next ;
1.5.12.1
date 2010.02.10.00.26.20; author kensmith; state Exp;
branches;
next ;
1.5.14.1
date 2010.12.21.17.10.29; author kensmith; state Exp;
branches;
next 1.5.14.2;
1.5.14.2
date 2012.11.17.08.17.40; author svnexp; state Exp;
branches;
next ;
1.5.16.1
date 2011.09.23.00.51.37; author kensmith; state Exp;
branches
1.5.16.1.2.1
1.5.16.1.4.1;
next 1.5.16.2;
1.5.16.2
date 2012.11.17.11.37.35; author svnexp; state Exp;
branches;
next ;
1.5.16.1.2.1
date 2011.11.11.04.20.22; author kensmith; state Exp;
branches;
next 1.5.16.1.2.2;
1.5.16.1.2.2
date 2012.11.17.08.37.31; author svnexp; state Exp;
branches;
next ;
1.5.16.1.4.1
date 2012.08.05.23.54.33; author kensmith; state Exp;
branches;
next 1.5.16.1.4.2;
1.5.16.1.4.2
date 2012.11.17.08.48.23; author svnexp; state Exp;
branches;
next ;
desc
@@
1.6
log
@Switching exporter and resync
@
text
@#!/bin/sh
# This file is in the public domain
# $FreeBSD: head/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 "
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 "src.conf | " >> $H
echo "MK_FOO | " >> $H
echo " | " >> $H
echo "BuildWorld | " >> $H
echo " | " >> $H
echo "InstallWorld | " >> $H
echo " | " >> $H
echo "World | " >> $H
echo "
" >> $H
echo "" >> $H
for i in bw iw w
do
echo "A | " >> $H
echo "D | " >> $H
echo "C | " >> $H
echo "KB | " >> $H
echo "Delta | " >> $H
done
echo "
" >> $H
majcol ( ) (
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
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 "
" >> $H
done
echo "
" >> $H
echo '
How to read this table
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
' >> $H
echo '
' >> $H
echo "" >> $H
echo "rsync phk"
rsync -r $HDIR/. phk@@phk:www/misc/build_options
@
1.5
log
@Get the MK_FOO column right
@
text
@d3 1
a3 1
# $FreeBSD$
@
1.5.2.1
log
@Switch importer
@
text
@d3 1
a3 1
# $FreeBSD: stable/7/tools/tools/build_option_survey/mkhtml.sh 157132 2006-03-25 21:51:46Z phk $
@
1.5.16.1
log
@SVN rev 225736 on 2011-09-23 00:51:37Z by kensmith
Copy head to stable/9 as part of 9.0-RELEASE release cycle.
Approved by: re (implicit)
@
text
@@
1.5.16.2
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242902
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242902 | dteske | 2012-11-11 23:29:45 +0000 (Sun, 11 Nov 2012) | 10 lines
## SVN ##
## SVN ## Fix a regression introduced by SVN r211417 that saw the breakage of a feature
## SVN ## documented in usr.sbin/sysinstall/help/shortcuts.hlp (reproduced below):
## SVN ##
## SVN ## If /usr/sbin/sysinstall is linked to another filename, say
## SVN ## `/usr/local/bin/configPackages', then the basename will be used
## SVN ## as an implicit command name.
## SVN ##
## SVN ## Reviewed by: adrian (co-mentor)
## SVN ## Approved by: adrian (co-mentor)
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d3 1
a3 1
# $FreeBSD: stable/9/tools/tools/build_option_survey/mkhtml.sh 157132 2006-03-25 21:51:46Z phk $
@
1.5.16.1.4.1
log
@SVN rev 239080 on 2012-08-05 23:54:33Z by kensmith
Copy stable/9 to releng/9.1 as part of the 9.1-RELEASE release process.
Approved by: re (implicit)
@
text
@@
1.5.16.1.4.2
log
@Switch importer
@
text
@d3 1
a3 1
# $FreeBSD: releng/9.1/tools/tools/build_option_survey/mkhtml.sh 157132 2006-03-25 21:51:46Z phk $
@
1.5.16.1.2.1
log
@SVN rev 227445 on 2011-11-11 04:20:22Z by kensmith
Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
cycle.
Approved by: re (implicit)
@
text
@@
1.5.16.1.2.2
log
@Switch importer
@
text
@d3 1
a3 1
# $FreeBSD: releng/9.0/tools/tools/build_option_survey/mkhtml.sh 157132 2006-03-25 21:51:46Z phk $
@
1.5.14.1
log
@SVN rev 216618 on 2010-12-21 17:10:29Z by kensmith
Copy stable/7 to releng/7.4 in preparation for FreeBSD-7.4 release.
Approved by: re (implicit)
@
text
@@
1.5.14.2
log
@Switch importer
@
text
@d3 1
a3 1
# $FreeBSD: releng/7.4/tools/tools/build_option_survey/mkhtml.sh 157132 2006-03-25 21:51:46Z phk $
@
1.5.12.1
log
@SVN rev 203736 on 2010-02-10 00:26:20Z by kensmith
Copy stable/7 to releng/7.3 as part of the 7.3-RELEASE process.
Approved by: re (implicit)
@
text
@@
1.5.10.1
log
@SVN rev 196045 on 2009-08-03 08:13:06Z by kensmith
Copy head to stable/8 as part of 8.0 Release cycle.
Approved by: re (Implicit)
@
text
@@
1.5.10.2
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242909
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242909 | dim | 2012-11-12 07:47:19 +0000 (Mon, 12 Nov 2012) | 20 lines
## SVN ##
## SVN ## MFC r242625:
## SVN ##
## SVN ## Remove duplicate const specifiers in many drivers (I hope I got all of
## SVN ## them, please let me know if not). Most of these are of the form:
## SVN ##
## SVN ## static const struct bzzt_type {
## SVN ## [...list of members...]
## SVN ## } const bzzt_devs[] = {
## SVN ## [...list of initializers...]
## SVN ## };
## SVN ##
## SVN ## The second const is unnecessary, as arrays cannot be modified anyway,
## SVN ## and if the elements are const, the whole thing is const automatically
## SVN ## (e.g. it is placed in .rodata).
## SVN ##
## SVN ## I have verified this does not change the binary output of a full kernel
## SVN ## build (except for build timestamps embedded in the object files).
## SVN ##
## SVN ## Reviewed by: yongari, marius
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d3 1
a3 1
# $FreeBSD: stable/8/tools/tools/build_option_survey/mkhtml.sh 157132 2006-03-25 21:51:46Z phk $
@
1.5.10.1.8.1
log
@SVN rev 232438 on 2012-03-03 06:15:13Z by kensmith
Copy stable/8 to releng/8.3 as part of 8.3-RELEASE release cycle.
Approved by: re (implicit)
@
text
@@
1.5.10.1.8.2
log
@Switch importer
@
text
@d3 1
a3 1
# $FreeBSD: releng/8.3/tools/tools/build_option_survey/mkhtml.sh 157132 2006-03-25 21:51:46Z phk $
@
1.5.10.1.6.1
log
@SVN rev 216617 on 2010-12-21 17:09:25Z by kensmith
Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release.
Approved by: re (implicit)
@
text
@@
1.5.10.1.4.1
log
@SVN rev 209145 on 2010-06-14 02:09:06Z by kensmith
Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.
Approved by: re (implicit)
@
text
@@
1.5.10.1.2.1
log
@SVN rev 198460 on 2009-10-25 01:10:29Z by kensmith
Copy stable/8 to releng/8.0 as part of 8.0-RELEASE release procedure.
Approved by: re (implicit)
@
text
@@
1.5.8.1
log
@SVN rev 191087 on 2009-04-15 03:14:26Z by kensmith
Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.
Approved by: re (implicit)
@
text
@@
1.5.6.1
log
@SVN rev 185281 on 2008-11-25 02:59:29Z by kensmith
Create releng/7.1 in preparation for moving into RC phase of 7.1 release
cycle.
Approved by: re (implicit)
@
text
@@
1.4
log
@Update build survey scripts
@
text
@d135 2
a136 2
if [ -f $m/w/_.sc ] ; then
comm -13 ${RDIR}/Ref/_.sc $m/w/_.sc >> $H
@
1.3
log
@Update to latest version of this tool.
Takes about a week for a full run.
@
text
@d5 1
a5 1
set -e
d9 1
a9 7
if [ "x$1" != "x" ] ; then
OPLIST=$1
else
OPLIST=no_list
fi
OPLIST=_.options
d59 1
a59 1
cp $3/R*.txt $HDIR/$4 || true
d67 14
a80 2
echo "" > $H
echo "" >> $H
d82 1
a82 6
echo "" >> $H
echo "make.conf | " >> $H
echo "Ref | " >> $H
echo "Ref | " >> $H
echo "Ref | " >> $H
echo "
" >> $H
d85 3
d89 1
d91 1
d106 13
a118 1
grep -v '^[ ]*#' $OPLIST | while read o
d120 1
a120 1
md=`echo "$o=/dev/YES" | md5`
d128 1
d132 1
a132 1
cat $m/make.conf >> $H
d134 3
a136 14
if [ -f $m/bw/_.bw ] ; then
echo "failed | " >> $H
else
table_td R BW $m $md >> $H
fi
if [ -f $m/iw/_.iw ] ; then
echo "failed | " >> $H
else
table_td R IW $m $md >> $H
fi
if [ -f $m/w/_.iw -o -f $m/bw/_.bw ] ; then
echo "failed | " >> $H
else
table_td R W $m $md >> $H
d138 5
d146 75
d223 1
a223 1
rsync -r $HDIR/. phk@@critter:/tmp/HTML
@
1.2
log
@Add stuff to HTML output.
@
text
@d5 1
a5 2
rm -rf HTML
mkdir -p HTML
d7 1
a7 1
ref_blk=`awk 'NR == 2 {print $3}' Tmp/Ref/_.df`
d9 73
a81 1
echo $ref_blk
d83 4
a86 67
H=HTML/index.html
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 '
Build option survey |
make.conf |
BuildWorld |
InstallWorld |
Build + InstallWorld |
Blocks |
Delta |
Files |
Blocks |
Delta |
Files |
Blocks |
Delta |
Files |
' >> $H
echo '[empty] | ' >> $H
echo "$ref_blk | " >> $H
echo " | | | | " >> $H
echo "$ref_blk | " >> $H
echo " | | | | " >> $H
echo "$ref_blk | " >> $H
echo " | | | | " >> $H
d89 2
a90 1
grep -v '#' no_list | while read o
d92 19
a110 2
echo "# $o"
m=`echo "$o=YES" | md5`
d112 18
a129 57
echo "" >> $H
cat Tmp/$m/iw/make.conf >> $H
echo " | " >> $H
for d in bw iw w
do
if [ ! -d Tmp/$m/$d ] ; then
echo "- | - | - | - | - | " >> $H
continue
fi
if [ ! -f Tmp/$m/$d/_.df ] ; then
echo "- | - | - | - | - | " >> $H
continue
fi
blk=`awk 'NR == 2 {print $3}' Tmp/$m/$d/_.df`
echo "$blk | " >> $H
echo "`expr $blk - $ref_blk` | " >> $H
mtree -f Tmp/Ref/_.mtree -f Tmp/$m/$d/_.mtree \
> HTML/$m.$d.mtree.txt
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 "+$add | " >> $H
rm -f HTML/$m.$d.add.txt
else
echo "+$add | " >> $H
fi
if [ $sub -eq 0 ] ; then
echo "-$sub | " >> $H
rm -f HTML/$m.$d.sub.txt
else
echo "-$sub | " >> $H
fi
if [ $chg -eq 0 ] ; then
echo "*$chg | " >> $H
rm -f HTML/$m.$d.chg.txt
else
echo "*$chg | " >> $H
fi
done
d132 2
a133 2
echo "
" >> ${H}
echo "" >> ${H}
d135 2
a136 2
#scp -r HTML phk@@critter:/tmp
#scp -r HTML phk@@phk:www/misc/kernel_options
@
1.1
log
@The beginnings of a tool to survey the build options (NO_THIS, NO_THAT etc)
for effect.
@
text
@d13 30
a42 1
echo "" > ${H}
d44 2
d50 1
a50 1
Build option survey |
d55 3
a57 3
InstallWorld |
BuildWorld |
Build + InstallWorld |
d63 1
a63 1
Files |
d66 1
a66 1
Files |
d69 1
a69 1
Files |
d74 1
a74 1
echo " | | | " >> $H
d76 1
a76 1
echo " | | | " >> $H
d78 1
a78 1
echo " | | | " >> $H
d81 1
a81 1
cat no_list | while read o
d83 1
d89 1
a89 1
for d in iw bw w
d92 1
a92 1
echo "- | - | - | - | " >> $H
d96 1
a96 1
echo "- | - | - | - | " >> $H
d102 2
a103 2
mtree -f Tmp/Ref/_.mtree -f Tmp/$m/$d/_.mtree |
sed '/^ /d' > HTML/$m.$d.mtree.txt
d105 36
a140 4
sub=`grep -cv '^ ' < HTML/$m.$d.mtree.txt`
add=`grep -c '^ ' < HTML/$m.$d.mtree.txt`
echo "+$add | " >> $H
echo "-$sub | " >> $H
d148 1
a148 1
scp -r HTML phk@@critter:/tmp
@