summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>1999-11-14 13:54:44 +0000
committermarcel <marcel@FreeBSD.org>1999-11-14 13:54:44 +0000
commit17ed6e05da9e78604972eb2120615a505953fd25 (patch)
tree571f4f72304b0d631bd6808faace186b95d27a21
parent281ba43ee5ba4c4ff8ac1085144a3d1d7c550386 (diff)
downloadFreeBSD-src-17ed6e05da9e78604972eb2120615a505953fd25.zip
FreeBSD-src-17ed6e05da9e78604972eb2120615a505953fd25.tar.gz
${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
-rw-r--r--Makefile.inc16
-rw-r--r--gnu/usr.bin/binutils/as/Makefile3
-rw-r--r--lib/libm/Makefile30
-rw-r--r--share/mk/bsd.obj.mk4
-rw-r--r--share/mk/bsd.subdir.mk10
-rw-r--r--sys/Makefile4
-rw-r--r--sys/boot/Makefile6
-rw-r--r--sys/boot/arc/lib/Makefile4
-rw-r--r--sys/boot/arc/loader/Makefile3
-rw-r--r--sys/kern/Makefile5
-rw-r--r--usr.bin/cpp/Makefile3
-rw-r--r--usr.bin/gcore/Makefile5
-rw-r--r--usr.bin/truss/Makefile4
13 files changed, 47 insertions, 40 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index f16e669..f494ada 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -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
diff --git a/gnu/usr.bin/binutils/as/Makefile b/gnu/usr.bin/binutils/as/Makefile
index 4de352e..17150e6 100644
--- a/gnu/usr.bin/binutils/as/Makefile
+++ b/gnu/usr.bin/binutils/as/Makefile
@@ -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}} == "")
diff --git a/lib/libm/Makefile b/lib/libm/Makefile
index d00d6d7..0752465 100644
--- a/lib/libm/Makefile
+++ b/lib/libm/Makefile
@@ -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 \
diff --git a/share/mk/bsd.obj.mk b/share/mk/bsd.obj.mk
index 9d22d75..b648222 100644
--- a/share/mk/bsd.obj.mk
+++ b/share/mk/bsd.obj.mk
@@ -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; \
diff --git a/share/mk/bsd.subdir.mk b/share/mk/bsd.subdir.mk
index 4c51ceb..b75b084 100644
--- a/share/mk/bsd.subdir.mk
+++ b/share/mk/bsd.subdir.mk
@@ -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; \
diff --git a/sys/Makefile b/sys/Makefile
index 0077456..57ff690 100644
--- a/sys/Makefile
+++ b/sys/Makefile
@@ -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
diff --git a/sys/boot/Makefile b/sys/boot/Makefile
index 8d7e2ad..0cdaeb2 100644
--- a/sys/boot/Makefile
+++ b/sys/boot/Makefile
@@ -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
diff --git a/sys/boot/arc/lib/Makefile b/sys/boot/arc/lib/Makefile
index 023821c..a9c0e2d 100644
--- a/sys/boot/arc/lib/Makefile
+++ b/sys/boot/arc/lib/Makefile
@@ -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
diff --git a/sys/boot/arc/loader/Makefile b/sys/boot/arc/loader/Makefile
index 1fdb2c3..acbb066 100644
--- a/sys/boot/arc/loader/Makefile
+++ b/sys/boot/arc/loader/Makefile
@@ -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
diff --git a/sys/kern/Makefile b/sys/kern/Makefile
index 00ee277..ba453b2 100644
--- a/sys/kern/Makefile
+++ b/sys/kern/Makefile
@@ -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 \
diff --git a/usr.bin/cpp/Makefile b/usr.bin/cpp/Makefile
index 95cf0b1..23c6df8 100644
--- a/usr.bin/cpp/Makefile
+++ b/usr.bin/cpp/Makefile
@@ -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
diff --git a/usr.bin/gcore/Makefile b/usr.bin/gcore/Makefile
index 7f6a3ee..f495ecb 100644
--- a/usr.bin/gcore/Makefile
+++ b/usr.bin/gcore/Makefile
@@ -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>
diff --git a/usr.bin/truss/Makefile b/usr.bin/truss/Makefile
index b7f8a3f..8ba4702 100644
--- a/usr.bin/truss/Makefile
+++ b/usr.bin/truss/Makefile
@@ -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
OpenPOWER on IntegriCloud