Subject: patch to rename disklabel host tool (again)
To: None <tech-toolchain@netbsd.org>
From: David Young <dyoung@pobox.com>
List: tech-toolchain
Date: 12/03/2006 16:52:57
--r5Pyd7+fXNt84Ff3
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

I have attached a patch that adds the same prefix to disklabel as the
suffix on the wrapper.  That is, if the make wrapper is nbmake-xxx for
the target, then disklabel will be named xxx-disklabel.  In this way,
the tools directory will contain a disklabel that appropriate to every
target's LABELSECTOR and LABELOFFSET #defines.

I would like to commit this.  Let me know if there is a better way.

Dave

-- 
David Young             OJC Technologies
dyoung@ojctech.com      Urbana, IL * (217) 278-3933

--r5Pyd7+fXNt84Ff3
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="disklabel.patch"

Index: build.sh
===================================================================
RCS file: /cvsroot/src/build.sh,v
retrieving revision 1.153
diff -p -u -u -p -r1.153 build.sh
--- build.sh	29 Sep 2006 19:53:54 -0000	1.153
+++ build.sh	2 Dec 2006 20:54:27 -0000
@@ -979,9 +979,10 @@ EOF
 			eval echo "${f}=\'\$$(echo ${f})\'\;\ export\ ${f}" ${makewrapout}
 		fi
 	done
-	eval echo "USETOOLS=yes\; export USETOOLS" ${makewrapout}
 
 	eval cat <<EOF ${makewrapout}
+MAKEWRAPPERMACHINE=${makewrappermachine:-${MACHINE}}; export MAKEWRAPPERMACHINE
+USETOOLS=yes; export USETOOLS
 
 exec "\${TOOLDIR}/bin/${toolprefix}make" \${1+"\$@"}
 EOF
Index: share/mk/bsd.own.mk
===================================================================
RCS file: /cvsroot/src/share/mk/bsd.own.mk,v
retrieving revision 1.484
diff -p -u -u -p -r1.484 bsd.own.mk
--- share/mk/bsd.own.mk	12 Nov 2006 02:44:51 -0000	1.484
+++ share/mk/bsd.own.mk	2 Dec 2006 20:55:15 -0000
@@ -245,7 +245,7 @@ TOOL_MAKEFS=		${TOOLDIR}/bin/${_TOOL_PRE
 TOOL_MAKEINFO=		${TOOLDIR}/bin/${_TOOL_PREFIX}makeinfo
 TOOL_MAKEWHATIS=	${TOOLDIR}/bin/${_TOOL_PREFIX}makewhatis
 TOOL_MDSETIMAGE=	${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-mdsetimage
-TOOL_DISKLABEL=		${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-disklabel
+TOOL_DISKLABEL=		${TOOLDIR}/bin/${MAKEWRAPPERMACHINE}-disklabel
 TOOL_FDISK=		${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-fdisk
 TOOL_MENUC=		MENUDEF=${TOOLDIR}/share/misc ${TOOLDIR}/bin/${_TOOL_PREFIX}menuc
 TOOL_MIPSELF2ECOFF=	${TOOLDIR}/bin/${_TOOL_PREFIX}mips-elf2ecoff
Index: tools/disklabel/Makefile
===================================================================
RCS file: /cvsroot/src/tools/disklabel/Makefile,v
retrieving revision 1.1
diff -p -u -u -p -r1.1 Makefile
--- tools/disklabel/Makefile	12 Jun 2005 19:46:17 -0000	1.1
+++ tools/disklabel/Makefile	2 Dec 2006 20:55:31 -0000
@@ -1,6 +1,6 @@
 #	$NetBSD: Makefile,v 1.1 2005/06/12 19:46:17 dyoung Exp $
 
-HOSTPROGNAME=	${MACHINE_GNU_PLATFORM}-disklabel
+HOSTPROGNAME=	${MAKEWRAPPERMACHINE}-disklabel
 HOST_SRCDIR=	sbin/disklabel
 HOST_SRCS=	getcap.c disklabel.c
 


--r5Pyd7+fXNt84Ff3--