Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Dec 1999 10:30:49 +0100
From:      Martin Cracauer <cracauer@cons.org>
To:        Marcel Moolenaar <marcel@scc.nl>
Cc:        current@FreeBSD.ORG
Subject:   Re: Broken sh(1)?
Message-ID:  <19991215103049.A60044@cons.org>
In-Reply-To: <38564693.EE9DB4EC@scc.nl>; from Marcel Moolenaar on Tue, Dec 14, 1999 at 02:30:59PM %2B0100
References:  <38564693.EE9DB4EC@scc.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
In <38564693.EE9DB4EC@scc.nl>, Marcel Moolenaar wrote: 
> Hi,
> 
> Try the following shell script (taken from a buildworld):
> 
> #!/bin/sh -ev
> cd /usr/src; MAKEOBJDIRPREFIX=/usr/obj/usr/src/i386 \
> PATH=/usr/obj/usr/src/i386/bin:/usr/obj/usr/src/i386/usr/bin:\
> /usr/obj/usr/src/i386/usr/games:/sbin:/bin:/usr/sbin:/usr/bin:\
> /usr/games:/usr/local/bin:/usr/X11R6/bin:/home/marcel/bin \
> INSTALL="sh /usr/src/tools/install.sh" \
> DESTDIR=/usr/obj/usr/src/i386 TARGET_ARCH=i386 \
> MACHINE_ARCH=i386 make -f Makefile.inc1 -DNOMAN -DNOINFO \
> -DNO_FORTRAN -DNO_GDB tools
> cd /usr/src; make -f Makefile.inc1 par-obj

You mix up variable settings for just one command vs. permanent ones;

export VAR=foo
VAR=bar sh -c 'echo $VAR'
echo $VAR
==>
bar
foo

This is correct, the second line's variable settings only affect the
command behind it. The next command will have the original value
restored. 

 
> I always get the following:
> 
> ===> c++filt
> sh /usr/src/tools/install.sh -c -s -o root -g wheel -m 555 \
> c++filt /usr/obj/usr/src/i386/usr/libexec/elf
> ===> doc
> ===> cc1obj
> sh /usr/src/tools/install.sh -c -s -o root -g wheel -m 555 \
> cc1obj /usr/obj/usr/src/i386/usr/libexec
> 
> cd /usr/src; make -f Makefile.inc1 par-obj
> ./x.sh: make: not found
> 
>         ^^^^^^^^^^^^^^^
> At this point PATH contains /usr/bin, so I don't think it's PATH
> related. 

No, $PATH is restored to what is was before the first make command.
 
Martin
-- 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Martin Cracauer <cracauer@cons.org> http://www.cons.org/cracauer/
BSD User Group Hamburg, Germany     http://www.bsdhh.org/


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19991215103049.A60044>