#!/bin/sh
+set -o errexit
# Reading system configuration informations, functions and package versions.
source ../sysinfos
source ../packages-list
# Applying patches (if any)
-apply_patches ${1} &&
+apply_patches ${1}
+
+cd ${LFS_TMP}/${1}
+
+# Bzip2's default Makefile target automatically runs the testsuite as well.
+# Disable the tests since they won't work on a multi-architecture build:
+cp -v Makefile{,.orig}
+sed -e 's@^\(all:.*\) test@\1@g' Makefile.orig > Makefile
# This package doesn't have a configure script...
-cd ${LFS_TMP}/${1} &&
-make -j ${MAKEJOBS} &&
-make PREFIX=/tools install
+${HVMAKE} CC="${CC} ${CLFS_BUILDFLAGS}" AR="${AR}" RANLIB="${RANLIB}"
+${HVMAKE} PREFIX=/tools install
-# Return last error
exit $?