From f0dcde8323090d83ec7e66679f4df3c4818fefc4 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 21 May 1998 17:19:46 +0000 Subject: [PATCH] Make a MAKE_BOOTSTRAP case work on NetBSD, too, for cross-compile cases --- usr.bin/make/Makefile.boot | 4 ++-- usr.bin/make/arch.c | 15 ++++++++++++--- usr.bin/make/make.h | 4 ++-- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/usr.bin/make/Makefile.boot b/usr.bin/make/Makefile.boot index 6c7436126c25..abd4aeca22ca 100644 --- a/usr.bin/make/Makefile.boot +++ b/usr.bin/make/Makefile.boot @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.boot,v 1.8 1996/12/31 17:52:23 christos Exp $ +# $NetBSD: Makefile.boot,v 1.9 1998/05/21 17:19:46 tv Exp $ # # a very simple makefile... # @@ -12,7 +12,7 @@ MACHINE=sun MACHINE_ARCH=sparc -CFLAGS= -I. -DMACHINE=\"${MACHINE}\" -DMACHINE_ARCH=\"${MACHINE_ARCH}\" \ +CFLAGS= -I. -DTARGET_MACHINE=\"${MACHINE}\" -DTARGET_MACHINE_ARCH=\"${MACHINE_ARCH}\" \ -DMAKE_BOOTSTRAP LIBS= diff --git a/usr.bin/make/arch.c b/usr.bin/make/arch.c index ac6b34c21cb9..86cdf7d17b75 100644 --- a/usr.bin/make/arch.c +++ b/usr.bin/make/arch.c @@ -1,4 +1,4 @@ -/* $NetBSD: arch.c,v 1.26 1997/10/03 17:58:00 thorpej Exp $ */ +/* $NetBSD: arch.c,v 1.27 1998/05/21 17:19:46 tv Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -39,14 +39,14 @@ */ #ifdef MAKE_BOOTSTRAP -static char rcsid[] = "$NetBSD: arch.c,v 1.26 1997/10/03 17:58:00 thorpej Exp $"; +static char rcsid[] = "$NetBSD: arch.c,v 1.27 1998/05/21 17:19:46 tv Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)arch.c 8.2 (Berkeley) 1/2/94"; #else -__RCSID("$NetBSD: arch.c,v 1.26 1997/10/03 17:58:00 thorpej Exp $"); +__RCSID("$NetBSD: arch.c,v 1.27 1998/05/21 17:19:46 tv Exp $"); #endif #endif /* not lint */ #endif @@ -114,6 +114,15 @@ __RCSID("$NetBSD: arch.c,v 1.26 1997/10/03 17:58:00 thorpej Exp $"); #include "dir.h" #include "config.h" +#ifdef TARGET_MACHINE +#undef MACHINE +#define MACHINE TARGET_MACHINE +#endif +#ifdef TARGET_MACHINE_ARCH +#undef MACHINE_ARCH +#define MACHINE_ARCH TARGET_MACHINE_ARCH +#endif + static Lst archives; /* Lst of archives we've already examined */ typedef struct Arch { diff --git a/usr.bin/make/make.h b/usr.bin/make/make.h index 30eaa867d938..8659f9de10a6 100644 --- a/usr.bin/make/make.h +++ b/usr.bin/make/make.h @@ -1,4 +1,4 @@ -/* $NetBSD: make.h,v 1.18 1997/09/23 21:15:08 fair Exp $ */ +/* $NetBSD: make.h,v 1.19 1998/05/21 17:19:46 tv Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -54,7 +54,7 @@ #include #include -#if !defined(MAKE_BOOTSTRAP) && defined(BSD4_4) +#ifdef BSD4_4 # include #else # ifndef __P