diff --git a/contrib/bmake/main.c b/contrib/bmake/main.c index 84c6935f81e4..0f15f11bf7d4 100644 --- a/contrib/bmake/main.c +++ b/contrib/bmake/main.c @@ -796,7 +796,10 @@ main(int argc, char **argv) Lst targs; /* target nodes to create -- passed to Make_Init */ Boolean outOfDate = FALSE; /* FALSE if all targets up to date */ struct stat sb, sa; - char *p1, *path, *pwd; + char *p1, *path; +#ifndef NO_PWD_OVERRIDE + char *pwd; +#endif char mdpath[MAXPATHLEN]; #ifdef FORCE_MACHINE const char *machine = FORCE_MACHINE; diff --git a/usr.bin/bmake/Makefile.inc b/usr.bin/bmake/Makefile.inc index b6d5ad83d74a..7b5f54598a09 100644 --- a/usr.bin/bmake/Makefile.inc +++ b/usr.bin/bmake/Makefile.inc @@ -1,5 +1,12 @@ # $FreeBSD$ +# we need the up to date bsd.own.mk +.if ${.CURDIR:M*make} == "" +.sinclude "share/mk/bsd.own.mk" +.else +.sinclude "../../share/mk/bsd.own.mk" +.endif +# the above should have found it... .include "bsd.own.mk" .if defined(.PARSEDIR) @@ -16,3 +23,4 @@ NO_SHARED?= YES .endif WARNS=3 +CFLAGS+= -DNO_PWD_OVERRIDE