mirror of
https://review.haiku-os.org/buildtools
synced 2025-01-31 18:44:48 +01:00
88896a1144
Change-Id: I42dc2a783b3e0082a7583cc7ecaa6b043ba162f4 Reviewed-on: https://review.haiku-os.org/c/buildtools/+/3021 Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
31 lines
960 B
Bash
Executable File
31 lines
960 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# Copyright 2016-2020 Free Software Foundation, Inc.
|
|
# This script is free software; the Free Software Foundation
|
|
# gives unlimited permission to copy and/or distribute it,
|
|
# with or without modifications, as long as this notice is preserved.
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
|
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
|
# PARTICULAR PURPOSE.
|
|
|
|
# ck-clz_tab can be run from the tools directory
|
|
dir=`pwd`
|
|
[ -d src ] || [ "`basename \"$dir\"`" != tools ] || cd ..
|
|
|
|
size1=`sed -n 's/^extern .* __clz_tab\[\([0-9]\+\)\].*/\1/p' \
|
|
src/mpfr-longlong.h`
|
|
|
|
size2=`sed -n 's/^.* __clz_tab\[\([0-9]\+\)\].*/\1/p' \
|
|
src/mp_clz_tab.c`
|
|
|
|
if [ -n "$size1" ] && [ -n "$size2" ] && [ "$size1" != "$size2" ]; then
|
|
cat >&2 <<EOF
|
|
The __clz_tab sizes do not match.
|
|
mpfr-longlong.h $size1
|
|
mp_clz_tab.c $size2
|
|
EOF
|
|
exit 1
|
|
fi
|