2018-05-04 20:35:10 +00:00
|
|
|
#/usr/bin/env sh
|
|
|
|
set -e
|
|
|
|
|
2019-10-04 17:12:22 +00:00
|
|
|
|
|
|
|
make="make -C $lz4_root"
|
2019-10-07 15:12:42 +00:00
|
|
|
unamestr=$(uname)
|
2019-10-04 17:12:22 +00:00
|
|
|
if [ "$unamestr" = 'Linux' ]; then
|
|
|
|
make="make -C $lz4_root"
|
2020-05-30 05:36:22 +00:00
|
|
|
elif [ "$unamestr" = 'FreeBSD' -o "$unamestr" = 'OpenBSD' ]; then
|
2019-10-04 17:12:22 +00:00
|
|
|
make="gmake -C $lz4_root"
|
|
|
|
fi
|
|
|
|
|
2018-05-04 20:35:10 +00:00
|
|
|
for cmd in install uninstall; do
|
|
|
|
for upper in DUMMY PREFIX EXEC_PREFIX LIBDIR INCLUDEDIR PKGCONFIGDIR BINDIR MANDIR MAN1DIR ; do
|
|
|
|
lower=$(echo $upper | tr '[:upper:]' '[:lower:]')
|
|
|
|
tmp_lower="$(pwd)/tmp-lower-$lower/"
|
|
|
|
tmp_upper="$(pwd)/tmp-upper-$lower/"
|
|
|
|
echo $make $cmd DESTDIR="$tmp_upper" $upper="test"
|
|
|
|
$make $cmd DESTDIR="$tmp_upper" $upper="test" >/dev/null
|
|
|
|
echo $make $cmd DESTDIR="$tmp_lower" $lower="test"
|
|
|
|
$make $cmd DESTDIR="$tmp_lower" $lower="test" >/dev/null
|
|
|
|
command diff -r "$tmp_lower" "$tmp_upper" && echo "SAME!" || false
|
|
|
|
if [ "x$cmd" = "xuninstall" ]; then
|
|
|
|
test -z "$(find "$tmp_lower" -type f)" && echo "EMPTY!" || false
|
|
|
|
rm -rf "$tmp_upper" "$tmp_lower"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
done
|