Clean up some MAKE_BOOTSTRAP issues wrt. MACHINE/MACHINE_ARCH.

This commit is contained in:
thorpej 2001-11-30 01:29:47 +00:00
parent cce3152281
commit 9f434e6392
3 changed files with 19 additions and 19 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.boot,v 1.13 2001/01/18 05:53:05 thorpej Exp $
# $NetBSD: Makefile.boot,v 1.14 2001/11/30 01:29:47 thorpej Exp $
#
# a very simple makefile...
#
@ -11,15 +11,15 @@ CC=gcc -O
.c.o:
${CC} ${CFLAGS} -c $< -o $@
MACHINE=sun
MACHINE_ARCH=sparc
MAKE_MACHINE=sun
MAKE_MACHINE_ARCH=sparc
# tested on HP-UX 10.20
#MACHINE=hp700
#MACHINE_ARCH=hppa
#MAKE_MACHINE=hp700
#MAKE_MACHINE_ARCH=hppa
CFLAGS= -I.\
-DTARGET_MACHINE=\"${MACHINE}\" \
-DTARGET_MACHINE_ARCH=\"${MACHINE_ARCH}\" \
-DMACHINE=\"${MACHINE}\" \
-DMAKE_MACHINE=\"${MACHINE}\" \
-DMAKE_BOOTSTRAP
LIBS=

View File

@ -1,4 +1,4 @@
/* $NetBSD: arch.c,v 1.33 2001/06/12 23:36:17 sjg Exp $ */
/* $NetBSD: arch.c,v 1.34 2001/11/30 01:29:48 thorpej Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@ -39,14 +39,14 @@
*/
#ifdef MAKE_BOOTSTRAP
static char rcsid[] = "$NetBSD: arch.c,v 1.33 2001/06/12 23:36:17 sjg Exp $";
static char rcsid[] = "$NetBSD: arch.c,v 1.34 2001/11/30 01:29:48 thorpej Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)arch.c 8.2 (Berkeley) 1/2/94";
#else
__RCSID("$NetBSD: arch.c,v 1.33 2001/06/12 23:36:17 sjg Exp $");
__RCSID("$NetBSD: arch.c,v 1.34 2001/11/30 01:29:48 thorpej Exp $");
#endif
#endif /* not lint */
#endif
@ -115,12 +115,12 @@ __RCSID("$NetBSD: arch.c,v 1.33 2001/06/12 23:36:17 sjg Exp $");
#include "config.h"
#ifdef TARGET_MACHINE
#undef MACHINE
#define MACHINE TARGET_MACHINE
#undef MAKE_MACHINE
#define MAKE_MACHINE TARGET_MACHINE
#endif
#ifdef TARGET_MACHINE_ARCH
#undef MACHINE_ARCH
#define MACHINE_ARCH TARGET_MACHINE_ARCH
#undef MAKE_MACHINE_ARCH
#define MAKE_MACHINE_ARCH TARGET_MACHINE_ARCH
#endif
static Lst archives; /* Lst of archives we've already examined */

View File

@ -1,4 +1,4 @@
/* $NetBSD: main.c,v 1.79 2001/11/12 21:58:18 tv Exp $ */
/* $NetBSD: main.c,v 1.80 2001/11/30 01:29:48 thorpej Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@ -39,7 +39,7 @@
*/
#ifdef MAKE_BOOTSTRAP
static char rcsid[] = "$NetBSD: main.c,v 1.79 2001/11/12 21:58:18 tv Exp $";
static char rcsid[] = "$NetBSD: main.c,v 1.80 2001/11/30 01:29:48 thorpej Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
@ -51,7 +51,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993\n\
#if 0
static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94";
#else
__RCSID("$NetBSD: main.c,v 1.79 2001/11/12 21:58:18 tv Exp $");
__RCSID("$NetBSD: main.c,v 1.80 2001/11/30 01:29:48 thorpej Exp $");
#endif
#endif /* not lint */
#endif
@ -599,14 +599,14 @@ main(argc, argv)
}
machine = utsname.machine;
#else
machine = MACHINE;
machine = MAKE_MACHINE;
#endif
}
if (!machine_arch) {
#ifndef MACHINE_ARCH
#ifdef __ARCHITECTURE__
machine_arch = __ARCHITECTURE__;
#ifdef MAKE_MACHINE_ARCH
machine_arch = MAKE_MACHINE_ARCH;
#else
machine_arch = "unknown"; /* XXX: no uname -p yet */
#endif