Makefile.inc1: Make bootstrap mandoc's bootstrap libz dependency conditional

We bootstrap libz unconditionally on macOS and Linux, and conditionally
on FreeBSD if pre-1600029 or DISK_IMAGE_TOOLS_BOOTSTRAP is enabled, but
if building on new enough -CURRENT without DISK_IMAGE_TOOLS_BOOTSTRAP
then libz is not bootstrapped and so this libz dependency does not
exist. Add the dependency whenever we are bootstrapping libz but not
otherwise, and do so without duplicating the condition.

Fixes:		1dbcc7ee92 ("Makefile.inc1: Make sure mandoc bootstrap tool depends on libz")
MFC after:	1 week
This commit is contained in:
Jessica Clarke committed 2026-10-29 12:29:54 +00:00
1 parent 13bcc9a882
commit 983cb64c05
1 file changed
+6 -1
+6 -1
View File
@@ -2779,7 +2779,7 @@ ${_bt}-${_tool}: ${_bt}-usr.bin/yacc ${_bt_lex_depend}
.endfor
.endif
${_bt}-usr.bin/mandoc: ${_bt}-lib/libopenbsd ${_bt}-lib/libz
${_bt}-usr.bin/mandoc: ${_bt}-lib/libopenbsd
# The tools listed in _basic_bootstrap_tools will generally not be
# bootstrapped unless BOOTSTRAP_ALL_TOOL is set. However, when building on a
@@ -2979,6 +2979,11 @@ ${_bt}-usr.bin/sort: ${_bt}-lib/libmd
${_bt}-usr.bin/xinstall: ${_bt}-lib/libmd
${_bt}-sbin/md5: ${_bt}-lib/libmd
.endif
.if target(${_bt}-lib/libz)
# If we are bootstrapping libz (e.g. when building on macOS/Linux) add the
# necessary dependency:
${_bt}-usr.bin/mandoc: ${_bt}-lib/libz
.endif
#