Changeset View
Changeset View
Standalone View
Standalone View
autogen.sh
Show First 20 Lines • Show All 165 Lines • ▼ Show 20 Lines | case "$1" in | ||||
--build-amd64) | --build-amd64) | ||||
myhost="amd64" | myhost="amd64" | ||||
shift | shift | ||||
;; | ;; | ||||
--build*) | --build*) | ||||
fatal "**Error**: invalid build option $1" | fatal "**Error**: invalid build option $1" | ||||
shift | shift | ||||
;; | ;; | ||||
--coverage) | |||||
myhost="coverage" | |||||
shift | |||||
;; | |||||
--report) | |||||
myhost="report" | |||||
shift | |||||
;; | |||||
*) | *) | ||||
;; | ;; | ||||
esac | esac | ||||
die_p | die_p | ||||
# Source our configuration | # Source our configuration | ||||
if [ -f "${tsdir}/autogen.rc" ]; then | if [ -f "${tsdir}/autogen.rc" ]; then | ||||
▲ Show 20 Lines • Show All 52 Lines • ▼ Show 20 Lines | else | ||||
rvd="0" | rvd="0" | ||||
fi | fi | ||||
echo "$package-$vers$tmp:$beta:$ingit:$vers$tmp:$vers:$tmp:$rev:$rvd:" | echo "$package-$vers$tmp:$beta:$ingit:$vers$tmp:$vers:$tmp:$rev:$rvd:" | ||||
exit 0 | exit 0 | ||||
fi | fi | ||||
# **** end FIND VERSION **** | # **** end FIND VERSION **** | ||||
# **** COVERAGE **** | |||||
# This is a helper for the code coverage collection | |||||
# Called | |||||
# ./autogen.sh --coverage lcov gcov [dirs...] | |||||
if [ "$myhost" = "coverage" ]; then | |||||
LCOV="$1" | |||||
GCOV="$2" | |||||
BASE=`realpath "$3"` | |||||
COVINFO="" | |||||
shift 3 | |||||
while [ x"$1" != "x" ]; do | |||||
P="$1" | |||||
$LCOV --gcov-tool $GCOV \ | |||||
--base-directory "$BASE"/"$P" \ | |||||
--directory "$P" \ | |||||
--output-file coverage.info.`basename "$P"` \ | |||||
--capture --no-checksum --compat-libtool \ | |||||
--rc lcov_branch_coverage=1 | |||||
COVINFO="$COVINFO -a coverage.info."`basename "$P"` | |||||
shift | |||||
done | |||||
$LCOV $COVINFO --base-directory "$BASE" --output-file coverage.info \ | |||||
--no-checksum \ | |||||
--rc lcov_branch_coverage=1 | |||||
exit 0 | |||||
fi | |||||
# **** end COVERAGE **** | |||||
# **** COVERAGE_REPORT **** | |||||
# This is a helper for the code coverage report | |||||
# Called | |||||
# ./autogen.sh --report lcov genhtml [exclude...] | |||||
if [ "$myhost" = "report" ]; then | |||||
LCOV="$1" | |||||
GENHTML="$2" | |||||
shift 2 | |||||
while [ x"$1" != "x" ]; do | |||||
P="$1" | |||||
$LCOV --remove coverage.info "$P" -o coverage.info \ | |||||
--rc lcov_branch_coverage=1 | |||||
shift | |||||
done | |||||
LANG=C $GENHTML --output-directory coveragereport --title "Code Coverage" \ | |||||
--legend --show-details coverage.info \ | |||||
--rc lcov_branch_coverage=1 | |||||
exit 0 | |||||
fi | |||||
# **** end COVERAGE_REPORT **** | |||||
if [ ! -f "$tsdir/build-aux/config.guess" ]; then | if [ ! -f "$tsdir/build-aux/config.guess" ]; then | ||||
fatal "$tsdir/build-aux/config.guess not found" | fatal "$tsdir/build-aux/config.guess not found" | ||||
exit 1 | exit 1 | ||||
fi | fi | ||||
build=`$tsdir/build-aux/config.guess` | build=`$tsdir/build-aux/config.guess` | ||||
if [ $PRINT_BUILD = yes ]; then | if [ $PRINT_BUILD = yes ]; then | ||||
echo "$build" | echo "$build" | ||||
▲ Show 20 Lines • Show All 219 Lines • Show Last 20 Lines |