From 735b9693ea1f5a16a30dc31c18d65015f2f13c8c Mon Sep 17 00:00:00 2001 From: rin Date: Thu, 6 May 2021 13:23:36 +0000 Subject: [PATCH] PR port-mvme68k/56146 Build wrtvid as tools. --- share/mk/bsd.own.mk | 4 +++- sys/arch/mvme68k/stand/Makefile | 6 +----- sys/arch/mvme68k/stand/Makefile.booters | 11 ++--------- sys/arch/mvme68k/stand/wrtvid/Makefile | 14 +++++--------- sys/arch/mvme68k/stand/wrtvid/wrtvid.c | 6 +++++- tools/Makefile | 6 +++++- tools/mvme68k-wrtvid/Makefile | 6 ++++++ 7 files changed, 27 insertions(+), 26 deletions(-) create mode 100644 tools/mvme68k-wrtvid/Makefile diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk index ee0775671db3..82d5e49e5a5d 100644 --- a/share/mk/bsd.own.mk +++ b/share/mk/bsd.own.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1246 2021/04/25 21:55:58 christos Exp $ +# $NetBSD: bsd.own.mk,v 1.1247 2021/05/06 13:23:36 rin Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -492,6 +492,7 @@ TOOL_MKUBOOTIMAGE= ${TOOLDIR}/bin/${_TOOL_PREFIX}mkubootimage TOOL_ELFTOSB= ${TOOLDIR}/bin/${_TOOL_PREFIX}elftosb TOOL_MSGC= MSGDEF=${TOOLDIR}/share/misc ${TOOLDIR}/bin/${_TOOL_PREFIX}msgc TOOL_MTREE= ${TOOLDIR}/bin/${_TOOL_PREFIX}mtree +TOOL_MVME68KWRTVID= ${TOOLDIR}/bin/${_TOOL_PREFIX}mvme68k-wrtvid TOOL_NBPERF= ${TOOLDIR}/bin/${_TOOL_PREFIX}perf TOOL_NCDCS= ${TOOLDIR}/bin/${_TOOL_PREFIX}ibmnws-ncdcs TOOL_PAX= ${TOOLDIR}/bin/${_TOOL_PREFIX}pax @@ -606,6 +607,7 @@ TOOL_MKUBOOTIMAGE= mkubootimage TOOL_ELFTOSB= elftosb TOOL_MSGC= msgc TOOL_MTREE= mtree +TOOL_MVME68KWRTVID= wrtvid TOOL_NBPERF= nbperf TOOL_NCDCS= ncdcs TOOL_PAX= pax diff --git a/sys/arch/mvme68k/stand/Makefile b/sys/arch/mvme68k/stand/Makefile index 71ceff6592e2..79bcc0e1f81d 100644 --- a/sys/arch/mvme68k/stand/Makefile +++ b/sys/arch/mvme68k/stand/Makefile @@ -1,10 +1,6 @@ -# $NetBSD: Makefile,v 1.6 2009/01/19 23:09:16 he Exp $ +# $NetBSD: Makefile,v 1.7 2021/05/06 13:23:36 rin Exp $ SUBDIR= libbug libsa .WAIT sboot netboot bootxx bootsd bootst \ installboot -.ifmake !install -SUBDIR+= wrtvid -.endif - .include diff --git a/sys/arch/mvme68k/stand/Makefile.booters b/sys/arch/mvme68k/stand/Makefile.booters index 159881d13adb..462ddd21da01 100644 --- a/sys/arch/mvme68k/stand/Makefile.booters +++ b/sys/arch/mvme68k/stand/Makefile.booters @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.booters,v 1.27 2021/04/15 01:54:39 mrg Exp $ +# $NetBSD: Makefile.booters,v 1.28 2021/05/06 13:23:36 rin Exp $ S?= ${.CURDIR}/../../../.. MDEC_DIR?= /usr/mdec @@ -73,13 +73,6 @@ $(BUGCRT): @echo making sure the bugcrt is up to date... @(cd ${LIB_BUG_DIR}; ${MAKE} bugstart.o) -WRTVID_BOOT_DIR= ${.CURDIR}/../wrtvid -WRTVID_DIR!= cd ${WRTVID_BOOT_DIR} && ${PRINTOBJDIR} -WRTVID=${WRTVID_DIR}/wrtvid - -.PHONY: ${WRTVID} -${WRTVID}: - @echo making sure the wrtvid is up to date... - @(cd ${WRTVID_BOOT_DIR}; ${MAKE} dependall) +WRTVID= ${TOOL_MVME68KWRTVID} .endif diff --git a/sys/arch/mvme68k/stand/wrtvid/Makefile b/sys/arch/mvme68k/stand/wrtvid/Makefile index 00c7a4e92380..333af2d2428b 100644 --- a/sys/arch/mvme68k/stand/wrtvid/Makefile +++ b/sys/arch/mvme68k/stand/wrtvid/Makefile @@ -1,12 +1,8 @@ -# $NetBSD: Makefile,v 1.12 2018/05/01 19:59:45 christos Exp $ +# $NetBSD: Makefile,v 1.13 2021/05/06 13:23:36 rin Exp $ -S=${.CURDIR}/../../../../ +.include -.include +PROG= wrtvid +MKMAN= no -HOSTPROG= wrtvid - -# only needed during build -proginstall:: - -.include +.include diff --git a/sys/arch/mvme68k/stand/wrtvid/wrtvid.c b/sys/arch/mvme68k/stand/wrtvid/wrtvid.c index addccf83d0fb..045d3127dfb3 100644 --- a/sys/arch/mvme68k/stand/wrtvid/wrtvid.c +++ b/sys/arch/mvme68k/stand/wrtvid/wrtvid.c @@ -1,4 +1,4 @@ -/* $NetBSD: wrtvid.c,v 1.9 2019/01/08 00:00:53 rin Exp $ */ +/* $NetBSD: wrtvid.c,v 1.10 2021/05/06 13:23:36 rin Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -29,6 +29,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#if HAVE_NBTOOL_CONFIG_H +#include "nbtool_config.h" +#endif + #include #include #include diff --git a/tools/Makefile b/tools/Makefile index 6ef0dc6ec18c..4a09be80d02d 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.208 2021/04/25 15:11:28 christos Exp $ +# $NetBSD: Makefile,v 1.209 2021/05/06 13:23:36 rin Exp $ .include .include @@ -219,6 +219,10 @@ SUBDIR+= libfdt .WAIT SUBDIR+= dtc .endif +.if ${MACHINE} == "mvme68k" +SUBDIR+= mvme68k-wrtvid +.endif + .if ${MKX11} != "no" SUBDIR+= makestrs SUBDIR+= makekeys diff --git a/tools/mvme68k-wrtvid/Makefile b/tools/mvme68k-wrtvid/Makefile new file mode 100644 index 000000000000..5f35254e8763 --- /dev/null +++ b/tools/mvme68k-wrtvid/Makefile @@ -0,0 +1,6 @@ +# $NetBSD: Makefile,v 1.1 2021/05/06 13:23:36 rin Exp $ + +HOSTPROGNAME= ${_TOOL_PREFIX}mvme68k-wrtvid +HOST_SRCDIR= sys/arch/mvme68k/stand/wrtvid + +.include "${.CURDIR}/../Makefile.host"