Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/share/mk Allow use of a different by using KLINK_MACHINE ins...



details:   https://anonhg.NetBSD.org/src/rev/45cb9cc18dbf
branches:  trunk
changeset: 786572:45cb9cc18dbf
user:      matt <matt%NetBSD.org@localhost>
date:      Thu May 02 04:14:28 2013 +0000

description:
Allow use of a different by using KLINK_MACHINE instead.
If it's not set, KLINK_MACHINE is set to ${MACHINE}

diffstat:

 share/mk/bsd.klinks.mk |  34 ++++++++++++++++++----------------
 1 files changed, 18 insertions(+), 16 deletions(-)

diffs (89 lines):

diff -r f22d5b6ca4e2 -r 45cb9cc18dbf share/mk/bsd.klinks.mk
--- a/share/mk/bsd.klinks.mk    Thu May 02 03:56:38 2013 +0000
+++ b/share/mk/bsd.klinks.mk    Thu May 02 04:14:28 2013 +0000
@@ -1,8 +1,10 @@
-#      $NetBSD: bsd.klinks.mk,v 1.9 2011/07/10 23:50:24 matt Exp $
+#      $NetBSD: bsd.klinks.mk,v 1.10 2013/05/02 04:14:28 matt Exp $
 #
 
 .include <bsd.own.mk>
 
+KLINK_MACHINE?=        ${MACHINE}
+
 ##### Default values
 .if !defined(S)
 .if defined(NETBSDSRCDIR)
@@ -14,20 +16,20 @@
 .endif
 .endif
 
-CLEANFILES+=   machine ${MACHINE_CPU} ${MACHINE}
-.if ${MACHINE} == "sun2" || ${MACHINE} == "sun3"
+CLEANFILES+=   machine ${MACHINE_CPU} ${KLINK_MACHINE}
+.if ${KLINK_MACHINE} == "sun2" || ${KLINK_MACHINE} == "sun3"
 CLEANFILES+=   sun68k
-.elif ${MACHINE} == "sparc64"
+.elif ${KLINK_MACHINE} == "sparc64"
 CLEANFILES+=   sparc
-.elif ${MACHINE} == "i386"
+.elif ${KLINK_MACHINE} == "i386"
 CLEANFILES+=   x86
-.elif ${MACHINE} == "amd64"
+.elif ${KLINK_MACHINE} == "amd64"
 CLEANFILES+=   x86 i386
-.elif ${MACHINE} == "evbmips"
+.elif ${KLINK_MACHINE} == "evbmips"
 CLEANFILES+=   algor sbmips
 .endif
 
-.if defined(XEN_BUILD) || ${MACHINE} == "xen"
+.if defined(XEN_BUILD) || ${KLINK_MACHINE} == "xen"
 CLEANFILES+=   xen xen-ma/machine # xen-ma
 CPPFLAGS+=     -I${.OBJDIR}/xen-ma
 .if ${MACHINE_CPU} == "i386"
@@ -40,23 +42,23 @@
 .if !make(obj) && !make(clean) && !make(cleandir)
 .BEGIN:
        @rm -f machine && \
-           ln -s $S/arch/${MACHINE}/include machine
-       @rm -f ${MACHINE} && \
-           ln -s $S/arch/${MACHINE}/include ${MACHINE}
+           ln -s $S/arch/${KLINK_MACHINE}/include machine
+       @rm -f ${KLINK_MACHINE} && \
+           ln -s $S/arch/${KLINK_MACHINE}/include ${KLINK_MACHINE}
        @if [ -d $S/arch/${MACHINE_CPU} ]; then \
            rm -f ${MACHINE_CPU} && \
            ln -s $S/arch/${MACHINE_CPU}/include ${MACHINE_CPU}; \
         fi
 # XXX. it gets worse..
-.if ${MACHINE} == "sun2" || ${MACHINE} == "sun3"
+.if ${KLINK_MACHINE} == "sun2" || ${KLINK_MACHINE} == "sun3"
        @rm -f sun68k && \
            ln -s $S/arch/sun68k/include sun68k
 .endif
-.if ${MACHINE} == "sparc64"
+.if ${KLINK_MACHINE} == "sparc64"
        @rm -f sparc && \
            ln -s $S/arch/sparc/include sparc
 .endif
-.if ${MACHINE} == "amd64"
+.if ${KLINK_MACHINE} == "amd64"
        @rm -f x86 && \
            ln -s $S/arch/x86/include x86
        @rm -f i386 && \
@@ -66,13 +68,13 @@
        @rm -f x86 && \
            ln -s $S/arch/x86/include x86
 .endif
-.if defined(XEN_BUILD) || ${MACHINE} == "xen"
+.if defined(XEN_BUILD) || ${KLINK_MACHINE} == "xen"
        @rm -f xen && \
            ln -s $S/arch/xen/include xen
        @rm -rf xen-ma && mkdir xen-ma && \
            ln -s ../${XEN_BUILD:U${MACHINE_ARCH}} xen-ma/machine
 .endif
-.if ${MACHINE} == "evbmips"
+.if ${KLINK_MACHINE} == "evbmips"
        @rm -f algor && \
            ln -s $S/arch/algor/include algor
        @rm -f sbmips && \



Home | Main Index | Thread Index | Old Index