Module Name: src
Committed By: christos
Date: Sat Dec 10 23:12:40 UTC 2016
Modified Files:
src/share/mk: bsd.obj.mk
src/usr.bin/make: main.c
Log Message:
Back in 1993 ${MACHINE} was a unique way to define objdirs for
every platform. Thus setting OBJMACHINE, allowed one to keep
in-tree objdirs with multiple builds. With the advent of evb*, this
has become impossible until now. Introduce OBJMACHINE_ARCH that
adds ${MACHINE_ARCH} to the objdir so that we have unique objdirs
per build again. Until we restructure things to that this is not
necessary, it is the simplest fix.
To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/share/mk/bsd.obj.mk
cvs rdiff -u -r1.253 -r1.254 src/usr.bin/make/main.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/share/mk/bsd.obj.mk
diff -u src/share/mk/bsd.obj.mk:1.50 src/share/mk/bsd.obj.mk:1.51
--- src/share/mk/bsd.obj.mk:1.50 Wed Dec 7 22:25:35 2016
+++ src/share/mk/bsd.obj.mk Sat Dec 10 18:12:39 2016
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.obj.mk,v 1.50 2016/12/08 03:25:35 christos Exp $
+# $NetBSD: bsd.obj.mk,v 1.51 2016/12/10 23:12:39 christos Exp $
.if !defined(_BSD_OBJ_MK_)
_BSD_OBJ_MK_=1
@@ -37,7 +37,7 @@ obj:
.else
PAWD?= /bin/pwd
-__objdirsuffix= ${OBJMACHINE:D.${MACHINE}}
+__objdirsuffix= ${OBJMACHINE:D.${MACHINE}${OBJMACHINE_ARCH:D-${MACHINE_ARCH}}}
__objdir= obj${__objdirsuffix}
__usrobjdir= ${BSDOBJDIR}${USR_OBJMACHINE:D.${MACHINE}}
Index: src/usr.bin/make/main.c
diff -u src/usr.bin/make/main.c:1.253 src/usr.bin/make/main.c:1.254
--- src/usr.bin/make/main.c:1.253 Wed Dec 7 14:57:09 2016
+++ src/usr.bin/make/main.c Sat Dec 10 18:12:39 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.253 2016/12/07 19:57:09 christos Exp $ */
+/* $NetBSD: main.c,v 1.254 2016/12/10 23:12:39 christos Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -69,7 +69,7 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: main.c,v 1.253 2016/12/07 19:57:09 christos Exp $";
+static char rcsid[] = "$NetBSD: main.c,v 1.254 2016/12/10 23:12:39 christos Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
@@ -81,7 +81,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 19
#if 0
static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94";
#else
-__RCSID("$NetBSD: main.c,v 1.253 2016/12/07 19:57:09 christos Exp $");
+__RCSID("$NetBSD: main.c,v 1.254 2016/12/10 23:12:39 christos Exp $");
#endif
#endif /* not lint */
#endif
@@ -1122,6 +1122,7 @@ main(int argc, char **argv)
if (!Main_SetVarObjdir("MAKEOBJDIRPREFIX", curdir) &&
!Main_SetVarObjdir("MAKEOBJDIR", "") &&
+ !Main_SetObjdir("%s.%s-%s", _PATH_OBJDIR, machine, machine_arch) &&
!Main_SetObjdir("%s.%s", _PATH_OBJDIR, machine) &&
!Main_SetObjdir("%s", _PATH_OBJDIR))
(void)Main_SetObjdir("%s%s", _PATH_OBJDIRPREFIX, curdir);