[lfs-support] LFS 7.2 GCC pass 1

Baho Utot baho-utot at columbus.rr.com
Wed Sep 5 13:04:37 PDT 2012


On 09/05/2012 03:54 PM, Bruce Dubbs wrote:
> Baho Utot wrote:
>
>> #!/bin/bash
>> set -o errexit    # exit if error
>> set -o nounset    # exit if variable not initalized
>> set +h        # disable hashall
>> shopt -s -o pipefail
>> pkgname=<package name>
>> pkgver=<package version>
>> srcname="${pkgname}-${pkgver}.tar.gz"
>> srcdir=${pkgname}-${pkgver}
>> startdir=$(pwd)
>>
>> function unpack() {
>>        tar xf ${srcname}
>> }
>>
>> function clean() {
>>        rm -rf ${srcdir}
>> }
>>
>> function build() {
>>        # cut and paste here from the book
>>        ./configure --prefix=/tools
>>        make
>>        make -j1 install
>> }
>>
>> clean;unpack;pushd ${srcdir};build;popd;clean
> As a minimum, I'd add && after ./configure and the first make.
>
> There's a little more that can go wrong too.  The directory name is not
> always ${srcdir}, so each package needs some customization.
>
> I still feel that for most people, a manual build is useful.  For an
> experienced user like yourself, perhaps not so much.
>
>     -- Bruce
>
>
I have it wrapped in a calling script that does a

trap 'echo Tool chain build failed...;touch /tools/FAILURE;exit 1' ERR

so if something fails this will catch it and won't let it continue.




More information about the lfs-support mailing list