0828d668af
Firstly, we ignore getenv("PWD") if MAKEOBJDIRPREFIX is set so that we always get the same value for .CURDIR regardless of how make was invoked. Second, when executing a command we check if it is ${.MAKE} or ${.MAKE:T} without a preceeding chdir, if so we insert a chdir(${.CURDIR}) so that the Makefile will be found by the child make. Note that this behaviour is dissabled if MAKEOBJDIRPREFIX is not set or if NOCHECKMAKECHDIR is set. See the comments in main.c for more detail. With these two changes, one can successfully build usr/src using MAKEOBJDIRPREFIX allowing the src to be mounted from a CD-ROM. |
||
---|---|---|
.. | ||
PSD.doc | ||
lst.lib | ||
Makefile | ||
Makefile.boot | ||
arch.c | ||
bit.h | ||
buf.c | ||
buf.h | ||
compat.c | ||
cond.c | ||
config.h | ||
dir.c | ||
dir.h | ||
for.c | ||
hash.c | ||
hash.h | ||
job.c | ||
job.h | ||
list.h | ||
lst.h | ||
main.c | ||
make.1 | ||
make.c | ||
make.h | ||
nonints.h | ||
parse.c | ||
pathnames.h | ||
sprite.h | ||
str.c | ||
suff.c | ||
targ.c | ||
util.c | ||
var.c |