NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Help with BSD make



On Sat, Jul 14, 2012 at 09:59:11AM +0100, Sad Clouds wrote:
> Hello, I'm learning make(1), so a bit of a daft question:
> 
> all: .PHONY
>       cd /tmp
>       pwd
> 
> This gives
> 
> cd /tmp
> make: exec(cd) failed (No such file or directory)
> *** Error code 1
> 
> 
> What is going on?

I don't know but I can reproduce it with bmake on my Linux laptop.  It's
interesting, though, that as soon as you insert any bit that looks like
shell it stops execve-ing /some/path/from/PATH/cd:

        all:
                -cd /foo
                # cd /foo
                # bmake: exec(cd) failed (No such file or directory)
                # *** Error code 1 (ignored)

                -cd /foo /bar
                # cd /foo /bar
                # bmake: exec(cd) failed (No such file or directory)
                # *** Error code 1 (ignored)

                -cd /foo \#
                # cd /foo \#
                # /bin/sh: line 0: cd: /foo: No such file or directory
                # *** Error code 1 (ignored)

Note: First two errors are by bmake, the last one by /bin/sh.

                Petar Bogdanovic


Home | Main Index | Thread Index | Old Index