${MACHINE} -> ${MACHINE_ARCH}

All Makefiles now use MACHINE_ARCH for the target architecture.
Unification is required for cross-building.

Tags added to:
	sys/boot/Makefile
	sys/boot/arc/loader/Makefile
	sys/kern/Makefile
	usr.bin/cpp/Makefile
	usr.bin/gcore/Makefile
	usr.bin/truss/Makefile

usr.bin/gcore/Makefile:
	fixed typo: MACHINDE -> MACHINE_ARCH
This commit is contained in:
Marcel Moolenaar 1999-11-14 13:54:44 +00:00
parent 5d53601420
commit 0917704bd4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=53152
13 changed files with 47 additions and 40 deletions

View File

@ -778,7 +778,7 @@ _elf2exe= usr.sbin/elf2exe
_kldlinux= sys/modules/linux
.endif
.if ${OBJFORMAT} == "aout"
_netboot= sys/${MACHINE}/boot/netboot
_netboot= sys/${MACHINE_ARCH}/boot/netboot
.endif
BTMAKEFLAGS= ${MK_FLAGS} -D_BUILD_TOOLS
@ -921,7 +921,7 @@ legacy-build:
@echo "--------------------------------------------------------------"
@echo ">>> Building legacy boot"
@echo "--------------------------------------------------------------"
cd ${.CURDIR}/sys/${MACHINE}/boot && \
cd ${.CURDIR}/sys/${MACHINE_ARCH}/boot && \
${XMAKE} -DNOMAN -B obj depend; ${XMAKE} -DNOMAN all;
.endif
@ -960,7 +960,7 @@ legacy-install:
@echo "--------------------------------------------------------------"
@echo ">>> Installing legacy boot"
@echo "--------------------------------------------------------------"
cd ${.CURDIR}/sys/${MACHINE}/boot && ${MAKE} -DNOMAN install
cd ${.CURDIR}/sys/${MACHINE_ARCH}/boot && ${MAKE} -DNOMAN install
.endif
.endif

View File

@ -9,8 +9,7 @@ FORMATS= freebsd
# Only build the cross tools when not cross-compiling.
__MA!=/sbin/sysctl -b hw.machine_arch
__M!=/sbin/sysctl -b hw.machine
.if ${__MA} == ${MACHINE_ARCH} || ${__M} == ${MACHINE}
.if ${__MA} == ${MACHINE_ARCH}
.if defined(CROSS_ARCH)
.for _g in ${CROSS_ARCH}
.if (${GASES:R:M${_g:R}} == "")

View File

@ -13,9 +13,9 @@
LIB= m
CFLAGS+=-I${.CURDIR}/common_source
.if (${MACHINE} == "ieee")
.if (${MACHINE_ARCH} == "ieee")
HARDWARE=${MACHINE}
HARDWARE=${MACHINE_ARCH}
.PATH: ${.CURDIR}/common_source ${.CURDIR}/common ${.CURDIR}/ieee
# common_source
SRCS+= acosh.c asincos.c asinh.c atan.c atanh.c cosh.c erf.c exp.c \
@ -26,7 +26,7 @@ SRCS+= atan2.c sincos.c tan.c
# ieee
SRCS+= cabs.c cbrt.c support.c
.elif (${MACHINE} == "hp300" || ${MACHINE} == "luna68k")
.elif (${MACHINE_ARCH} == "hp300" || ${MACHINE_ARCH} == "luna68k")
HARDWARE=mc68881
.PATH: ${.CURDIR}/mc68881 ${.CURDIR}/common_source ${.CURDIR}/ieee
@ -53,9 +53,9 @@ SRCS+= atan2.c sincos.c tan.c
# ieee
SRCS+= cabs.c cbrt.c support.c
.elif (${MACHINE} == "mips")
.elif (${MACHINE_ARCH} == "mips")
HARDWARE=${MACHINE}
HARDWARE=${MACHINE_ARCH}
.PATH: ${.CURDIR}/common_source ${.CURDIR}/common ${.CURDIR}/ieee
CFLAGS+= -Dnational
# common_source
@ -67,13 +67,13 @@ SRCS+= atan2.c sincos.c tan.c
# ieee
SRCS+= cabs.c cbrt.c support.c
.elif (${MACHINE} == "national")
.elif (${MACHINE_ARCH} == "national")
HARDWARE=${MACHINE}
HARDWARE=${MACHINE_ARCH}
.PATH: ${.CURDIR}/common_source ${.CURDIR}/common ${.CURDIR}/national \
.elif (${MACHINE} == "national")
.elif (${MACHINE_ARCH} == "national")
HARDWARE=${MACHINE}
HARDWARE=${MACHINE_ARCH}
.PATH: ${.CURDIR}/common_source ${.CURDIR}/common ${.CURDIR}/national \
${.CURDIR}/ieee
# common_source
@ -87,9 +87,9 @@ SRCS+= sqrt.s support.s
# ieee
SRCS+= cabs.c cbrt.c
.elif (${MACHINE} == "sparc")
.elif (${MACHINE_ARCH} == "sparc")
HARDWARE=${MACHINE}
HARDWARE=${MACHINE_ARCH}
.PATH: ${.CURDIR}/common_source ${.CURDIR}/common ${.CURDIR}/ieee
# common_source
SRCS+= acosh.c asincos.c asinh.c atan.c atanh.c cosh.c erf.c exp.c \
@ -101,9 +101,9 @@ SRCS+= atan2.c sincos.c tan.c
# ieee
SRCS+= cabs.c cbrt.c support.c
.elif (${MACHINE} == "tahoe")
.elif (${MACHINE_ARCH} == "tahoe")
HARDWARE=${MACHINE}
HARDWARE=${MACHINE_ARCH}
.PATH: ${.CURDIR}/common_source ${.CURDIR}/common ${.CURDIR}/tahoe \
# common_source
SRCS+= acosh.c asincos.c asinh.c atan.c atanh.c cosh.c erf.c exp.c \
@ -114,9 +114,9 @@ SRCS+= atan2.c sincos.c tan.c
# tahoe
SRCS+= cabs.s cbrt.s sqrt.s support.s infnan.s
.elif (${MACHINE} == "vax")
.elif (${MACHINE_ARCH} == "vax")
HARDWARE=${MACHINE}
HARDWARE=${MACHINE_ARCH}
.PATH: ${.CURDIR}/common_source ${.CURDIR}/vax
# common_source
SRCS+= acosh.c asincos.c asinh.c atan.c atanh.c cosh.c erf.c exp.c \

View File

@ -151,8 +151,8 @@ _SUBDIR: .USE
.if defined(SUBDIR) && !empty(SUBDIR)
@for entry in ${SUBDIR}; do \
(${ECHODIR} "===> ${DIRPRFX}$$entry"; \
if test -d ${.CURDIR}/$${entry}.${MACHINE}; then \
cd ${.CURDIR}/$${entry}.${MACHINE}; \
if test -d ${.CURDIR}/$${entry}.${MACHINE_ARCH}; then \
cd ${.CURDIR}/$${entry}.${MACHINE_ARCH}; \
else \
cd ${.CURDIR}/$${entry}; \
fi; \

View File

@ -61,10 +61,10 @@ _SUBDIRUSE: .USE
grep -w $${entry} \
${SUBDIR_CHANGE}/${DIRPRFX}/subdirdrop \
> /dev/null); then \
if test -d ${.CURDIR}/$${entry}.${MACHINE}; then \
if test -d ${.CURDIR}/$${entry}.${MACHINE_ARCH}; then \
${ECHODIR} \
"===> ${DIRPRFX}$${entry}.${MACHINE}"; \
edir=$${entry}.${MACHINE}; \
"===> ${DIRPRFX}$${entry}.${MACHINE_ARCH}"; \
edir=$${entry}.${MACHINE_ARCH}; \
cd ${.CURDIR}/$${edir}; \
else \
${ECHODIR} "===> ${DIRPRFX}$$entry"; \
@ -79,8 +79,8 @@ _SUBDIRUSE: .USE
done
${SUBDIR}::
@if test -d ${.TARGET}.${MACHINE}; then \
cd ${.CURDIR}/${.TARGET}.${MACHINE}; \
@if test -d ${.TARGET}.${MACHINE_ARCH}; then \
cd ${.CURDIR}/${.TARGET}.${MACHINE_ARCH}; \
else \
cd ${.CURDIR}/${.TARGET}; \
fi; \

View File

@ -1,8 +1,8 @@
# $FreeBSD$
# This is the old aout only boot loader.
.if exists(${.CURDIR}/${MACHINE}/boot) && ${OBJFORMAT} == "aout"
SUBDIR= ${MACHINE}/boot
.if exists(${.CURDIR}/${MACHINE_ARCH}/boot) && ${OBJFORMAT} == "aout"
SUBDIR= ${MACHINE_ARCH}/boot
.elif exists(${.CURDIR}/boot) && ${MACHINE_ARCH} == "i386" && ${OBJFORMAT} == "elf"
SUBDIR= boot
.endif

View File

@ -1,11 +1,13 @@
# $FreeBSD$
# Build the add-in FORTH interpreter
SUBDIR+= ficl
# Pick the machine-dependant subdir based on the target architecture.
SUBDIR+= ${MACHINE}
SUBDIR+= ${MACHINE_ARCH}
# Build ARC / AlphaBIOS executable on the Alpha
.if ${MACHINE} == "alpha"
.if ${MACHINE_ARCH} == "alpha"
SUBDIR+= arc
.endif

View File

@ -5,7 +5,7 @@ NOPIC= true
NOPROFILE= true
INTERNALLIB= true
.PATH: ${.CURDIR}/arch/${MACHINE}
.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}
# XXX hack to pick up stand.h
LIBSTANDDIR= ${.CURDIR}/../../../../lib/libstand
CFLAGS= -I${LIBSTANDDIR}
@ -22,7 +22,7 @@ CFLAGS+= -I${.CURDIR}/../../common -mno-fp-regs \
SRCS= delay.c time.c abort.c setjmperr.c copy.c devicename.c module.c \
arcconsole.c arcdisk.c elf_freebsd.c bootinfo.c
.if ${MACHINE} == "alpha"
.if ${MACHINE_ARCH} == "alpha"
SRCS+= rpb.c
.endif

View File

@ -1,4 +1,5 @@
# $NetBSD: Makefile,v 1.12 1998/02/19 14:18:36 drochner Exp $
# $FreeBSD$
BASE= loader
PROG= ${BASE}.exe
@ -63,7 +64,7 @@ beforeinstall:
.endif
# Other fragments still to be brought in from ../Makfile.booters?
start.o: ${.CURDIR}/../lib/arch/${MACHINE}/start.S
start.o: ${.CURDIR}/../lib/arch/${MACHINE_ARCH}/start.S
${CC} -c ${CFLAGS} $<
setdef0.o: setdefs.h

View File

@ -1,4 +1,5 @@
# @(#)Makefile 8.2 (Berkeley) 3/21/94
# $FreeBSD$
# Makefile for kernel tags files, init_sysent, etc.
@ -24,7 +25,7 @@ init_sysent.c syscalls.c ../sys/syscall.h ../sys/syscall-hide.h \
# are placed in each source directory. We need to have links to tags files
# from the generic directories that are relative to the machine type, even
# via remote mounts; therefore we use symlinks to $SYSTAGS, which points at
# ${SYSDIR}/${MACHINE}/tags.
# ${SYSDIR}/${MACHINE_ARCH}/tags.
SYSTAGS=/var/db/sys_tags
SYSDIR=/sys
@ -47,7 +48,7 @@ tags::
links::
rm -f ${SYSTAGS}
ln -s ${SYSDIR}/${MACHINE}/tags ${SYSTAGS}
ln -s ${SYSDIR}/${MACHINE_ARCH}/tags ${SYSTAGS}
-for i in ${DGEN}; do \
(cd ../$$i && { rm -f tags; ln -s ${SYSTAGS} tags; }) done
-for i in ${ARCH}; do \

View File

@ -1,4 +1,5 @@
# @(#)Makefile 8.1 (Berkeley) 7/9/93
# $FreeBSD$
NOMAN=noman
NOOBJ=noobj
@ -6,7 +7,7 @@ NOOBJ=noobj
all nologin clean cleandir depend lint tags:
beforeinstall:
.if ${MACHINE} == "sparc"
.if ${MACHINE_ARCH} == "sparc"
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
${.CURDIR}/cpp.notraditional.sh ${DESTDIR}${BINDIR}/cpp
.else

View File

@ -1,4 +1,5 @@
# @(#)Makefile 8.1 (Berkeley) 6/6/93
# $FreeBSD$
PROG= gcore
SRCS= elfcore.c gcore.c
@ -6,10 +7,10 @@ CFLAGS+=-Wall
DPADD= ${LIBKVM}
LDADD= -lkvm
.if ${MACHINE} != "sparc"
.if ${MACHINE_ARCH} != "sparc"
SRCS+= md-nop.c
.else
SRCS+= md-${MACHINDE}.c
SRCS+= md-${MACHINE_ARCH}.c
.endif
.include <bsd.prog.mk>

View File

@ -1,6 +1,8 @@
# $FreeBSD$
PROG= truss
SRCS= main.c setup.c syscalls.c syscalls.h ioctl.c
.if (${MACHINE} == "alpha")
.if (${MACHINE_ARCH} == "alpha")
SRCS+= alpha-fbsd.c
.elif (${MACHINE_ARCH} == "i386")
SRCS+= i386-fbsd.c i386-linux.c linux_syscalls.h