From 668cb9689321bd84a7d8bdf1ec10f2c5c1f8b0e3 Mon Sep 17 00:00:00 2001 From: mrg Date: Mon, 22 Mar 2010 05:12:24 +0000 Subject: [PATCH] for mips64*, use mips64 subdir, otherwise use $MACHINE_ARCH if exists, or $MACHINE_CPU. idea from dennis.c.ferguson@gmail.com in PR#43021. --- usr.bin/xlint/Makefile.inc | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/usr.bin/xlint/Makefile.inc b/usr.bin/xlint/Makefile.inc index 248e7b2a53de..860a44cea053 100644 --- a/usr.bin/xlint/Makefile.inc +++ b/usr.bin/xlint/Makefile.inc @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.11 2009/12/14 00:42:06 matt Exp $ +# $NetBSD: Makefile.inc,v 1.12 2010/03/22 05:12:24 mrg Exp $ WARNS?= 3 # XXX: fails -Wsign-compare @@ -6,13 +6,12 @@ WARNS?= 3 # XXX: fails -Wsign-compare .PATH: ${.CURDIR}/../common -# On the m68000, MACHINE_CPU is "m68k", but we have different -# target parameters (namely, long double is a different size -# on the m68000), so we special case the directory name here. -.if ${MACHINE_ARCH} == "m68000" -ARCHSUBDIR= m68000 -.elif ${MACHINE_ARCH} == "mips64eb" || ${MACHINE_ARCH} == "mips64el" +# Special cases first, then check for a MACHINE_ARCH specific +# subdir before looking for MACHINE_CPU. +.if ${MACHINE_ARCH} == "mips64eb" || ${MACHINE_ARCH} == "mips64el" ARCHSUBDIR= mips64 +.elif exists(${.CURDIR}/../arch/${MACHINE_ARCH}) +ARCHSUBDIR= ${MACHINE_ARCH} .else ARCHSUBDIR= ${MACHINE_CPU} .endif