Subject: Re: make fails to execute ./fred because of a chdir()
To: None <tech-toolchain@netbsd.org>
From: David Laight <david@l8s.co.uk>
List: tech-toolchain
Date: 12/13/2002 20:30:24
The following reproduces the problem:
(in an empty directory)

$ echo "#!/bin/echo" >do_echo
$ chmod +x do_echo
$ printf "all:\n\t./do_echo" >Makefile
$ make
./do_echo
./do_echo
$ mkdir obj
$ make
./do_echo
make: exec(./do_echo) failed (No such file or directory)
*** Error code 1
$

For some reason make decides that the 'obj' directory should
become the current directory before processing any files at all.

	David

-- 
David Laight: david@l8s.co.uk