About a remaining shell hack.

M.Canales.es macana at macana-es.com
Tue Feb 27 10:49:13 PST 2007


El Sábado, 17 de Febrero de 2007 00:02, M.Canales.es escribió:

>
> ifeq ($(shell ls /bin/bash),/bin/bash)
>   SHELL = /bin/bash
> else
>   SHELL = /tools/bin/bash
> endif
>

After notice that that test don't work as expected when resuming a failed 
build, due /bin/bash may has been already installed into the chroot  at that 
point, I found a more simple solution.

In the Makefile header only 

SHELL = /bin/bash

is required to can handle host that have a /bin/sh symlink that don't point 
to /bin/bash.

Then, to supply make with the working shell expected by the books when 
entering to the chroot, just adding

CHROOT:  SHELL=/tools/bin/bash

do the work.

Simple, nice, and don't mess the SHELL used by make sub-process :-)
 

-- 
Manuel Canales Esparcia
Usuario de LFS nº2886:       http://www.linuxfromscratch.org
LFS en castellano: http://www.escomposlinux.org/lfs-es http://www.lfs-es.info
TLDP-ES:                           http://es.tldp.org



More information about the alfs-discuss mailing list