lfs-buildscripts/CH8Build/CH08.19-gmp.sh

52 lines
842 B
Bash
Raw Normal View History

2024-10-04 21:47:51 +08:00
#!/bin/bash
source versions.sh
GLSOURCES="/sources"
pushd $GLSOURCES > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
[ -d gmp-${gmp_version} ] && rm -rf gmp-${gmp_version}
tar -Jxf ${gmp_tarball}
cd gmp-${gmp_version}
./configure --prefix=/usr \
--enable-cxx \
--disable-static \
--docdir=/usr/share/doc/gmp-${gmp_version} \
--host=none-linux-gnu
make
if [ $? -ne 0 ]; then
myfail "Failed building gmp"
fi
make html
if [ $? -ne 0 ]; then
myfail "Failed building gmp html"
fi
echo "running gmp make check"
make check > ${GLSOURCES}/gmp.check 2>&1
make install
if [ $? -ne 0 ]; then
myfail "Failed installing gmp"
fi
make install-html
if [ $? -ne 0 ]; then
myfail "Failed installing gmp html"
fi
2024-10-08 12:28:55 +08:00
popd
2024-10-04 21:47:51 +08:00
2024-10-08 12:28:55 +08:00
# cleanup
pushd $GLSOURCES
rm -rf gmp-${gmp_version}
popd