Thu May 27 08:41:35 2021 UTC ()
If we are building date earlier, we need to use an uninstalled copy
of host-mkdep and libnbcompat otherwise the build process looks for
tools that might not be there yet (e.g. fresh build).
Reviewed by martin.


(cjep)
diff -r1.210 -r1.211 src/tools/Makefile
diff -r1.1 -r1.2 src/tools/date/Makefile

cvs diff -r1.210 -r1.211 src/tools/Makefile (expand / switch to unified diff)

--- src/tools/Makefile 2021/05/26 20:19:15 1.210
+++ src/tools/Makefile 2021/05/27 08:41:35 1.211
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile,v 1.210 2021/05/26 20:19:15 christos Exp $ 1# $NetBSD: Makefile,v 1.211 2021/05/27 08:41:35 cjep Exp $
2 2
3.include <bsd.own.mk> 3.include <bsd.own.mk>
4.include <bsd.endian.mk> 4.include <bsd.endian.mk>
5 5
6# Make sure that the ordered build/install processing applies when using 6# Make sure that the ordered build/install processing applies when using
7# plain make. 7# plain make.
8.MAIN: build_install 8.MAIN: build_install
9 9
10# TOOLDIR must be valid, unless MKTOOLS=no 10# TOOLDIR must be valid, unless MKTOOLS=no
11.if ${MKTOOLS:Uyes} != "no" 11.if ${MKTOOLS:Uyes} != "no"
12.if "${TOOLDIR}" == "" 12.if "${TOOLDIR}" == ""
13.error "TOOLDIR is undefined or empty" 13.error "TOOLDIR is undefined or empty"
14.elif "${TOOLDIR:tW:M/*}" == "" 14.elif "${TOOLDIR:tW:M/*}" == ""
@@ -70,33 +70,37 @@ LINT_BITS= @@ -70,33 +70,37 @@ LINT_BITS=
70.if ${MKLINT} != "no" 70.if ${MKLINT} != "no"
71LINT_BITS= lint lint2 71LINT_BITS= lint lint2
72.endif 72.endif
73 73
74# All of host-mkdep, compat, and binstall are needed before anything 74# All of host-mkdep, compat, and binstall are needed before anything
75# else. Within this group, they must be built in a specific order, and 75# else. Within this group, they must be built in a specific order, and
76# all of them must be built before any of them is installed. They may 76# all of them must be built before any of them is installed. They may
77# be installed in any order. This can't be expressed using the .WAIT 77# be installed in any order. This can't be expressed using the .WAIT
78# notation inside the SUBDIR list. 78# notation inside the SUBDIR list.
79# 79#
80# XXX .ORDER does not work when multiple targets are passed on the 80# XXX .ORDER does not work when multiple targets are passed on the
81# make command line without "-j", so use dependencies in addition to .ORDER. 81# make command line without "-j", so use dependencies in addition to .ORDER.
82# 82#
83.ORDER: dependall-host-mkdep dependall-compat dependall-binstall 83.ORDER: dependall-host-mkdep dependall-compat dependall-binstall \
 84 dependall-date
84.if make(dependall-host-mkdep) && make(dependall-compat) 85.if make(dependall-host-mkdep) && make(dependall-compat)
85dependall-compat: dependall-host-mkdep 86dependall-compat: dependall-host-mkdep
86.endif 87.endif
87.if make(dependall-compat) && make(dependall-binstall) 88.if make(dependall-compat) && make(dependall-binstall)
88dependall-binstall: dependall-compat 89dependall-binstall: dependall-compat
89.endif 90.endif
 91.if make(dependall-date)
 92dependall-date: dependall-host-mkdep dependall-compat
 93.endif
90 94
91# Dependencies in SUBDIR below ordered to maximize parallel ability. 95# Dependencies in SUBDIR below ordered to maximize parallel ability.
92# See above for special treatment for host-mkdep, compat, and binstall. 96# See above for special treatment for host-mkdep, compat, and binstall.
93# 97#
94SUBDIR= host-mkdep compat binstall date \ 98SUBDIR= host-mkdep compat binstall date \
95 .WAIT mktemp .WAIT sed .WAIT genassym 99 .WAIT mktemp .WAIT sed .WAIT genassym
96.if ${TOOLS_BUILDRUMP} == "no" 100.if ${TOOLS_BUILDRUMP} == "no"
97SUBDIR+= cap_mkdb crunchgen ctags gencat hexdump \ 101SUBDIR+= cap_mkdb crunchgen ctags gencat hexdump \
98 ${LINT_BITS} \ 102 ${LINT_BITS} \
99 makewhatis mtree nbperf .WAIT uudecode 103 makewhatis mtree nbperf .WAIT uudecode
100.endif 104.endif
101 105
102SUBDIR+= cat rpcgen join lorder m4 mkdep tsort .WAIT yacc .WAIT awk .WAIT lex 106SUBDIR+= cat rpcgen join lorder m4 mkdep tsort .WAIT yacc .WAIT awk .WAIT lex

cvs diff -r1.1 -r1.2 src/tools/date/Makefile (expand / switch to unified diff)

--- src/tools/date/Makefile 2021/05/26 20:19:15 1.1
+++ src/tools/date/Makefile 2021/05/27 08:41:35 1.2
@@ -1,6 +1,22 @@ @@ -1,6 +1,22 @@
1# $NetBSD: Makefile,v 1.1 2021/05/26 20:19:15 christos Exp $ 1# $NetBSD: Makefile,v 1.2 2021/05/27 08:41:35 cjep Exp $
 2
 3.include <bsd.hostinit.mk>
2 4
3HOSTPROGNAME= ${_TOOL_PREFIX}date 5HOSTPROGNAME= ${_TOOL_PREFIX}date
4HOST_SRCDIR= bin/date 6HOST_SRCDIR= bin/date
5 7
 8# Prevent Makefile.host from trying to use the version of libnbcompat
 9# from ${TOOLDIR}.
 10NOCOMPATLIB=
 11
 12# Use uninstalled copy of host-mkdep
 13HOST_MKDEP_OBJ!= cd ${.CURDIR}/../host-mkdep && ${PRINTOBJDIR}
 14HOST_MKDEP= ${HOST_MKDEP_OBJ}/host-mkdep
 15MKDEP= ${HOST_MKDEP}
 16
 17# Use uninstalled copy of libnbcompat and associated *.h files
 18COMPATLIB_UNINSTALLED= yes
 19COMPATOBJ!= cd ${NETBSDSRCDIR}/tools/compat && ${PRINTOBJDIR}
 20.-include "${COMPATOBJ}/defs.mk"
 21
6.include "${.CURDIR}/../Makefile.host" 22.include "${.CURDIR}/../Makefile.host"