[lfs-support] LFS 7.2 GCC pass 1

Bruce Dubbs bruce.dubbs at gmail.com
Wed Sep 5 12:54:43 PDT 2012


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





More information about the lfs-support mailing list