Subject: Re: acorn32 make sets prob
To: Patrick Welche <prlw1@newn.cam.ac.uk>
From: Ben Harris <bjh21@netbsd.org>
List: port-arm
Date: 03/22/2002 16:25:37
On Fri, 22 Mar 2002, Patrick Welche wrote:
> # make release
> echo hello
> hello
> cd /usr/src/sys/arch/acorn32/stand
> make: Exec of `cd' failed (No such file or directory)
>
> from
>
> release: check_RELEASEDIR
> # ${IINST} ${RAMDISKOBJ}/ramdisk.fs ${ITARGET}/misc/ramdisk-${DISTRIBREV}.fs
> # gzip -f9 ${ITARGET}/misc/ramdisk-${DISTRIBREV}.fs
> #.for kern in ${KERNELS}
> # ${IINST} ${KERNELOBJ}/netbsd.${kern}.gz ${ITARGET}/kernel/
> #.endfor
> echo hello
> cd ${_SRC_TOP_}/sys/arch/acorn32/stand
> echo there
>
>
> Does that error message really mean that "cd" can't be found, as in, the
> sh shell built-in? (And yes, there are tabs there...)
Make runs each command in a makefile in a separate subshell. For
efficiency, if a command contains no shell metacharacters, it might exec
it directly, and that applies to that "cd" line. If you want the "cd" to
be useful, do something like "echo here; cd ... && echo there".
Incidentally, the fact that "cd" can't be exec'ed in NetBSD is technically
a breach of POSIX.2. See PR standards/11197.
--
Ben Harris <bjh21@netbsd.org>
Portmaster, NetBSD/arm26 <URL:http://www.netbsd.org/Ports/arm26/>