[dslinux-devel] bash instead of sh in Makefile.xsh

Stefan Sperling stsp at stsp.name
Thu Jun 7 02:07:20 CEST 2007

On Wed, Jun 06, 2007 at 07:22:23PM +0200, Luis Javier Merino wrote:
> > if $SHELL is bash, the PS1 part won't do anything without the --posix
> > part. If we add --posix and $SHELL does not like it, the makefile will
> > fail.
> Correct me if I'm wrong, but the PS1 part will do its thingie even
> withouth --posix, only PS1 will be set again by your system/user
> startup scripts.

Yes, I guess this is the problem.

I can reproduce this. If I set PS1 to "% " in my .basrc I get
the following (with my patch applied):

[stsp at ted ~/dslinux/src]$ vim ~/.bashrc
<edit file adding export statement for PS1>

[stsp at ted ~/dslinux/src]$ echo $SHELL
[stsp at ted ~/dslinux/src]$ grep "^export PS1" ~/.bashrc 
export PS1="% "
[stsp at ted ~/dslinux/src]$ gmake xsh
gmake[1]: Entering directory `/home/stsp/dslinux/src'
Spawning cross-compilation shell. Happy hacking! :-)
Type exit to get out of here
It is suitable only for porting applications and libraries.
------ Environment: ----------------------------------------------------
CC       =   ucfront-gcc arm-linux-elf-gcc 
CFLAGS   =   -O2 -g -fomit-frame-pointer -fno-common -fno-builtin -Wall  -mswp-byte-writes -DCONFIG_NDS_ROM8BIT -mcpu=arm946e-s -mfpu=fpe3 -DEMBED -D__PIC__ -fpic -msingle-pic-base -Dlinux -D__linux__ -Dunix -D__uClinux__
LD       =   arm-linux-elf-ld
LDFLAGS  =   -Wl,-elf2flt -D__PIC__ -fpic -msingle-pic-base -mswp-byte-writes
Remember to put the toolchain binaries in your PATH!
% exit
gmake[1]: Leaving directory `/home/stsp/dslinux/src'
[stsp at ted ~/dslinux/src]$ 

I don't know what's the best way to deal with this.
We shouldn't try to make our Makefiles work around everyone's
shell startup files.

The problem can be fixed locally by either symlinking /bin/sh to bash,
applying the patch I suggested and modifying PS1 in ~/.bash_profile
instead of ~/.bashrc, or simply editing Makefile.xsh to make it do
whatever you want it to do - subversion will not overwrite local changes
on updates.

http://stsp.name                                         PGP Key: 0xF59D25F0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://mailman.dslinux.in-berlin.de/pipermail/dslinux-devel-dslinux.in-berlin.de/attachments/20070607/f4ef4528/attachment.pgp 

More information about the dslinux-devel mailing list