Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Oct 2002 20:38:57 -0700 (PDT)
From:      Juli Mallett <jmallett@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 19604 for review
Message-ID:  <200210190338.g9J3cvni012264@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=19604

Change 19604 by jmallett@jmallett_luna on 2002/10/18 20:38:22

	Point to <machine> for <platform> if we have no need for <platform>,
	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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200210190338.g9J3cvni012264>