Files
mongo/dist/s_stat
Keith Bostic d3a8060e5b WT-2658 Only include PPC-specific files in PPC builds (#2758)
* WT-2658 Only include PPC-specific files in PPC builds

* Add support for conditional file inclusion by adding a second argument on lines in dist/filelist.  Add a new automake conditional, POWERPC_HOST, set for the various PPC host CPUs.  Change dist/filelist to only compile the checksum/power8 files if POWERPC_HOST is set.

* Merge the Windows and POSIX file lists, use POSIX_HOST and WINDOWS_HOST to mark source files needed for builds on those systems.
2016-06-03 12:54:40 +10:00

34 lines
752 B
Bash
Executable File

#! /bin/sh
# Complain about unused statistics fields.
t=__wt.$$
trap 'rm -f $t; exit 0' 0 1 2 3 13 15
# List of files to search: skip stat.c, it lists all of the fields by
# definition.
l=`sed \
-e '/src\/support\/stat.c/d' \
-e '/^[a-z]/!d' \
-e 's/[ ].*$//' \
-e 's,^,../,' filelist`
l="$l `echo ../src/include/*.i ../src/include/os.h`"
(
# Get the list of statistics fields.
search=`sed \
-e 's/^ int64_t \([a-z_*]*\);$/\1/p' \
-e d ../src/include/stat.h |
sort`
echo "$search"
fgrep -who "$search" $l) | sort | uniq -u > $t
test -s $t && {
echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-="
echo 'unused statistics fields'
echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-="
cat $t
exit 1
}
exit 0