From owner-p4-projects Fri Oct 18 20:39:19 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1DBE237B404; Fri, 18 Oct 2002 20:39:16 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AA83837B401 for ; Fri, 18 Oct 2002 20:39:14 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 499AA43ECD for ; Fri, 18 Oct 2002 20:39:14 -0700 (PDT) (envelope-from jmallett@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id g9J3cwmV012267 for ; Fri, 18 Oct 2002 20:38:58 -0700 (PDT) (envelope-from jmallett@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id g9J3cvni012264 for perforce@freebsd.org; Fri, 18 Oct 2002 20:38:57 -0700 (PDT) Date: Fri, 18 Oct 2002 20:38:57 -0700 (PDT) Message-Id: <200210190338.g9J3cvni012264@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jmallett@freebsd.org using -f From: Juli Mallett Subject: PERFORCE change 19604 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG http://perforce.freebsd.org/chv.cgi?CH=19604 Change 19604 by jmallett@jmallett_luna on 2002/10/18 20:38:22 Point to for if we have no need for , such as if MACHINE_ARCH and MACHINE ar the same, or if they differ and $MA/$M does not exist. Affected files ... .. //depot/projects/mips/include/Makefile#4 edit .. //depot/projects/mips/sys/conf/kmod.mk#3 edit .. //depot/projects/mips/usr.sbin/config/main.c#3 edit Differences ... ==== //depot/projects/mips/include/Makefile#4 (text+ko) ==== @@ -97,10 +97,12 @@ cd ${.CURDIR}/../sys; \ ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 opencrypto/*.h \ ${DESTDIR}/usr/include/crypto -.if exists(${.CURDIR}/../sys/${MACHINE_ARCH}/${MACHINE}) +.if ${MACHINE_ARCH} != ${MACHINE} && exists(${.CURDIR}/../sys/${MACHINE_ARCH}/${MACHINE}) cd ${.CURDIR}/../sys/${MACHINE_ARCH}/${MACHINE}; \ ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ ${DESTDIR}/usr/include/platform +.else + ln -s machine ${DESTDIR}/usr/include/platform .endif .if exists(${.CURDIR}/../sys/${MACHINE_ARCH}/include) cd ${.CURDIR}/../sys/${MACHINE_ARCH}/include; \ @@ -126,7 +128,11 @@ ln -s ../../../sys/$i ${DESTDIR}/usr/include/$i .endfor rm -rf ${DESTDIR}/usr/include/platform +.if ${MACHINE_ARCH} != ${MACHINE} && exists(../../sys/${MACHINE_ARCH}/${MACHINE}) ln -s ../../sys/${MACHINE_ARCH}/${MACHINE} ${DESTDIR}/usr/include/platform +.else + ln -s machine ${DESTDIR}/usr/include/platform +.endif rm -rf ${DESTDIR}/usr/include/machine ln -s ../../sys/${MACHINE_ARCH}/include ${DESTDIR}/usr/include/machine ==== //depot/projects/mips/sys/conf/kmod.mk#3 (text+ko) ==== @@ -170,12 +170,18 @@ .error "can't find kernel source tree" .endif +.if ${MACHINE_ARCH} != ${MACHINE} && exists(${SYSDIR}/${MACHINE_ARCH}/${MACHINE}) +PLATFORMPATH= ${SYSDIR}/${MACHINE_ARCH}/${MACHINE} +.else +PLATFORMPATH= machine +.endif + ${_ILINKS}: @case ${.TARGET} in \ machine) \ path=${SYSDIR}/${MACHINE_ARCH}/include ;; \ platform) \ - path=${SYSDIR}/${MACHINE_ARCH}/${MACHINE} ;; \ + path=${PLATFORMPATH} ;; \ @) \ path=${SYSDIR} ;; \ esac ; \ ==== //depot/projects/mips/usr.sbin/config/main.c#3 (text+ko) ==== @@ -166,6 +166,7 @@ (void) symlink(xxx, path("machine")); /* * make symbolic link for the platform, if we have one. + * otherwise, just fall back to using the machine (symlink). */ if (platformname != NULL) { if (*srcdir == '\0') @@ -174,6 +175,8 @@ else (void)snprintf(xxx, sizeof(xxx), "%s/%s/%s", srcdir, machinename, platformname); + } else { + (void)snprintf(xxx, sizeof(xxx), "machine"); } (void) unlink(path("platform")); (void) symlink(xxx, path("platform")); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message