lfs-buildscripts/CH8Build/CH08.12-bc.sh

41 lines
594 B
Bash
Raw Normal View History

2024-10-04 17:51:59 +08:00
#!/bin/bash
source versions.sh
GLSOURCES="/sources"
2024-10-09 02:37:48 +08:00
pushd ${GLSOURCES} > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
2024-10-04 17:51:59 +08:00
[ -d bc-${bc_version} ] && rm -rf bc-${bc_version}
tar -Jxf ${bc_tarball}
cd bc-${bc_version}
2024-10-04 18:51:03 +08:00
CC=gcc ./configure --prefix=/usr -G -O3 -r
2024-10-04 17:51:59 +08:00
make
if [ $? -ne 0 ]; then
myfail "Failed building bc"
fi
2024-10-09 02:37:48 +08:00
if [ ! -f ${GLSOURCES}/SKIPTESTS ]; then
echo "running bc make test"
make test > ${GLSOURCES}/bc.check.log 2>&1
fi
2024-10-04 17:51:59 +08:00
make install
if [ $? -ne 0 ]; then
myfail "Failed installing bc"
fi
2024-10-08 12:28:55 +08:00
popd
# cleanup
pushd $GLSOURCES
rm -rf bc-${bc_version}
popd