#!/bin/bash set -o errexit # First argument of this script is the package name. # Remaining arguments are additional configure options. PACKAGE=${1} shift CONFIGURE_OPTS=${*} # Reading system configuration informations, functions and package versions. source ${SCRDIR}/../sysinfos source ${SCRDIR}/../functions source ${SCRDIR}/../packages-list suf=$(get_pkg_name ${PACKAGE}) for scrtype in configure.pre build; do myscr=${SCRDIR}/${scrtype}.${suf} if [ -f ${myscr} ]; then source ${myscr} fi done cd ${LFS_TMP}/${PACKAGE}-build # Execute pre-configure function if applicable if function_exists configure_pre ; then echo "Running configure pre-script" configure_pre fi CC="${CC} ${CLFS_BUILDFLAGS}" CXX="${CXX} ${CLFS_BUILDFLAGS}" \ ../${PACKAGE}/configure \ --prefix=/tools \ --build=${CLFS_HOST} \ --host=${CLFS_TARGET} \ ${CONFIGURE_OPTS} if function_exists build_custom ; then # Execute custom build function if applicable echo "Running custom build function" build_custom else # Standard build ${HVMAKE} ${HVMAKE} install fi exit $?