In <[EMAIL PROTECTED]>, 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 <[EMAIL PROTECTED]> http://www.cons.org/cracauer/
BSD User Group Hamburg, Germany http://www.bsdhh.org/
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message