Wed Dec 2 14:11:20 2009 UTC ()
Define lists of MK* variable names as _MKVARS.yes and _MKVARS.no.  They're
referred to by syspkg.


(uebayasi)
diff -r1.599 -r1.600 src/share/mk/bsd.own.mk

cvs diff -r1.599 -r1.600 src/share/mk/bsd.own.mk (switch to unified diff)

--- src/share/mk/bsd.own.mk 2009/12/01 09:09:40 1.599
+++ src/share/mk/bsd.own.mk 2009/12/02 14:11:20 1.600
@@ -1,1040 +1,1042 @@ @@ -1,1040 +1,1042 @@
1# $NetBSD: bsd.own.mk,v 1.599 2009/12/01 09:09:40 uebayasi Exp $ 1# $NetBSD: bsd.own.mk,v 1.600 2009/12/02 14:11:20 uebayasi Exp $
2 2
3.if !defined(_BSD_OWN_MK_) 3.if !defined(_BSD_OWN_MK_)
4_BSD_OWN_MK_=1 4_BSD_OWN_MK_=1
5 5
6MAKECONF?= /etc/mk.conf 6MAKECONF?= /etc/mk.conf
7.-include "${MAKECONF}" 7.-include "${MAKECONF}"
8 8
9# 9#
10# CPU model, derived from MACHINE_ARCH 10# CPU model, derived from MACHINE_ARCH
11# 11#
12MACHINE_CPU= ${MACHINE_ARCH:C/mipse[bl]/mips/:C/mips64e[bl]/mips/:C/sh3e[bl]/sh3/:S/m68000/m68k/:S/armeb/arm/} 12MACHINE_CPU= ${MACHINE_ARCH:C/mipse[bl]/mips/:C/mips64e[bl]/mips/:C/sh3e[bl]/sh3/:S/m68000/m68k/:S/armeb/arm/}
13 13
14# 14#
15# Subdirectory used below ${RELEASEDIR} when building a release 15# Subdirectory used below ${RELEASEDIR} when building a release
16# 16#
17RELEASEMACHINEDIR?= ${MACHINE} 17RELEASEMACHINEDIR?= ${MACHINE}
18 18
19# 19#
20# Subdirectory or path component used for the following paths: 20# Subdirectory or path component used for the following paths:
21# distrib/${RELEASEMACHINE} 21# distrib/${RELEASEMACHINE}
22# distrib/notes/${RELEASEMACHINE} 22# distrib/notes/${RELEASEMACHINE}
23# etc/etc.${RELEASEMACHINE} 23# etc/etc.${RELEASEMACHINE}
24# Used when building a release. 24# Used when building a release.
25# 25#
26RELEASEMACHINE?= ${MACHINE} 26RELEASEMACHINE?= ${MACHINE}
27 27
28# 28#
29# NEED_OWN_INSTALL_TARGET is set to "no" by pkgsrc/mk/bsd.pkg.mk to 29# NEED_OWN_INSTALL_TARGET is set to "no" by pkgsrc/mk/bsd.pkg.mk to
30# ensure that things defined by <bsd.own.mk> (default targets, 30# ensure that things defined by <bsd.own.mk> (default targets,
31# INSTALL_FILE, etc.) are not conflicting with bsd.pkg.mk. 31# INSTALL_FILE, etc.) are not conflicting with bsd.pkg.mk.
32# 32#
33NEED_OWN_INSTALL_TARGET?= yes 33NEED_OWN_INSTALL_TARGET?= yes
34 34
35# 35#
36# This lists the platforms which do not have working in-tree toolchains. 36# This lists the platforms which do not have working in-tree toolchains.
37# For the in-tree gcc 3.3.2 toolchain, this list is empty. 37# For the in-tree gcc 3.3.2 toolchain, this list is empty.
38# If some future port is not supported by the in-tree toolchain, this 38# If some future port is not supported by the in-tree toolchain, this
39# should be set to "yes" for that port only. 39# should be set to "yes" for that port only.
40# 40#
41TOOLCHAIN_MISSING?= no 41TOOLCHAIN_MISSING?= no
42 42
43# default to GCC4 43# default to GCC4
44.if !defined(HAVE_GCC) && !defined(HAVE_PCC) 44.if !defined(HAVE_GCC) && !defined(HAVE_PCC)
45HAVE_GCC= 4 45HAVE_GCC= 4
46.endif 46.endif
47 47
48# default to GDB6 48# default to GDB6
49HAVE_GDB?= 6 49HAVE_GDB?= 6
50 50
51# default to binutils 2.19 51# default to binutils 2.19
52HAVE_BINUTILS?= 219 52HAVE_BINUTILS?= 219
53 53
54CPPFLAG_ISYSTEM= -isystem 54CPPFLAG_ISYSTEM= -isystem
55.if defined(HAVE_GCC) 55.if defined(HAVE_GCC)
56.if ${HAVE_GCC} == 3 56.if ${HAVE_GCC} == 3
57CPPFLAG_ISYSTEMXX= -isystem-cxx 57CPPFLAG_ISYSTEMXX= -isystem-cxx
58.else # GCC 4 58.else # GCC 4
59CPPFLAG_ISYSTEMXX= -cxx-isystem 59CPPFLAG_ISYSTEMXX= -cxx-isystem
60.endif 60.endif
61.endif 61.endif
62 62
63.if empty(.MAKEFLAGS:M-V*) 63.if empty(.MAKEFLAGS:M-V*)
64.if defined(MAKEOBJDIRPREFIX) || defined(MAKEOBJDIR) 64.if defined(MAKEOBJDIRPREFIX) || defined(MAKEOBJDIR)
65PRINTOBJDIR= ${MAKE} -r -V .OBJDIR -f /dev/null xxx 65PRINTOBJDIR= ${MAKE} -r -V .OBJDIR -f /dev/null xxx
66.else 66.else
67PRINTOBJDIR= ${MAKE} -V .OBJDIR 67PRINTOBJDIR= ${MAKE} -V .OBJDIR
68.endif 68.endif
69.else 69.else
70PRINTOBJDIR= echo # prevent infinite recursion 70PRINTOBJDIR= echo # prevent infinite recursion
71.endif 71.endif
72 72
73# 73#
74# Determine if running in the NetBSD source tree by checking for the 74# Determine if running in the NetBSD source tree by checking for the
75# existence of build.sh and tools/ in the current or a parent directory, 75# existence of build.sh and tools/ in the current or a parent directory,
76# and setting _SRC_TOP_ to the result. 76# and setting _SRC_TOP_ to the result.
77# 77#
78.if !defined(_SRC_TOP_) # { 78.if !defined(_SRC_TOP_) # {
79_SRC_TOP_!= cd ${.CURDIR}; while :; do \ 79_SRC_TOP_!= cd ${.CURDIR}; while :; do \
80 here=`pwd`; \ 80 here=`pwd`; \
81 [ -f build.sh ] && [ -d tools ] && { echo $$here; break; }; \ 81 [ -f build.sh ] && [ -d tools ] && { echo $$here; break; }; \
82 case $$here in /) echo ""; break;; esac; \ 82 case $$here in /) echo ""; break;; esac; \
83 cd ..; done 83 cd ..; done
84 84
85.MAKEOVERRIDES+= _SRC_TOP_ 85.MAKEOVERRIDES+= _SRC_TOP_
86 86
87.endif # } 87.endif # }
88 88
89# 89#
90# If _SRC_TOP_ != "", we're within the NetBSD source tree, so set 90# If _SRC_TOP_ != "", we're within the NetBSD source tree, so set
91# defaults for NETBSDSRCDIR and _SRC_TOP_OBJ_. 91# defaults for NETBSDSRCDIR and _SRC_TOP_OBJ_.
92# 92#
93.if (${_SRC_TOP_} != "") # { 93.if (${_SRC_TOP_} != "") # {
94 94
95NETBSDSRCDIR?= ${_SRC_TOP_} 95NETBSDSRCDIR?= ${_SRC_TOP_}
96 96
97.if !defined(_SRC_TOP_OBJ_) 97.if !defined(_SRC_TOP_OBJ_)
98_SRC_TOP_OBJ_!= cd ${_SRC_TOP_} && ${PRINTOBJDIR} 98_SRC_TOP_OBJ_!= cd ${_SRC_TOP_} && ${PRINTOBJDIR}
99.MAKEOVERRIDES+= _SRC_TOP_OBJ_ 99.MAKEOVERRIDES+= _SRC_TOP_OBJ_
100.endif 100.endif
101 101
102.endif # _SRC_TOP_ != "" # } 102.endif # _SRC_TOP_ != "" # }
103 103
104 104
105.if (${_SRC_TOP_} != "") && \ 105.if (${_SRC_TOP_} != "") && \
106 (${TOOLCHAIN_MISSING} == "no" || defined(EXTERNAL_TOOLCHAIN)) 106 (${TOOLCHAIN_MISSING} == "no" || defined(EXTERNAL_TOOLCHAIN))
107USETOOLS?= yes 107USETOOLS?= yes
108.endif 108.endif
109USETOOLS?= no 109USETOOLS?= no
110 110
111 111
112.if ${MACHINE_ARCH} == "mips" || ${MACHINE_ARCH} == "mips64" || \ 112.if ${MACHINE_ARCH} == "mips" || ${MACHINE_ARCH} == "mips64" || \
113 ${MACHINE_ARCH} == "sh3" 113 ${MACHINE_ARCH} == "sh3"
114.BEGIN: 114.BEGIN:
115 @echo "Must set MACHINE_ARCH to one of ${MACHINE_ARCH}eb or ${MACHINE_ARCH}el" 115 @echo "Must set MACHINE_ARCH to one of ${MACHINE_ARCH}eb or ${MACHINE_ARCH}el"
116 @false 116 @false
117.elif defined(REQUIRETOOLS) && \ 117.elif defined(REQUIRETOOLS) && \
118 (${TOOLCHAIN_MISSING} == "no" || defined(EXTERNAL_TOOLCHAIN)) && \ 118 (${TOOLCHAIN_MISSING} == "no" || defined(EXTERNAL_TOOLCHAIN)) && \
119 ${USETOOLS} == "no" 119 ${USETOOLS} == "no"
120.BEGIN: 120.BEGIN:
121 @echo "USETOOLS=no, but this component requires a version-specific host toolchain" 121 @echo "USETOOLS=no, but this component requires a version-specific host toolchain"
122 @false 122 @false
123.endif 123.endif
124 124
125# 125#
126# Host platform information; may be overridden 126# Host platform information; may be overridden
127# 127#
128.if !defined(HOST_OSTYPE) 128.if !defined(HOST_OSTYPE)
129_HOST_OSNAME!= uname -s 129_HOST_OSNAME!= uname -s
130_HOST_OSREL!= uname -r 130_HOST_OSREL!= uname -r
131# For _HOST_ARCH, if uname -p fails, or prints "unknown", or prints 131# For _HOST_ARCH, if uname -p fails, or prints "unknown", or prints
132# something that does not look like an identifier, then use uname -m. 132# something that does not look like an identifier, then use uname -m.
133_HOST_ARCH!= uname -p 2>/dev/null 133_HOST_ARCH!= uname -p 2>/dev/null
134_HOST_ARCH:= ${HOST_ARCH:tW:C/.*[^-_A-Za-z0-9].*//:S/unknown//} 134_HOST_ARCH:= ${HOST_ARCH:tW:C/.*[^-_A-Za-z0-9].*//:S/unknown//}
135.if empty(_HOST_ARCH) 135.if empty(_HOST_ARCH)
136_HOST_ARCH!= uname -m 136_HOST_ARCH!= uname -m
137.endif 137.endif
138HOST_OSTYPE:= ${_HOST_OSNAME}-${_HOST_OSREL:C/\([^\)]*\)//g:[*]:C/ /_/g}-${_HOST_ARCH:C/\([^\)]*\)//g:[*]:C/ /_/g} 138HOST_OSTYPE:= ${_HOST_OSNAME}-${_HOST_OSREL:C/\([^\)]*\)//g:[*]:C/ /_/g}-${_HOST_ARCH:C/\([^\)]*\)//g:[*]:C/ /_/g}
139.MAKEOVERRIDES+= HOST_OSTYPE 139.MAKEOVERRIDES+= HOST_OSTYPE
140.endif # !defined(HOST_OSTYPE) 140.endif # !defined(HOST_OSTYPE)
141 141
142.if ${USETOOLS} == "yes" # { 142.if ${USETOOLS} == "yes" # {
143 143
144# 144#
145# Provide a default for TOOLDIR. 145# Provide a default for TOOLDIR.
146# 146#
147.if !defined(TOOLDIR) 147.if !defined(TOOLDIR)
148TOOLDIR:= ${_SRC_TOP_OBJ_}/tooldir.${HOST_OSTYPE} 148TOOLDIR:= ${_SRC_TOP_OBJ_}/tooldir.${HOST_OSTYPE}
149.MAKEOVERRIDES+= TOOLDIR 149.MAKEOVERRIDES+= TOOLDIR
150.endif 150.endif
151 151
152# 152#
153# This is the prefix used for the NetBSD-sourced tools. 153# This is the prefix used for the NetBSD-sourced tools.
154# 154#
155_TOOL_PREFIX?= nb 155_TOOL_PREFIX?= nb
156 156
157# 157#
158# If an external toolchain base is specified, use it. 158# If an external toolchain base is specified, use it.
159# 159#
160.if defined(EXTERNAL_TOOLCHAIN) # { 160.if defined(EXTERNAL_TOOLCHAIN) # {
161AR= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ar 161AR= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ar
162AS= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-as 162AS= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-as
163LD= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ld 163LD= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ld
164NM= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-nm 164NM= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-nm
165OBJCOPY= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-objcopy 165OBJCOPY= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-objcopy
166OBJDUMP= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-objdump 166OBJDUMP= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-objdump
167RANLIB= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ranlib 167RANLIB= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ranlib
168SIZE= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-size 168SIZE= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-size
169STRIP= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-strip 169STRIP= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-strip
170 170
171CC= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gcc 171CC= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gcc
172CPP= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-cpp 172CPP= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-cpp
173CXX= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-c++ 173CXX= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-c++
174FC= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-g77 174FC= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-g77
175OBJC= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gcc 175OBJC= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gcc
176.else # } { 176.else # } {
177# Define default locations for common tools. 177# Define default locations for common tools.
178.if ${USETOOLS_BINUTILS:Uyes} == "yes" # { 178.if ${USETOOLS_BINUTILS:Uyes} == "yes" # {
179AR= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ar 179AR= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ar
180AS= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-as 180AS= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-as
181LD= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ld 181LD= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ld
182NM= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-nm 182NM= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-nm
183OBJCOPY= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-objcopy 183OBJCOPY= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-objcopy
184OBJDUMP= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-objdump 184OBJDUMP= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-objdump
185RANLIB= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ranlib 185RANLIB= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ranlib
186SIZE= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-size 186SIZE= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-size
187STRIP= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-strip 187STRIP= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-strip
188.endif # } 188.endif # }
189 189
190.if defined(HAVE_GCC) && ${USETOOLS_GCC:Uyes} == "yes" # { 190.if defined(HAVE_GCC) && ${USETOOLS_GCC:Uyes} == "yes" # {
191CC= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gcc 191CC= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gcc
192CPP= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-cpp 192CPP= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-cpp
193CXX= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-c++ 193CXX= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-c++
194FC= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-g77 194FC= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-g77
195OBJC= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gcc 195OBJC= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gcc
196.endif # } 196.endif # }
197 197
198.if defined(HAVE_PCC) && ${USETOOLS_PCC:Uyes} == "yes" 198.if defined(HAVE_PCC) && ${USETOOLS_PCC:Uyes} == "yes"
199CC= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-pcc 199CC= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-pcc
200CPP= ${TOOLDIR}/libexec/${MACHINE_GNU_PLATFORM}-cpp 200CPP= ${TOOLDIR}/libexec/${MACHINE_GNU_PLATFORM}-cpp
201CXX= false 201CXX= false
202FC= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-f77 202FC= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-f77
203OBJC= false 203OBJC= false
204.endif 204.endif
205 205
206.endif # EXTERNAL_TOOLCHAIN # } 206.endif # EXTERNAL_TOOLCHAIN # }
207 207
208HOST_MKDEP= ${TOOLDIR}/bin/${_TOOL_PREFIX}host-mkdep 208HOST_MKDEP= ${TOOLDIR}/bin/${_TOOL_PREFIX}host-mkdep
209 209
210DBSYM= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-dbsym 210DBSYM= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-dbsym
211ELF2ECOFF= ${TOOLDIR}/bin/${_TOOL_PREFIX}mips-elf2ecoff 211ELF2ECOFF= ${TOOLDIR}/bin/${_TOOL_PREFIX}mips-elf2ecoff
212INSTALL= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-install 212INSTALL= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-install
213LEX= ${TOOLDIR}/bin/${_TOOL_PREFIX}lex 213LEX= ${TOOLDIR}/bin/${_TOOL_PREFIX}lex
214LINT= CC=${CC:Q} ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-lint 214LINT= CC=${CC:Q} ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-lint
215LORDER= NM=${NM:Q} MKTEMP=${TOOL_MKTEMP:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}lorder 215LORDER= NM=${NM:Q} MKTEMP=${TOOL_MKTEMP:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}lorder
216MKDEP= CC=${CC:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}mkdep 216MKDEP= CC=${CC:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}mkdep
217PAXCTL= ${TOOLDIR}/bin/${_TOOL_PREFIX}paxctl 217PAXCTL= ${TOOLDIR}/bin/${_TOOL_PREFIX}paxctl
218TSORT= ${TOOLDIR}/bin/${_TOOL_PREFIX}tsort -q 218TSORT= ${TOOLDIR}/bin/${_TOOL_PREFIX}tsort -q
219YACC= ${TOOLDIR}/bin/${_TOOL_PREFIX}yacc 219YACC= ${TOOLDIR}/bin/${_TOOL_PREFIX}yacc
220 220
221TOOL_AMIGAAOUT2BB= ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-aout2bb 221TOOL_AMIGAAOUT2BB= ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-aout2bb
222TOOL_AMIGAELF2BB= ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-elf2bb 222TOOL_AMIGAELF2BB= ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-elf2bb
223TOOL_AMIGATXLT= ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-txlt 223TOOL_AMIGATXLT= ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-txlt
224TOOL_ASN1_COMPILE= ${TOOLDIR}/bin/${_TOOL_PREFIX}asn1_compile 224TOOL_ASN1_COMPILE= ${TOOLDIR}/bin/${_TOOL_PREFIX}asn1_compile
225TOOL_ATF_COMPILE= ${TOOLDIR}/bin/${_TOOL_PREFIX}atf-compile 225TOOL_ATF_COMPILE= ${TOOLDIR}/bin/${_TOOL_PREFIX}atf-compile
226TOOL_AWK= ${TOOLDIR}/bin/${_TOOL_PREFIX}awk 226TOOL_AWK= ${TOOLDIR}/bin/${_TOOL_PREFIX}awk
227TOOL_CAP_MKDB= ${TOOLDIR}/bin/${_TOOL_PREFIX}cap_mkdb 227TOOL_CAP_MKDB= ${TOOLDIR}/bin/${_TOOL_PREFIX}cap_mkdb
228TOOL_CAT= ${TOOLDIR}/bin/${_TOOL_PREFIX}cat 228TOOL_CAT= ${TOOLDIR}/bin/${_TOOL_PREFIX}cat
229TOOL_CKSUM= ${TOOLDIR}/bin/${_TOOL_PREFIX}cksum 229TOOL_CKSUM= ${TOOLDIR}/bin/${_TOOL_PREFIX}cksum
230TOOL_COMPILE_ET= ${TOOLDIR}/bin/${_TOOL_PREFIX}compile_et 230TOOL_COMPILE_ET= ${TOOLDIR}/bin/${_TOOL_PREFIX}compile_et
231TOOL_CONFIG= ${TOOLDIR}/bin/${_TOOL_PREFIX}config 231TOOL_CONFIG= ${TOOLDIR}/bin/${_TOOL_PREFIX}config
232TOOL_CRUNCHGEN= MAKE=${.MAKE:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}crunchgen 232TOOL_CRUNCHGEN= MAKE=${.MAKE:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}crunchgen
233TOOL_CTAGS= ${TOOLDIR}/bin/${_TOOL_PREFIX}ctags 233TOOL_CTAGS= ${TOOLDIR}/bin/${_TOOL_PREFIX}ctags
234TOOL_DB= ${TOOLDIR}/bin/${_TOOL_PREFIX}db 234TOOL_DB= ${TOOLDIR}/bin/${_TOOL_PREFIX}db
235TOOL_DISKLABEL= ${TOOLDIR}/bin/nbdisklabel-${MAKEWRAPPERMACHINE} 235TOOL_DISKLABEL= ${TOOLDIR}/bin/nbdisklabel-${MAKEWRAPPERMACHINE}
236TOOL_EQN= ${TOOLDIR}/bin/${_TOOL_PREFIX}eqn 236TOOL_EQN= ${TOOLDIR}/bin/${_TOOL_PREFIX}eqn
237TOOL_FDISK= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-fdisk 237TOOL_FDISK= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-fdisk
238TOOL_FGEN= ${TOOLDIR}/bin/${_TOOL_PREFIX}fgen 238TOOL_FGEN= ${TOOLDIR}/bin/${_TOOL_PREFIX}fgen
239TOOL_GENASSYM= ${TOOLDIR}/bin/${_TOOL_PREFIX}genassym 239TOOL_GENASSYM= ${TOOLDIR}/bin/${_TOOL_PREFIX}genassym
240TOOL_GENCAT= ${TOOLDIR}/bin/${_TOOL_PREFIX}gencat 240TOOL_GENCAT= ${TOOLDIR}/bin/${_TOOL_PREFIX}gencat
241TOOL_GMAKE= ${TOOLDIR}/bin/${_TOOL_PREFIX}gmake 241TOOL_GMAKE= ${TOOLDIR}/bin/${_TOOL_PREFIX}gmake
242TOOL_GREP= ${TOOLDIR}/bin/${_TOOL_PREFIX}grep 242TOOL_GREP= ${TOOLDIR}/bin/${_TOOL_PREFIX}grep
243TOOL_GROFF= PATH=${TOOLDIR}/lib/groff:$${PATH} ${TOOLDIR}/bin/${_TOOL_PREFIX}groff 243TOOL_GROFF= PATH=${TOOLDIR}/lib/groff:$${PATH} ${TOOLDIR}/bin/${_TOOL_PREFIX}groff
244TOOL_HEXDUMP= ${TOOLDIR}/bin/${_TOOL_PREFIX}hexdump 244TOOL_HEXDUMP= ${TOOLDIR}/bin/${_TOOL_PREFIX}hexdump
245TOOL_HP300MKBOOT= ${TOOLDIR}/bin/${_TOOL_PREFIX}hp300-mkboot 245TOOL_HP300MKBOOT= ${TOOLDIR}/bin/${_TOOL_PREFIX}hp300-mkboot
246TOOL_HP700MKBOOT= ${TOOLDIR}/bin/${_TOOL_PREFIX}hp700-mkboot 246TOOL_HP700MKBOOT= ${TOOLDIR}/bin/${_TOOL_PREFIX}hp700-mkboot
247TOOL_INDXBIB= ${TOOLDIR}/bin/${_TOOL_PREFIX}indxbib 247TOOL_INDXBIB= ${TOOLDIR}/bin/${_TOOL_PREFIX}indxbib
248TOOL_INSTALLBOOT= ${TOOLDIR}/bin/${_TOOL_PREFIX}installboot 248TOOL_INSTALLBOOT= ${TOOLDIR}/bin/${_TOOL_PREFIX}installboot
249TOOL_INSTALL_INFO= ${TOOLDIR}/bin/${_TOOL_PREFIX}install-info 249TOOL_INSTALL_INFO= ${TOOLDIR}/bin/${_TOOL_PREFIX}install-info
250TOOL_JOIN= ${TOOLDIR}/bin/${_TOOL_PREFIX}join 250TOOL_JOIN= ${TOOLDIR}/bin/${_TOOL_PREFIX}join
251TOOL_M4= ${TOOLDIR}/bin/${_TOOL_PREFIX}m4 251TOOL_M4= ${TOOLDIR}/bin/${_TOOL_PREFIX}m4
252TOOL_MACPPCFIXCOFF= ${TOOLDIR}/bin/${_TOOL_PREFIX}macppc-fixcoff 252TOOL_MACPPCFIXCOFF= ${TOOLDIR}/bin/${_TOOL_PREFIX}macppc-fixcoff
253TOOL_MAKEFS= ${TOOLDIR}/bin/${_TOOL_PREFIX}makefs 253TOOL_MAKEFS= ${TOOLDIR}/bin/${_TOOL_PREFIX}makefs
254TOOL_MAKEINFO= ${TOOLDIR}/bin/${_TOOL_PREFIX}makeinfo 254TOOL_MAKEINFO= ${TOOLDIR}/bin/${_TOOL_PREFIX}makeinfo
255TOOL_MAKEWHATIS= ${TOOLDIR}/bin/${_TOOL_PREFIX}makewhatis 255TOOL_MAKEWHATIS= ${TOOLDIR}/bin/${_TOOL_PREFIX}makewhatis
256TOOL_MANDOC_ASCII= ${TOOLDIR}/bin/${_TOOL_PREFIX}mandoc -Tascii 256TOOL_MANDOC_ASCII= ${TOOLDIR}/bin/${_TOOL_PREFIX}mandoc -Tascii
257TOOL_MANDOC_HTML= ${TOOLDIR}/bin/${_TOOL_PREFIX}mandoc -Thtml 257TOOL_MANDOC_HTML= ${TOOLDIR}/bin/${_TOOL_PREFIX}mandoc -Thtml
258TOOL_MANDOC_LINT= ${TOOLDIR}/bin/${_TOOL_PREFIX}mandoc -Tlint 258TOOL_MANDOC_LINT= ${TOOLDIR}/bin/${_TOOL_PREFIX}mandoc -Tlint
259TOOL_MDSETIMAGE= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-mdsetimage 259TOOL_MDSETIMAGE= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-mdsetimage
260TOOL_MENUC= MENUDEF=${TOOLDIR}/share/misc ${TOOLDIR}/bin/${_TOOL_PREFIX}menuc 260TOOL_MENUC= MENUDEF=${TOOLDIR}/share/misc ${TOOLDIR}/bin/${_TOOL_PREFIX}menuc
261TOOL_MIPSELF2ECOFF= ${TOOLDIR}/bin/${_TOOL_PREFIX}mips-elf2ecoff 261TOOL_MIPSELF2ECOFF= ${TOOLDIR}/bin/${_TOOL_PREFIX}mips-elf2ecoff
262TOOL_MKCSMAPPER= ${TOOLDIR}/bin/${_TOOL_PREFIX}mkcsmapper 262TOOL_MKCSMAPPER= ${TOOLDIR}/bin/${_TOOL_PREFIX}mkcsmapper
263TOOL_MKESDB= ${TOOLDIR}/bin/${_TOOL_PREFIX}mkesdb 263TOOL_MKESDB= ${TOOLDIR}/bin/${_TOOL_PREFIX}mkesdb
264TOOL_MKLOCALE= ${TOOLDIR}/bin/${_TOOL_PREFIX}mklocale 264TOOL_MKLOCALE= ${TOOLDIR}/bin/${_TOOL_PREFIX}mklocale
265TOOL_MKMAGIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}file 265TOOL_MKMAGIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}file
266TOOL_MKTEMP= ${TOOLDIR}/bin/${_TOOL_PREFIX}mktemp 266TOOL_MKTEMP= ${TOOLDIR}/bin/${_TOOL_PREFIX}mktemp
267TOOL_MSGC= MSGDEF=${TOOLDIR}/share/misc ${TOOLDIR}/bin/${_TOOL_PREFIX}msgc 267TOOL_MSGC= MSGDEF=${TOOLDIR}/share/misc ${TOOLDIR}/bin/${_TOOL_PREFIX}msgc
268TOOL_MTREE= ${TOOLDIR}/bin/${_TOOL_PREFIX}mtree 268TOOL_MTREE= ${TOOLDIR}/bin/${_TOOL_PREFIX}mtree
269TOOL_PAX= ${TOOLDIR}/bin/${_TOOL_PREFIX}pax 269TOOL_PAX= ${TOOLDIR}/bin/${_TOOL_PREFIX}pax
270TOOL_PIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}pic 270TOOL_PIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}pic
271TOOL_PKG_CREATE= ${TOOLDIR}/bin/${_TOOL_PREFIX}pkg_create 271TOOL_PKG_CREATE= ${TOOLDIR}/bin/${_TOOL_PREFIX}pkg_create
272TOOL_POWERPCMKBOOTIMAGE=${TOOLDIR}/bin/${_TOOL_PREFIX}powerpc-mkbootimage 272TOOL_POWERPCMKBOOTIMAGE=${TOOLDIR}/bin/${_TOOL_PREFIX}powerpc-mkbootimage
273TOOL_PWD_MKDB= ${TOOLDIR}/bin/${_TOOL_PREFIX}pwd_mkdb 273TOOL_PWD_MKDB= ${TOOLDIR}/bin/${_TOOL_PREFIX}pwd_mkdb
274TOOL_REFER= ${TOOLDIR}/bin/${_TOOL_PREFIX}refer 274TOOL_REFER= ${TOOLDIR}/bin/${_TOOL_PREFIX}refer
275TOOL_ROFF_ASCII= PATH=${TOOLDIR}/lib/groff:$${PATH} ${TOOLDIR}/bin/${_TOOL_PREFIX}nroff 275TOOL_ROFF_ASCII= PATH=${TOOLDIR}/lib/groff:$${PATH} ${TOOLDIR}/bin/${_TOOL_PREFIX}nroff
276TOOL_ROFF_DVI= ${TOOL_GROFF} -Tdvi 276TOOL_ROFF_DVI= ${TOOL_GROFF} -Tdvi
277TOOL_ROFF_HTML= ${TOOL_GROFF} -Tlatin1 -mdoc2html 277TOOL_ROFF_HTML= ${TOOL_GROFF} -Tlatin1 -mdoc2html
278TOOL_ROFF_PS= ${TOOL_GROFF} -Tps 278TOOL_ROFF_PS= ${TOOL_GROFF} -Tps
279TOOL_ROFF_RAW= ${TOOL_GROFF} -Z 279TOOL_ROFF_RAW= ${TOOL_GROFF} -Z
280TOOL_RPCGEN= RPCGEN_CPP=${CPP:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}rpcgen 280TOOL_RPCGEN= RPCGEN_CPP=${CPP:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}rpcgen
281TOOL_SED= ${TOOLDIR}/bin/${_TOOL_PREFIX}sed 281TOOL_SED= ${TOOLDIR}/bin/${_TOOL_PREFIX}sed
282TOOL_SOELIM= ${TOOLDIR}/bin/${_TOOL_PREFIX}soelim 282TOOL_SOELIM= ${TOOLDIR}/bin/${_TOOL_PREFIX}soelim
283TOOL_SPARKCRC= ${TOOLDIR}/bin/${_TOOL_PREFIX}sparkcrc 283TOOL_SPARKCRC= ${TOOLDIR}/bin/${_TOOL_PREFIX}sparkcrc
284TOOL_STAT= ${TOOLDIR}/bin/${_TOOL_PREFIX}stat 284TOOL_STAT= ${TOOLDIR}/bin/${_TOOL_PREFIX}stat
285TOOL_STRFILE= ${TOOLDIR}/bin/${_TOOL_PREFIX}strfile 285TOOL_STRFILE= ${TOOLDIR}/bin/${_TOOL_PREFIX}strfile
286TOOL_SUNLABEL= ${TOOLDIR}/bin/${_TOOL_PREFIX}sunlabel 286TOOL_SUNLABEL= ${TOOLDIR}/bin/${_TOOL_PREFIX}sunlabel
287TOOL_TBL= ${TOOLDIR}/bin/${_TOOL_PREFIX}tbl 287TOOL_TBL= ${TOOLDIR}/bin/${_TOOL_PREFIX}tbl
288TOOL_UUDECODE= ${TOOLDIR}/bin/${_TOOL_PREFIX}uudecode 288TOOL_UUDECODE= ${TOOLDIR}/bin/${_TOOL_PREFIX}uudecode
289TOOL_VGRIND= ${TOOLDIR}/bin/${_TOOL_PREFIX}vgrind -f 289TOOL_VGRIND= ${TOOLDIR}/bin/${_TOOL_PREFIX}vgrind -f
290TOOL_ZIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}zic 290TOOL_ZIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}zic
291 291
292.else # USETOOLS != yes # } { 292.else # USETOOLS != yes # } {
293 293
294TOOL_AMIGAAOUT2BB= amiga-aout2bb 294TOOL_AMIGAAOUT2BB= amiga-aout2bb
295TOOL_AMIGAELF2BB= amiga-elf2bb 295TOOL_AMIGAELF2BB= amiga-elf2bb
296TOOL_AMIGATXLT= amiga-txlt 296TOOL_AMIGATXLT= amiga-txlt
297TOOL_ASN1_COMPILE= asn1_compile 297TOOL_ASN1_COMPILE= asn1_compile
298TOOL_ATF_COMPILE= atf-compile 298TOOL_ATF_COMPILE= atf-compile
299TOOL_AWK= awk 299TOOL_AWK= awk
300TOOL_CAP_MKDB= cap_mkdb 300TOOL_CAP_MKDB= cap_mkdb
301TOOL_CAT= cat 301TOOL_CAT= cat
302TOOL_CKSUM= cksum 302TOOL_CKSUM= cksum
303TOOL_COMPILE_ET= compile_et 303TOOL_COMPILE_ET= compile_et
304TOOL_CONFIG= config 304TOOL_CONFIG= config
305TOOL_CRUNCHGEN= crunchgen 305TOOL_CRUNCHGEN= crunchgen
306TOOL_CTAGS= ctags 306TOOL_CTAGS= ctags
307TOOL_DB= db 307TOOL_DB= db
308TOOL_DISKLABEL= disklabel 308TOOL_DISKLABEL= disklabel
309TOOL_EQN= eqn 309TOOL_EQN= eqn
310TOOL_FDISK= fdisk 310TOOL_FDISK= fdisk
311TOOL_FGEN= fgen 311TOOL_FGEN= fgen
312TOOL_GENASSYM= genassym 312TOOL_GENASSYM= genassym
313TOOL_GENCAT= gencat 313TOOL_GENCAT= gencat
314TOOL_GMAKE= gmake 314TOOL_GMAKE= gmake
315TOOL_GREP= grep 315TOOL_GREP= grep
316TOOL_GROFF= groff 316TOOL_GROFF= groff
317TOOL_HEXDUMP= hexdump 317TOOL_HEXDUMP= hexdump
318TOOL_HP300MKBOOT= hp300-mkboot 318TOOL_HP300MKBOOT= hp300-mkboot
319TOOL_HP700MKBOOT= hp700-mkboot 319TOOL_HP700MKBOOT= hp700-mkboot
320TOOL_INDXBIB= indxbib 320TOOL_INDXBIB= indxbib
321TOOL_INSTALLBOOT= installboot 321TOOL_INSTALLBOOT= installboot
322TOOL_INSTALL_INFO= install-info 322TOOL_INSTALL_INFO= install-info
323TOOL_JOIN= join 323TOOL_JOIN= join
324TOOL_M4= m4 324TOOL_M4= m4
325TOOL_MACPPCFIXCOFF= macppc-fixcoff 325TOOL_MACPPCFIXCOFF= macppc-fixcoff
326TOOL_MAKEFS= makefs 326TOOL_MAKEFS= makefs
327TOOL_MAKEINFO= makeinfo 327TOOL_MAKEINFO= makeinfo
328TOOL_MAKEWHATIS= /usr/libexec/makewhatis 328TOOL_MAKEWHATIS= /usr/libexec/makewhatis
329TOOL_MDSETIMAGE= mdsetimage 329TOOL_MDSETIMAGE= mdsetimage
330TOOL_MENUC= menuc 330TOOL_MENUC= menuc
331TOOL_MIPSELF2ECOFF= mips-elf2ecoff 331TOOL_MIPSELF2ECOFF= mips-elf2ecoff
332TOOL_MKCSMAPPER= mkcsmapper 332TOOL_MKCSMAPPER= mkcsmapper
333TOOL_MKESDB= mkesdb 333TOOL_MKESDB= mkesdb
334TOOL_MKLOCALE= mklocale 334TOOL_MKLOCALE= mklocale
335TOOL_MKMAGIC= file 335TOOL_MKMAGIC= file
336TOOL_MKTEMP= mktemp 336TOOL_MKTEMP= mktemp
337TOOL_MSGC= msgc 337TOOL_MSGC= msgc
338TOOL_MTREE= mtree 338TOOL_MTREE= mtree
339TOOL_PAX= pax 339TOOL_PAX= pax
340TOOL_PIC= pic 340TOOL_PIC= pic
341TOOL_PKG_CREATE= pkg_create 341TOOL_PKG_CREATE= pkg_create
342TOOL_POWERPCMKBOOTIMAGE= powerpc-mkbootimage 342TOOL_POWERPCMKBOOTIMAGE= powerpc-mkbootimage
343TOOL_PWD_MKDB= pwd_mkdb 343TOOL_PWD_MKDB= pwd_mkdb
344TOOL_REFER= refer 344TOOL_REFER= refer
345TOOL_ROFF_ASCII= nroff 345TOOL_ROFF_ASCII= nroff
346TOOL_ROFF_DVI= ${TOOL_GROFF} -Tdvi 346TOOL_ROFF_DVI= ${TOOL_GROFF} -Tdvi
347TOOL_ROFF_HTML= ${TOOL_GROFF} -Tlatin1 -mdoc2html 347TOOL_ROFF_HTML= ${TOOL_GROFF} -Tlatin1 -mdoc2html
348TOOL_ROFF_PS= ${TOOL_GROFF} -Tps 348TOOL_ROFF_PS= ${TOOL_GROFF} -Tps
349TOOL_ROFF_RAW= ${TOOL_GROFF} -Z 349TOOL_ROFF_RAW= ${TOOL_GROFF} -Z
350TOOL_RPCGEN= rpcgen 350TOOL_RPCGEN= rpcgen
351TOOL_SED= sed 351TOOL_SED= sed
352TOOL_SOELIM= soelim 352TOOL_SOELIM= soelim
353TOOL_SPARKCRC= sparkcrc 353TOOL_SPARKCRC= sparkcrc
354TOOL_STAT= stat 354TOOL_STAT= stat
355TOOL_STRFILE= strfile 355TOOL_STRFILE= strfile
356TOOL_SUNLABEL= sunlabel 356TOOL_SUNLABEL= sunlabel
357TOOL_TBL= tbl 357TOOL_TBL= tbl
358TOOL_UUDECODE= uudecode 358TOOL_UUDECODE= uudecode
359TOOL_VGRIND= vgrind -f 359TOOL_VGRIND= vgrind -f
360TOOL_ZIC= zic 360TOOL_ZIC= zic
361 361
362.endif # USETOOLS != yes # } 362.endif # USETOOLS != yes # }
363 363
364# 364#
365# Targets to check if DESTDIR or RELEASEDIR is provided 365# Targets to check if DESTDIR or RELEASEDIR is provided
366# 366#
367.if !target(check_DESTDIR) 367.if !target(check_DESTDIR)
368check_DESTDIR: .PHONY .NOTMAIN 368check_DESTDIR: .PHONY .NOTMAIN
369.if !defined(DESTDIR) 369.if !defined(DESTDIR)
370 @echo "setenv DESTDIR before doing that!" 370 @echo "setenv DESTDIR before doing that!"
371 @false 371 @false
372.else 372.else
373 @true 373 @true
374.endif 374.endif
375.endif 375.endif
376 376
377.if !target(check_RELEASEDIR) 377.if !target(check_RELEASEDIR)
378check_RELEASEDIR: .PHONY .NOTMAIN 378check_RELEASEDIR: .PHONY .NOTMAIN
379.if !defined(RELEASEDIR) 379.if !defined(RELEASEDIR)
380 @echo "setenv RELEASEDIR before doing that!" 380 @echo "setenv RELEASEDIR before doing that!"
381 @false 381 @false
382.else 382.else
383 @true 383 @true
384.endif 384.endif
385.endif 385.endif
386 386
387 387
388.if ${USETOOLS} == "yes" # { 388.if ${USETOOLS} == "yes" # {
389# 389#
390# Make sure DESTDIR is set, so that builds with these tools always 390# Make sure DESTDIR is set, so that builds with these tools always
391# get appropriate -nostdinc, -nostdlib, etc. handling. The default is 391# get appropriate -nostdinc, -nostdlib, etc. handling. The default is
392# <empty string>, meaning start from /, the root directory. 392# <empty string>, meaning start from /, the root directory.
393# 393#
394DESTDIR?= 394DESTDIR?=
395.endif # } 395.endif # }
396 396
397# 397#
398# Build a dynamically linked /bin and /sbin, with the necessary shared 398# Build a dynamically linked /bin and /sbin, with the necessary shared
399# libraries moved from /usr/lib to /lib and the shared linker moved 399# libraries moved from /usr/lib to /lib and the shared linker moved
400# from /usr/libexec to /lib 400# from /usr/libexec to /lib
401# 401#
402# Note that if the BINDIR is not /bin or /sbin, then we always use the 402# Note that if the BINDIR is not /bin or /sbin, then we always use the
403# non-DYNAMICROOT behavior (i.e. it is only enabled for programs in /bin 403# non-DYNAMICROOT behavior (i.e. it is only enabled for programs in /bin
404# and /sbin). See <bsd.shlib.mk>. 404# and /sbin). See <bsd.shlib.mk>.
405# 405#
406MKDYNAMICROOT?= yes 406MKDYNAMICROOT?= yes
407 407
408# 408#
409# Where the system object and source trees are kept; can be configurable 409# Where the system object and source trees are kept; can be configurable
410# by the user in case they want them in ~/foosrc and ~/fooobj (for example). 410# by the user in case they want them in ~/foosrc and ~/fooobj (for example).
411# 411#
412BSDSRCDIR?= /usr/src 412BSDSRCDIR?= /usr/src
413BSDOBJDIR?= /usr/obj 413BSDOBJDIR?= /usr/obj
414NETBSDSRCDIR?= ${BSDSRCDIR} 414NETBSDSRCDIR?= ${BSDSRCDIR}
415 415
416BINGRP?= wheel 416BINGRP?= wheel
417BINOWN?= root 417BINOWN?= root
418BINMODE?= 555 418BINMODE?= 555
419NONBINMODE?= 444 419NONBINMODE?= 444
420 420
421MANDIR?= /usr/share/man 421MANDIR?= /usr/share/man
422MANGRP?= wheel 422MANGRP?= wheel
423MANOWN?= root 423MANOWN?= root
424MANMODE?= ${NONBINMODE} 424MANMODE?= ${NONBINMODE}
425MANINSTALL?= catinstall htmlinstall maninstall 425MANINSTALL?= catinstall htmlinstall maninstall
426 426
427INFODIR?= /usr/share/info 427INFODIR?= /usr/share/info
428INFOGRP?= wheel 428INFOGRP?= wheel
429INFOOWN?= root 429INFOOWN?= root
430INFOMODE?= ${NONBINMODE} 430INFOMODE?= ${NONBINMODE}
431 431
432LIBDIR?= /usr/lib 432LIBDIR?= /usr/lib
433 433
434LINTLIBDIR?= /usr/libdata/lint 434LINTLIBDIR?= /usr/libdata/lint
435LIBGRP?= ${BINGRP} 435LIBGRP?= ${BINGRP}
436LIBOWN?= ${BINOWN} 436LIBOWN?= ${BINOWN}
437LIBMODE?= ${NONBINMODE} 437LIBMODE?= ${NONBINMODE}
438 438
439DOCDIR?= /usr/share/doc 439DOCDIR?= /usr/share/doc
440HTMLDOCDIR?= /usr/share/doc/html 440HTMLDOCDIR?= /usr/share/doc/html
441DOCGRP?= wheel 441DOCGRP?= wheel
442DOCOWN?= root 442DOCOWN?= root
443DOCMODE?= ${NONBINMODE} 443DOCMODE?= ${NONBINMODE}
444 444
445NLSDIR?= /usr/share/nls 445NLSDIR?= /usr/share/nls
446NLSGRP?= wheel 446NLSGRP?= wheel
447NLSOWN?= root 447NLSOWN?= root
448NLSMODE?= ${NONBINMODE} 448NLSMODE?= ${NONBINMODE}
449 449
450KMODULEGRP?= wheel 450KMODULEGRP?= wheel
451KMODULEOWN?= root 451KMODULEOWN?= root
452KMODULEMODE?= ${NONBINMODE} 452KMODULEMODE?= ${NONBINMODE}
453 453
454LOCALEDIR?= /usr/share/locale 454LOCALEDIR?= /usr/share/locale
455LOCALEGRP?= wheel 455LOCALEGRP?= wheel
456LOCALEOWN?= root 456LOCALEOWN?= root
457LOCALEMODE?= ${NONBINMODE} 457LOCALEMODE?= ${NONBINMODE}
458 458
459FIRMWAREDIR?= /libdata/firmware 459FIRMWAREDIR?= /libdata/firmware
460FIRMWAREGRP?= wheel 460FIRMWAREGRP?= wheel
461FIRMWAREOWN?= root 461FIRMWAREOWN?= root
462FIRMWAREMODE?= ${NONBINMODE} 462FIRMWAREMODE?= ${NONBINMODE}
463 463
464DEBUGDIR?= /usr/libdata/debug 464DEBUGDIR?= /usr/libdata/debug
465DEBUGGRP?= wheel 465DEBUGGRP?= wheel
466DEBUGOWN?= root 466DEBUGOWN?= root
467DEBUGMODE?= ${NONBINMODE} 467DEBUGMODE?= ${NONBINMODE}
468 468
469# 469#
470# Data-driven table using make variables to control how 470# Data-driven table using make variables to control how
471# toolchain-dependent targets and shared libraries are built 471# toolchain-dependent targets and shared libraries are built
472# for different platforms and object formats. 472# for different platforms and object formats.
473# 473#
474# OBJECT_FMT: currently either "ELF" or "a.out". 474# OBJECT_FMT: currently either "ELF" or "a.out".
475# 475#
476# All platforms are ELF. 476# All platforms are ELF.
477# 477#
478OBJECT_FMT= ELF 478OBJECT_FMT= ELF
479 479
480# 480#
481# If this platform's toolchain is missing, we obviously cannot build it. 481# If this platform's toolchain is missing, we obviously cannot build it.
482# 482#
483.if ${TOOLCHAIN_MISSING} != "no" 483.if ${TOOLCHAIN_MISSING} != "no"
484MKBINUTILS:= no 484MKBINUTILS:= no
485MKGDB:= no 485MKGDB:= no
486MKGCC:= no 486MKGCC:= no
487.endif 487.endif
488 488
489# 489#
490# If we are using an external toolchain, we can still build the target's 490# If we are using an external toolchain, we can still build the target's
491# binutils, but we cannot build GCC's support libraries, since those are 491# binutils, but we cannot build GCC's support libraries, since those are
492# tightly-coupled to the version of GCC being used. 492# tightly-coupled to the version of GCC being used.
493# 493#
494.if defined(EXTERNAL_TOOLCHAIN) 494.if defined(EXTERNAL_TOOLCHAIN)
495MKGCC:= no 495MKGCC:= no
496.endif 496.endif
497 497
498# 498#
499# The m68000 port is incomplete. 499# The m68000 port is incomplete.
500# 500#
501.if ${MACHINE_ARCH} == "m68000" 501.if ${MACHINE_ARCH} == "m68000"
502NOPIC= # defined 502NOPIC= # defined
503MKISCSI= no 503MKISCSI= no
504# XXX GCC 4 outputs mcount() calling sequences that try to load values 504# XXX GCC 4 outputs mcount() calling sequences that try to load values
505# from over 64KB away and this fails to assemble. 505# from over 64KB away and this fails to assemble.
506.if defined(HAVE_GCC) && (${HAVE_GCC} == 4) 506.if defined(HAVE_GCC) && (${HAVE_GCC} == 4)
507NOPROFILE= # defined 507NOPROFILE= # defined
508.endif 508.endif
509.endif 509.endif
510 510
511# 511#
512# The ia64 port is incomplete. 512# The ia64 port is incomplete.
513# 513#
514.if ${MACHINE_ARCH} == "ia64" 514.if ${MACHINE_ARCH} == "ia64"
515MKLINT= no 515MKLINT= no
516MKGDB= no 516MKGDB= no
517.endif 517.endif
518 518
519# 519#
520# On the MIPS, all libs are compiled with ABIcalls (and are thus PIC), 520# On the MIPS, all libs are compiled with ABIcalls (and are thus PIC),
521# not just shared libraries, so don't build the _pic version. 521# not just shared libraries, so don't build the _pic version.
522# 522#
523.if ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb" || \ 523.if ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb" || \
524 ${MACHINE_ARCH} == "mips64el" || ${MACHINE_ARCH} == "mips64eb" 524 ${MACHINE_ARCH} == "mips64el" || ${MACHINE_ARCH} == "mips64eb"
525MKPICLIB:= no 525MKPICLIB:= no
526.endif 526.endif
527 527
528# 528#
529# On VAX using ELF, all objects are PIC, not just shared libraries, 529# On VAX using ELF, all objects are PIC, not just shared libraries,
530# so don't build the _pic version. Unless we are using GCC3 which 530# so don't build the _pic version. Unless we are using GCC3 which
531# doesn't support PIC yet. 531# doesn't support PIC yet.
532# 532#
533.if ${MACHINE_ARCH} == "vax" 533.if ${MACHINE_ARCH} == "vax"
534MKPICLIB= no 534MKPICLIB= no
535.endif 535.endif
536 536
537# 537#
538# Location of the file that contains the major and minor numbers of the 538# Location of the file that contains the major and minor numbers of the
539# version of a shared library. If this file exists a shared library 539# version of a shared library. If this file exists a shared library
540# will be built by <bsd.lib.mk>. 540# will be built by <bsd.lib.mk>.
541# 541#
542SHLIB_VERSION_FILE?= ${.CURDIR}/shlib_version 542SHLIB_VERSION_FILE?= ${.CURDIR}/shlib_version
543 543
544# 544#
545# GNU sources and packages sometimes see architecture names differently. 545# GNU sources and packages sometimes see architecture names differently.
546# 546#
547GNU_ARCH.coldfire=m68k 547GNU_ARCH.coldfire=m68k
548GNU_ARCH.i386=i486 548GNU_ARCH.i386=i486
549GCC_CONFIG_ARCH.i386=i486 549GCC_CONFIG_ARCH.i386=i486
550GCC_CONFIG_TUNE.i386=nocona 550GCC_CONFIG_TUNE.i386=nocona
551GCC_CONFIG_TUNE.x86_64=nocona 551GCC_CONFIG_TUNE.x86_64=nocona
552GNU_ARCH.m68000=m68010 552GNU_ARCH.m68000=m68010
553GNU_ARCH.sh3eb=sh 553GNU_ARCH.sh3eb=sh
554GNU_ARCH.sh3el=shle 554GNU_ARCH.sh3el=shle
555GNU_ARCH.mips64eb=mips64 555GNU_ARCH.mips64eb=mips64
556MACHINE_GNU_ARCH=${GNU_ARCH.${MACHINE_ARCH}:U${MACHINE_ARCH}} 556MACHINE_GNU_ARCH=${GNU_ARCH.${MACHINE_ARCH}:U${MACHINE_ARCH}}
557 557
558# 558#
559# In order to identify NetBSD to GNU packages, we sometimes need 559# In order to identify NetBSD to GNU packages, we sometimes need
560# an "elf" tag for historically a.out platforms. 560# an "elf" tag for historically a.out platforms.
561# 561#
562.if ${OBJECT_FMT} == "ELF" && \ 562.if ${OBJECT_FMT} == "ELF" && \
563 (${MACHINE_GNU_ARCH} == "arm" || \ 563 (${MACHINE_GNU_ARCH} == "arm" || \
564 ${MACHINE_GNU_ARCH} == "armeb" || \ 564 ${MACHINE_GNU_ARCH} == "armeb" || \
565 ${MACHINE_ARCH} == "i386" || \ 565 ${MACHINE_ARCH} == "i386" || \
566 ${MACHINE_CPU} == "m68k" || \ 566 ${MACHINE_CPU} == "m68k" || \
567 ${MACHINE_GNU_ARCH} == "sh" || \ 567 ${MACHINE_GNU_ARCH} == "sh" || \
568 ${MACHINE_GNU_ARCH} == "shle" || \ 568 ${MACHINE_GNU_ARCH} == "shle" || \
569 ${MACHINE_ARCH} == "sparc" || \ 569 ${MACHINE_ARCH} == "sparc" || \
570 ${MACHINE_ARCH} == "vax") 570 ${MACHINE_ARCH} == "vax")
571MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsdelf 571MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsdelf
572.else 572.else
573MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsd 573MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsd
574.endif 574.endif
575 575
576# 576#
577# Determine if arch uses native kernel modules with rump 577# Determine if arch uses native kernel modules with rump
578# 578#
579.if ${MACHINE_ARCH} == "i386" || \ 579.if ${MACHINE_ARCH} == "i386" || \
580 ${MACHINE_ARCH} == "x86_64" 580 ${MACHINE_ARCH} == "x86_64"
581RUMPKMOD= # defined 581RUMPKMOD= # defined
582.endif 582.endif
583 583
584TARGETS+= all clean cleandir depend dependall includes \ 584TARGETS+= all clean cleandir depend dependall includes \
585 install lint obj regress tags html 585 install lint obj regress tags html
586PHONY_NOTMAIN = all clean cleandir depend dependall distclean includes \ 586PHONY_NOTMAIN = all clean cleandir depend dependall distclean includes \
587 install lint obj regress tags beforedepend afterdepend \ 587 install lint obj regress tags beforedepend afterdepend \
588 beforeinstall afterinstall realinstall realdepend realall \ 588 beforeinstall afterinstall realinstall realdepend realall \
589 html subdir-all subdir-install subdir-depend 589 html subdir-all subdir-install subdir-depend
590.PHONY: ${PHONY_NOTMAIN} 590.PHONY: ${PHONY_NOTMAIN}
591.NOTMAIN: ${PHONY_NOTMAIN} 591.NOTMAIN: ${PHONY_NOTMAIN}
592 592
593.if ${NEED_OWN_INSTALL_TARGET} != "no" 593.if ${NEED_OWN_INSTALL_TARGET} != "no"
594.if !target(install) 594.if !target(install)
595install: beforeinstall .WAIT subdir-install realinstall .WAIT afterinstall 595install: beforeinstall .WAIT subdir-install realinstall .WAIT afterinstall
596beforeinstall: 596beforeinstall:
597subdir-install: 597subdir-install:
598realinstall: 598realinstall:
599afterinstall: 599afterinstall:
600.endif 600.endif
601all: realall subdir-all 601all: realall subdir-all
602subdir-all: 602subdir-all:
603realall: 603realall:
604depend: realdepend subdir-depend 604depend: realdepend subdir-depend
605subdir-depend: 605subdir-depend:
606realdepend: 606realdepend:
607distclean: cleandir 607distclean: cleandir
608cleandir: clean 608cleandir: clean
609 609
610dependall: .NOTMAIN realdepend .MAKE 610dependall: .NOTMAIN realdepend .MAKE
611 @cd ${.CURDIR}; ${MAKE} realall 611 @cd ${.CURDIR}; ${MAKE} realall
612.endif 612.endif
613 613
614# 614#
615# Define MKxxx variables (which are either yes or no) for users 615# Define MKxxx variables (which are either yes or no) for users
616# to set in /etc/mk.conf and override in the make environment. 616# to set in /etc/mk.conf and override in the make environment.
617# These should be tested with `== "no"' or `!= "no"'. 617# These should be tested with `== "no"' or `!= "no"'.
618# The NOxxx variables should only be set by Makefiles. 618# The NOxxx variables should only be set by Makefiles.
619# 619#
620# Please keep etc/Makefile and share/man/man5/mk.conf.5 in sync 620# Please keep etc/Makefile and share/man/man5/mk.conf.5 in sync
621# with changes to the MK* variables here. 621# with changes to the MK* variables here.
622# 622#
623 623
624# 624#
625# Supported NO* options (if defined, MK* will be forced to "no", 625# Supported NO* options (if defined, MK* will be forced to "no",
626# regardless of user's mk.conf setting). 626# regardless of user's mk.conf setting).
627# 627#
628# Source makefiles should set NO*, and not MK*, and must do so before 628# Source makefiles should set NO*, and not MK*, and must do so before
629# including bsd.own.mk. 629# including bsd.own.mk.
630# 630#
631.for var in \ 631.for var in \
632 NOCRYPTO NODOC NOHTML NOINFO NOLINKLIB NOLINT NOMAN NONLS NOOBJ NOPIC \ 632 NOCRYPTO NODOC NOHTML NOINFO NOLINKLIB NOLINT NOMAN NONLS NOOBJ NOPIC \
633 NOPICINSTALL NOPROFILE NOSHARE NOSTATICLIB 633 NOPICINSTALL NOPROFILE NOSHARE NOSTATICLIB
634.if defined(${var}) 634.if defined(${var})
635MK${var:S/^NO//}:= no 635MK${var:S/^NO//}:= no
636.endif 636.endif
637.endfor 637.endfor
638 638
639# 639#
640# Older-style variables that enabled behaviour when set. 640# Older-style variables that enabled behaviour when set.
641# 641#
642.for var in MANZ UNPRIVED UPDATE 642.for var in MANZ UNPRIVED UPDATE
643.if defined(${var}) 643.if defined(${var})
644MK${var}:= yes 644MK${var}:= yes
645.endif 645.endif
646.endfor 646.endfor
647 647
648# 648#
649# MK* options which have variable defaults. 649# MK* options which have variable defaults.
650# 650#
651.if ${MACHINE} == "amd64" || ${MACHINE} == "sparc64" 651.if ${MACHINE} == "amd64" || ${MACHINE} == "sparc64"
652MKCOMPAT?= yes 652MKCOMPAT?= yes
653.else 653.else
654# Don't let this build where it really isn't supported. 654# Don't let this build where it really isn't supported.
655MKCOMPAT:= no 655MKCOMPAT:= no
656.endif 656.endif
657 657
658# 658#
659# MK* backward compatibility. 659# MK* backward compatibility.
660# 660#
661.if defined(MKBFD) 661.if defined(MKBFD)
662MKBINUTILS?= ${MKBFD} 662MKBINUTILS?= ${MKBFD}
663.endif 663.endif
664 664
665# 665#
666# MK* options which default to "yes". 666# MK* options which default to "yes".
667# 667#
668.for var in \ 668_MKVARS.yes= \
669 MKATF \ 669 MKATF \
670 MKBINUTILS \ 670 MKBINUTILS \
671 MKCATPAGES MKCRYPTO MKCOMPLEX MKCVS \ 671 MKCATPAGES MKCRYPTO MKCOMPLEX MKCVS \
672 MKDOC \ 672 MKDOC \
673 MKGCC MKGCCCMDS MKGDB \ 673 MKGCC MKGCCCMDS MKGDB \
674 MKHESIOD MKHTML \ 674 MKHESIOD MKHTML \
675 MKIEEEFP MKINET6 MKINFO MKIPFILTER MKISCSI \ 675 MKIEEEFP MKINET6 MKINFO MKIPFILTER MKISCSI \
676 MKKERBEROS \ 676 MKKERBEROS \
677 MKKMOD \ 677 MKKMOD \
678 MKLDAP MKLINKLIB MKLINT \ 678 MKLDAP MKLINKLIB MKLINT \
679 MKMAN \ 679 MKMAN \
680 MKMDNS \ 680 MKMDNS \
681 MKNLS \ 681 MKNLS \
682 MKOBJ \ 682 MKOBJ \
683 MKPAM \ 683 MKPAM \
684 MKPF MKPIC MKPICINSTALL MKPICLIB MKPOSTFIX MKPROFILE \ 684 MKPF MKPIC MKPICINSTALL MKPICLIB MKPOSTFIX MKPROFILE \
685 MKSHARE MKSKEY MKSTATICLIB \ 685 MKSHARE MKSKEY MKSTATICLIB \
686 MKX11FONTS \ 686 MKX11FONTS \
687 MKYP 687 MKYP
 688.for var in ${_MKVARS.yes}
688${var}?= yes 689${var}?= yes
689.endfor 690.endfor
690 691
691# 692#
692# MK* options which default to "no". 693# MK* options which default to "no".
693# 694#
694.for var in \ 695_MKVARS.no= \
695 MKCRYPTO_IDEA MKCRYPTO_MDC2 MKCRYPTO_RC5 MKDEBUG MKDEBUGLIB \ 696 MKCRYPTO_IDEA MKCRYPTO_MDC2 MKCRYPTO_RC5 MKDEBUG MKDEBUGLIB \
696 MKEXTSRC \ 697 MKEXTSRC \
697 MKLVM \ 698 MKLVM \
698 MKMANDOC MKMANZ MKOBJDIRS \ 699 MKMANDOC MKMANZ MKOBJDIRS \
699 MKPCC MKPCCCMDS \ 700 MKPCC MKPCCCMDS \
700 MKSOFTFLOAT MKSTRIPIDENT \ 701 MKSOFTFLOAT MKSTRIPIDENT \
701 MKUNPRIVED MKUPDATE MKX11  702 MKUNPRIVED MKUPDATE MKX11
 703.for var in ${_MKVARS.no}
702${var}?=no 704${var}?=no
703.endfor 705.endfor
704 706
705# 707#
706# Do we default to XFree86 or Xorg for this platform? 708# Do we default to XFree86 or Xorg for this platform?
707# 709#
708.if ${MACHINE} == "alpha" || ${MACHINE} == "acorn32" || \ 710.if ${MACHINE} == "alpha" || ${MACHINE} == "acorn32" || \
709 ${MACHINE} == "amiga" || ${MACHINE} == "cats" || \ 711 ${MACHINE} == "amiga" || ${MACHINE} == "cats" || \
710 ${MACHINE} == "dreamcast" || ${MACHINE} == "ews4800mips" || \ 712 ${MACHINE} == "dreamcast" || ${MACHINE} == "ews4800mips" || \
711 ${MACHINE} == "hpcarm" || ${MACHINE} == "hpcmips" || \ 713 ${MACHINE} == "hpcarm" || ${MACHINE} == "hpcmips" || \
712 ${MACHINE} == "hpcsh" || ${MACHINE} == "mac68k" || \ 714 ${MACHINE} == "hpcsh" || ${MACHINE} == "mac68k" || \
713 ${MACHINE} == "netwinder" || ${MACHINE} == "newsmips" || \ 715 ${MACHINE} == "netwinder" || ${MACHINE} == "newsmips" || \
714 ${MACHINE} == "ofppc" || ${MACHINE} == "pmax" || \ 716 ${MACHINE} == "ofppc" || ${MACHINE} == "pmax" || \
715 ${MACHINE} == "sun3" || ${MACHINE} == "x68k" 717 ${MACHINE} == "sun3" || ${MACHINE} == "x68k"
716X11FLAVOUR?= XFree86 718X11FLAVOUR?= XFree86
717.else 719.else
718X11FLAVOUR?= Xorg 720X11FLAVOUR?= Xorg
719.endif 721.endif
720 722
721# 723#
722# We want to build zfs only for i386 and amd64 by default for now. 724# We want to build zfs only for i386 and amd64 by default for now.
723# 725#
724.if ${MACHINE} == "amd64" || ${MACHINE} == "i386" 726.if ${MACHINE} == "amd64" || ${MACHINE} == "i386"
725MKZFS?= yes 727MKZFS?= yes
726.else 728.else
727MKZFS?= no 729MKZFS?= no
728.endif 730.endif
729 731
730# 732#
731# Force some options off if their dependencies are off. 733# Force some options off if their dependencies are off.
732# 734#
733 735
734.if ${MKCRYPTO} == "no" 736.if ${MKCRYPTO} == "no"
735MKKERBEROS:= no 737MKKERBEROS:= no
736.endif 738.endif
737 739
738.if ${MKMAN} == "no" 740.if ${MKMAN} == "no"
739MKCATPAGES:= no 741MKCATPAGES:= no
740MKHTML:= no 742MKHTML:= no
741.endif 743.endif
742 744
743.if ${MKLINKLIB} == "no" 745.if ${MKLINKLIB} == "no"
744MKLINT:= no 746MKLINT:= no
745MKPICINSTALL:= no 747MKPICINSTALL:= no
746MKPROFILE:= no 748MKPROFILE:= no
747.endif 749.endif
748 750
749.if ${MKPIC} == "no" 751.if ${MKPIC} == "no"
750MKPICLIB:= no 752MKPICLIB:= no
751.endif 753.endif
752 754
753.if ${MKOBJ} == "no" 755.if ${MKOBJ} == "no"
754MKOBJDIRS:= no 756MKOBJDIRS:= no
755.endif 757.endif
756 758
757.if ${MKSHARE} == "no" 759.if ${MKSHARE} == "no"
758MKCATPAGES:= no 760MKCATPAGES:= no
759MKDOC:= no 761MKDOC:= no
760MKINFO:= no 762MKINFO:= no
761MKHTML:= no 763MKHTML:= no
762MKMAN:= no 764MKMAN:= no
763MKNLS:= no 765MKNLS:= no
764.endif 766.endif
765 767
766# 768#
767# install(1) parameters. 769# install(1) parameters.
768# 770#
769COPY?= -c 771COPY?= -c
770.if ${MKUPDATE} == "no" 772.if ${MKUPDATE} == "no"
771PRESERVE?=  773PRESERVE?=
772.else 774.else
773PRESERVE?= -p 775PRESERVE?= -p
774.endif 776.endif
775RENAME?= -r 777RENAME?= -r
776HRDLINK?= -l h 778HRDLINK?= -l h
777SYMLINK?= -l s 779SYMLINK?= -l s
778 780
779METALOG?= ${DESTDIR}/METALOG 781METALOG?= ${DESTDIR}/METALOG
780METALOG.add?= ${TOOL_CAT} -l >> ${METALOG} 782METALOG.add?= ${TOOL_CAT} -l >> ${METALOG}
781.if (${_SRC_TOP_} != "") # only set INSTPRIV if inside ${NETBSDSRCDIR} 783.if (${_SRC_TOP_} != "") # only set INSTPRIV if inside ${NETBSDSRCDIR}
782.if ${MKUNPRIVED} != "no" 784.if ${MKUNPRIVED} != "no"
783INSTPRIV.unpriv=-U -M ${METALOG} -D ${DESTDIR} -h sha256 785INSTPRIV.unpriv=-U -M ${METALOG} -D ${DESTDIR} -h sha256
784.else 786.else
785INSTPRIV.unpriv= 787INSTPRIV.unpriv=
786.endif 788.endif
787INSTPRIV?= ${INSTPRIV.unpriv} -N ${NETBSDSRCDIR}/etc 789INSTPRIV?= ${INSTPRIV.unpriv} -N ${NETBSDSRCDIR}/etc
788.endif 790.endif
789STRIPFLAG?=  791STRIPFLAG?=
790 792
791.if ${NEED_OWN_INSTALL_TARGET} != "no" 793.if ${NEED_OWN_INSTALL_TARGET} != "no"
792INSTALL_DIR?= ${INSTALL} ${INSTPRIV} -d 794INSTALL_DIR?= ${INSTALL} ${INSTPRIV} -d
793INSTALL_FILE?= ${INSTALL} ${INSTPRIV} ${COPY} ${PRESERVE} ${RENAME} 795INSTALL_FILE?= ${INSTALL} ${INSTPRIV} ${COPY} ${PRESERVE} ${RENAME}
794INSTALL_LINK?= ${INSTALL} ${INSTPRIV} ${HRDLINK} ${RENAME} 796INSTALL_LINK?= ${INSTALL} ${INSTPRIV} ${HRDLINK} ${RENAME}
795INSTALL_SYMLINK?= ${INSTALL} ${INSTPRIV} ${SYMLINK} ${RENAME} 797INSTALL_SYMLINK?= ${INSTALL} ${INSTPRIV} ${SYMLINK} ${RENAME}
796HOST_INSTALL_FILE?= ${INSTALL} ${COPY} ${PRESERVE} ${RENAME} 798HOST_INSTALL_FILE?= ${INSTALL} ${COPY} ${PRESERVE} ${RENAME}
797HOST_INSTALL_DIR?= ${INSTALL} -d 799HOST_INSTALL_DIR?= ${INSTALL} -d
798HOST_INSTALL_SYMLINK?= ${INSTALL} ${SYMLINK} ${RENAME} 800HOST_INSTALL_SYMLINK?= ${INSTALL} ${SYMLINK} ${RENAME}
799.endif 801.endif
800 802
801# 803#
802# Set defaults for the USE_xxx variables. 804# Set defaults for the USE_xxx variables.
803# 805#
804 806
805# 807#
806# USE_* options which default to "no" and will be forced to "no" if their 808# USE_* options which default to "no" and will be forced to "no" if their
807# corresponding MK* variable is set to "no". 809# corresponding MK* variable is set to "no".
808# 810#
809.for var in USE_SKEY 811.for var in USE_SKEY
810.if (${${var:S/USE_/MK/}} == "no") 812.if (${${var:S/USE_/MK/}} == "no")
811${var}:= no 813${var}:= no
812.else 814.else
813${var}?= no 815${var}?= no
814.endif 816.endif
815.endfor 817.endfor
816 818
817# 819#
818# USE_* options which default to "yes" unless their corresponding MK* 820# USE_* options which default to "yes" unless their corresponding MK*
819# variable is set to "no". 821# variable is set to "no".
820# 822#
821.for var in USE_HESIOD USE_INET6 USE_KERBEROS USE_LDAP USE_PAM USE_YP 823.for var in USE_HESIOD USE_INET6 USE_KERBEROS USE_LDAP USE_PAM USE_YP
822.if (${${var:S/USE_/MK/}} == "no") 824.if (${${var:S/USE_/MK/}} == "no")
823${var}:= no 825${var}:= no
824.else 826.else
825${var}?= yes 827${var}?= yes
826.endif 828.endif
827.endfor 829.endfor
828 830
829# 831#
830# USE_* options which default to "yes". 832# USE_* options which default to "yes".
831# 833#
832.for var in USE_JEMALLOC 834.for var in USE_JEMALLOC
833${var}?= yes 835${var}?= yes
834.endfor 836.endfor
835 837
836# 838#
837# USE_* options which default to "no". 839# USE_* options which default to "no".
838# 840#
839#.for var in 841#.for var in
840#${var}?= no 842#${var}?= no
841#.endfor 843#.endfor
842 844
843# 845#
844# Where X11 sources are and where it is installed to. 846# Where X11 sources are and where it is installed to.
845# 847#
846.if !defined(X11SRCDIR) 848.if !defined(X11SRCDIR)
847.if exists(${NETBSDSRCDIR}/../xsrc) 849.if exists(${NETBSDSRCDIR}/../xsrc)
848X11SRCDIR!= cd ${NETBSDSRCDIR}/../xsrc && pwd 850X11SRCDIR!= cd ${NETBSDSRCDIR}/../xsrc && pwd
849.else 851.else
850X11SRCDIR= /usr/xsrc 852X11SRCDIR= /usr/xsrc
851.endif 853.endif
852.endif # !defined(X11SRCDIR) 854.endif # !defined(X11SRCDIR)
853 855
854X11SRCDIR.xc?= ${X11SRCDIR}/xfree/xc 856X11SRCDIR.xc?= ${X11SRCDIR}/xfree/xc
855X11SRCDIR.local?= ${X11SRCDIR}/local 857X11SRCDIR.local?= ${X11SRCDIR}/local
856.if ${X11FLAVOUR} == "Xorg" 858.if ${X11FLAVOUR} == "Xorg"
857X11ROOTDIR?= /usr/X11R7 859X11ROOTDIR?= /usr/X11R7
858.else 860.else
859X11ROOTDIR?= /usr/X11R6 861X11ROOTDIR?= /usr/X11R6
860.endif 862.endif
861X11BINDIR?= ${X11ROOTDIR}/bin 863X11BINDIR?= ${X11ROOTDIR}/bin
862X11ETCDIR?= /etc/X11 864X11ETCDIR?= /etc/X11
863X11FONTDIR?= ${X11ROOTDIR}/lib/X11/fonts 865X11FONTDIR?= ${X11ROOTDIR}/lib/X11/fonts
864X11INCDIR?= ${X11ROOTDIR}/include 866X11INCDIR?= ${X11ROOTDIR}/include
865X11LIBDIR?= ${X11ROOTDIR}/lib/X11 867X11LIBDIR?= ${X11ROOTDIR}/lib/X11
866X11MANDIR?= ${X11ROOTDIR}/man 868X11MANDIR?= ${X11ROOTDIR}/man
867X11USRLIBDIR?= ${X11ROOTDIR}/lib 869X11USRLIBDIR?= ${X11ROOTDIR}/lib
868 870
869# 871#
870# New modular-xorg based builds 872# New modular-xorg based builds
871# 873#
872X11SRCDIRMIT?= ${X11SRCDIR}/external/mit 874X11SRCDIRMIT?= ${X11SRCDIR}/external/mit
873.for _lib in \ 875.for _lib in \
874 FS ICE SM X11 XScrnSaver XTrap Xau Xcomposite Xcursor Xdamage \ 876 FS ICE SM X11 XScrnSaver XTrap Xau Xcomposite Xcursor Xdamage \
875 Xdmcp Xevie Xext Xfixes Xfont Xft Xi Xinerama Xmu Xpm \ 877 Xdmcp Xevie Xext Xfixes Xfont Xft Xi Xinerama Xmu Xpm \
876 Xrandr Xrender Xres Xt Xtst Xv XvMC Xxf86dga Xxf86misc Xxf86vm drm \ 878 Xrandr Xrender Xres Xt Xtst Xv XvMC Xxf86dga Xxf86misc Xxf86vm drm \
877 fontenc xkbfile xkbui Xaw lbxutil Xfontcache pciaccess 879 fontenc xkbfile xkbui Xaw lbxutil Xfontcache pciaccess
878X11SRCDIR.${_lib}?= ${X11SRCDIRMIT}/lib${_lib}/dist 880X11SRCDIR.${_lib}?= ${X11SRCDIRMIT}/lib${_lib}/dist
879.endfor 881.endfor
880 882
881.for _proto in \ 883.for _proto in \
882 xcmisc xext xf86bigfont bigreqs input kb x fonts fixes scrnsaver \ 884 xcmisc xext xf86bigfont bigreqs input kb x fonts fixes scrnsaver \
883 xinerama dri2 render resource record video xf86dga xf86misc \ 885 xinerama dri2 render resource record video xf86dga xf86misc \
884 xf86vidmode composite damage trap gl randr fontcache xf86dri 886 xf86vidmode composite damage trap gl randr fontcache xf86dri
885X11SRCDIR.${_proto}proto?= ${X11SRCDIRMIT}/${_proto}proto/dist 887X11SRCDIR.${_proto}proto?= ${X11SRCDIRMIT}/${_proto}proto/dist
886.endfor 888.endfor
887 889
888.for _dir in \ 890.for _dir in \
889 xtrans fontconfig expat freetype evieext mkfontscale bdftopcf \ 891 xtrans fontconfig expat freetype evieext mkfontscale bdftopcf \
890 xkbcomp xorg-cf-files imake xorg-server xbiff xkbdata xkeyboard-config \ 892 xkbcomp xorg-cf-files imake xorg-server xbiff xkbdata xkeyboard-config \
891 xbitmaps appres xeyes xev xedit sessreg pixman \ 893 xbitmaps appres xeyes xev xedit sessreg pixman \
892 beforelight bitmap editres makedepend fonttosfnt fslsfonts \ 894 beforelight bitmap editres makedepend fonttosfnt fslsfonts \
893 fstobdf MesaDemos MesaGLUT MesaLib ico iceauth lbxproxy listres lndir \ 895 fstobdf MesaDemos MesaGLUT MesaLib ico iceauth lbxproxy listres lndir \
894 luit xproxymanagementprotocol mkfontdir oclock proxymngr rgb \ 896 luit xproxymanagementprotocol mkfontdir oclock proxymngr rgb \
895 setxkbmap smproxy twm viewres x11perf xauth xcalc xclipboard \ 897 setxkbmap smproxy twm viewres x11perf xauth xcalc xclipboard \
896 xclock xcmsdb xconsole xcutsel xditview xdpyinfo xdriinfo xdm \ 898 xclock xcmsdb xconsole xcutsel xditview xdpyinfo xdriinfo xdm \
897 xfd xf86dga xfindproxy xfontsel xfwp xgamma xgc xhost xinit \ 899 xfd xf86dga xfindproxy xfontsel xfwp xgamma xgc xhost xinit \
898 xkill xload xlogo xlsatoms xlsclients xlsfonts xmag xmessage \ 900 xkill xload xlogo xlsatoms xlsclients xlsfonts xmag xmessage \
899 xmh xmodmap xmore xman xprop xrandr xrdb xrefresh xset \ 901 xmh xmodmap xmore xman xprop xrandr xrdb xrefresh xset \
900 xsetmode xsetpointer xsetroot xsm xstdcmap xvidtune xvinfo \ 902 xsetmode xsetpointer xsetroot xsm xstdcmap xvidtune xvinfo \
901 xwininfo xwud xprehashprinterlist xplsprinters xkbprint xkbevd \ 903 xwininfo xwud xprehashprinterlist xplsprinters xkbprint xkbevd \
902 xterm xwd xfs xfsinfo xphelloworld xtrap xkbutils xkbcomp \ 904 xterm xwd xfs xfsinfo xphelloworld xtrap xkbutils xkbcomp \
903 xkeyboard-config xinput \ 905 xkeyboard-config xinput \
904 font-adobe-100dpi font-adobe-75dpi font-adobe-utopia-100dpi \ 906 font-adobe-100dpi font-adobe-75dpi font-adobe-utopia-100dpi \
905 font-adobe-utopia-75dpi font-adobe-utopia-type1 \ 907 font-adobe-utopia-75dpi font-adobe-utopia-type1 \
906 font-alias \ 908 font-alias \
907 font-bh-100dpi font-bh-75dpi font-bh-lucidatypewriter-100dpi \ 909 font-bh-100dpi font-bh-75dpi font-bh-lucidatypewriter-100dpi \
908 font-bh-lucidatypewriter-75dpi font-bh-ttf font-bh-type1 \ 910 font-bh-lucidatypewriter-75dpi font-bh-ttf font-bh-type1 \
909 font-bitstream-100dpi font-bitstream-75dpi font-bitstream-type1 \ 911 font-bitstream-100dpi font-bitstream-75dpi font-bitstream-type1 \
910 font-cursor-misc font-daewoo-misc font-dec-misc font-ibm-type1 \ 912 font-cursor-misc font-daewoo-misc font-dec-misc font-ibm-type1 \
911 font-isas-misc font-jis-misc font-misc-misc font-mutt-misc \ 913 font-isas-misc font-jis-misc font-misc-misc font-mutt-misc \
912 font-sony-misc font-util ttf-bitstream-vera encodings 914 font-sony-misc font-util ttf-bitstream-vera encodings
913X11SRCDIR.${_dir}?= ${X11SRCDIRMIT}/${_dir}/dist 915X11SRCDIR.${_dir}?= ${X11SRCDIRMIT}/${_dir}/dist
914.endfor 916.endfor
915 917
916.for _i in \ 918.for _i in \
917 elographics keyboard mouse vmmouse void ws 919 elographics keyboard mouse vmmouse void ws
918X11SRCDIR.xf86-input-${_i}?= ${X11SRCDIRMIT}/xf86-input-${_i}/dist 920X11SRCDIR.xf86-input-${_i}?= ${X11SRCDIRMIT}/xf86-input-${_i}/dist
919.endfor 921.endfor
920 922
921.for _v in \ 923.for _v in \
922 ag10e apm ark ast ati chips cirrus crime cyrix glint i128 i740 igs \ 924 ag10e apm ark ast ati chips cirrus crime cyrix glint i128 i740 igs \
923 imstt intel mach64 mga neomagic newport nsc nv nvxbox pnozz r128 \ 925 imstt intel mach64 mga neomagic newport nsc nv nvxbox pnozz r128 \
924 radeonhd rendition s3 s3virge savage siliconmotion sis sunffb suncg6 \ 926 radeonhd rendition s3 s3virge savage siliconmotion sis sunffb suncg6 \
925 sunleo suntcx tdfx tga trident tseng vesa vga via vmware wsfb 927 sunleo suntcx tdfx tga trident tseng vesa vga via vmware wsfb
926  928
927X11SRCDIR.xf86-video-${_v}?= ${X11SRCDIRMIT}/xf86-video-${_v}/dist 929X11SRCDIR.xf86-video-${_v}?= ${X11SRCDIRMIT}/xf86-video-${_v}/dist
928.endfor 930.endfor
929 931
930.if ${X11FLAVOUR} == "Xorg" 932.if ${X11FLAVOUR} == "Xorg"
931X11DRI?= yes 933X11DRI?= yes
932.endif 934.endif
933 935
934X11DRI?= no 936X11DRI?= no
935X11LOADABLE?= yes 937X11LOADABLE?= yes
936 938
937 939
938# 940#
939# Where extsrc sources are and where it is installed to. 941# Where extsrc sources are and where it is installed to.
940# 942#
941.if !defined(EXTSRCSRCDIR) 943.if !defined(EXTSRCSRCDIR)
942.if exists(${NETBSDSRCDIR}/../extsrc) 944.if exists(${NETBSDSRCDIR}/../extsrc)
943EXTSRCSRCDIR!= cd ${NETBSDSRCDIR}/../extsrc && pwd 945EXTSRCSRCDIR!= cd ${NETBSDSRCDIR}/../extsrc && pwd
944.else 946.else
945EXTSRCSRCDIR= /usr/extsrc 947EXTSRCSRCDIR= /usr/extsrc
946.endif 948.endif
947.endif # !defined(EXTSRCSRCDIR) 949.endif # !defined(EXTSRCSRCDIR)
948 950
949EXTSRCROOTDIR?= /usr/ext 951EXTSRCROOTDIR?= /usr/ext
950EXTSRCBINDIR?= ${EXTSRCROOTDIR}/bin 952EXTSRCBINDIR?= ${EXTSRCROOTDIR}/bin
951EXTSRCETCDIR?= /etc/ext 953EXTSRCETCDIR?= /etc/ext
952EXTSRCINCDIR?= ${EXTSRCROOTDIR}/include 954EXTSRCINCDIR?= ${EXTSRCROOTDIR}/include
953EXTSRCLIBDIR?= ${EXTSRCROOTDIR}/lib/ext 955EXTSRCLIBDIR?= ${EXTSRCROOTDIR}/lib/ext
954EXTSRCMANDIR?= ${EXTSRCROOTDIR}/man 956EXTSRCMANDIR?= ${EXTSRCROOTDIR}/man
955EXTSRCUSRLIBDIR?= ${EXTSRCROOTDIR}/lib 957EXTSRCUSRLIBDIR?= ${EXTSRCROOTDIR}/lib
956 958
957# 959#
958# MAKEDIRTARGET dir target [extra make(1) params] 960# MAKEDIRTARGET dir target [extra make(1) params]
959# run "cd $${dir} && ${MAKE} [params] $${target}", with a pretty message 961# run "cd $${dir} && ${MAKE} [params] $${target}", with a pretty message
960# 962#
961MAKEDIRTARGET=\ 963MAKEDIRTARGET=\
962 @_makedirtarget() { \ 964 @_makedirtarget() { \
963 dir="$$1"; shift; \ 965 dir="$$1"; shift; \
964 target="$$1"; shift; \ 966 target="$$1"; shift; \
965 case "$${dir}" in \ 967 case "$${dir}" in \
966 /*) this="$${dir}/"; \ 968 /*) this="$${dir}/"; \
967 real="$${dir}" ;; \ 969 real="$${dir}" ;; \
968 .) this="${_THISDIR_}"; \ 970 .) this="${_THISDIR_}"; \
969 real="${.CURDIR}" ;; \ 971 real="${.CURDIR}" ;; \
970 *) this="${_THISDIR_}$${dir}/"; \ 972 *) this="${_THISDIR_}$${dir}/"; \
971 real="${.CURDIR}/$${dir}" ;; \ 973 real="${.CURDIR}/$${dir}" ;; \
972 esac; \ 974 esac; \
973 show=$${this:-.}; \ 975 show=$${this:-.}; \
974 echo "$${target} ===> $${show%/}$${1:+ (with: $$@)}"; \ 976 echo "$${target} ===> $${show%/}$${1:+ (with: $$@)}"; \
975 cd "$${real}" \ 977 cd "$${real}" \
976 && ${MAKE} _THISDIR_="$${this}" "$$@" $${target}; \ 978 && ${MAKE} _THISDIR_="$${this}" "$$@" $${target}; \
977 }; \ 979 }; \
978 _makedirtarget 980 _makedirtarget
979 981
980# 982#
981# MAKEVERBOSE support. Levels are: 983# MAKEVERBOSE support. Levels are:
982# 0 Minimal output ("quiet") 984# 0 Minimal output ("quiet")
983# 1 Describe what is occurring 985# 1 Describe what is occurring
984# 2 Describe what is occurring and echo the actual command 986# 2 Describe what is occurring and echo the actual command
985# 3 Ignore the effect of the "@" prefix in make commands 987# 3 Ignore the effect of the "@" prefix in make commands
986# 4 Trace shell commands using the shell's -x flag 988# 4 Trace shell commands using the shell's -x flag
987#  989#
988MAKEVERBOSE?= 2 990MAKEVERBOSE?= 2
989 991
990.if ${MAKEVERBOSE} == 0 992.if ${MAKEVERBOSE} == 0
991_MKMSG?= @\# 993_MKMSG?= @\#
992_MKSHMSG?= : echo 994_MKSHMSG?= : echo
993_MKSHECHO?= : echo 995_MKSHECHO?= : echo
994.SILENT: 996.SILENT:
995.elif ${MAKEVERBOSE} == 1 997.elif ${MAKEVERBOSE} == 1
996_MKMSG?= @echo ' ' 998_MKMSG?= @echo ' '
997_MKSHMSG?= echo ' ' 999_MKSHMSG?= echo ' '
998_MKSHECHO?= : echo 1000_MKSHECHO?= : echo
999.SILENT: 1001.SILENT:
1000.else # MAKEVERBOSE >= 2 1002.else # MAKEVERBOSE >= 2
1001_MKMSG?= @echo '\# ' 1003_MKMSG?= @echo '\# '
1002_MKSHMSG?= echo '\# ' 1004_MKSHMSG?= echo '\# '
1003_MKSHECHO?= echo 1005_MKSHECHO?= echo
1004.SILENT: __makeverbose_dummy_target__ 1006.SILENT: __makeverbose_dummy_target__
1005.endif # MAKEVERBOSE >= 2 1007.endif # MAKEVERBOSE >= 2
1006.if ${MAKEVERBOSE} >= 3 1008.if ${MAKEVERBOSE} >= 3
1007.MAKEFLAGS: -dl 1009.MAKEFLAGS: -dl
1008.endif # ${MAKEVERBOSE} >= 3 1010.endif # ${MAKEVERBOSE} >= 3
1009.if ${MAKEVERBOSE} >= 4 1011.if ${MAKEVERBOSE} >= 4
1010.MAKEFLAGS: -dx 1012.MAKEFLAGS: -dx
1011.endif # ${MAKEVERBOSE} >= 4 1013.endif # ${MAKEVERBOSE} >= 4
1012 1014
1013_MKMSG_BUILD?= ${_MKMSG} " build " 1015_MKMSG_BUILD?= ${_MKMSG} " build "
1014_MKMSG_CREATE?= ${_MKMSG} " create " 1016_MKMSG_CREATE?= ${_MKMSG} " create "
1015_MKMSG_COMPILE?= ${_MKMSG} "compile " 1017_MKMSG_COMPILE?= ${_MKMSG} "compile "
1016_MKMSG_FORMAT?= ${_MKMSG} " format " 1018_MKMSG_FORMAT?= ${_MKMSG} " format "
1017_MKMSG_INSTALL?= ${_MKMSG} "install " 1019_MKMSG_INSTALL?= ${_MKMSG} "install "
1018_MKMSG_LINK?= ${_MKMSG} " link " 1020_MKMSG_LINK?= ${_MKMSG} " link "
1019_MKMSG_LEX?= ${_MKMSG} " lex " 1021_MKMSG_LEX?= ${_MKMSG} " lex "
1020_MKMSG_REMOVE?= ${_MKMSG} " remove " 1022_MKMSG_REMOVE?= ${_MKMSG} " remove "
1021_MKMSG_YACC?= ${_MKMSG} " yacc " 1023_MKMSG_YACC?= ${_MKMSG} " yacc "
1022 1024
1023_MKSHMSG_CREATE?= ${_MKSHMSG} " create " 1025_MKSHMSG_CREATE?= ${_MKSHMSG} " create "
1024_MKSHMSG_INSTALL?= ${_MKSHMSG} "install " 1026_MKSHMSG_INSTALL?= ${_MKSHMSG} "install "
1025 1027
1026_MKTARGET_BUILD?= ${_MKMSG_BUILD} ${.CURDIR:T}/${.TARGET} 1028_MKTARGET_BUILD?= ${_MKMSG_BUILD} ${.CURDIR:T}/${.TARGET}
1027_MKTARGET_CREATE?= ${_MKMSG_CREATE} ${.CURDIR:T}/${.TARGET} 1029_MKTARGET_CREATE?= ${_MKMSG_CREATE} ${.CURDIR:T}/${.TARGET}
1028_MKTARGET_COMPILE?= ${_MKMSG_COMPILE} ${.CURDIR:T}/${.TARGET} 1030_MKTARGET_COMPILE?= ${_MKMSG_COMPILE} ${.CURDIR:T}/${.TARGET}
1029_MKTARGET_FORMAT?= ${_MKMSG_FORMAT} ${.CURDIR:T}/${.TARGET} 1031_MKTARGET_FORMAT?= ${_MKMSG_FORMAT} ${.CURDIR:T}/${.TARGET}
1030_MKTARGET_INSTALL?= ${_MKMSG_INSTALL} ${.TARGET} 1032_MKTARGET_INSTALL?= ${_MKMSG_INSTALL} ${.TARGET}
1031_MKTARGET_LINK?= ${_MKMSG_LINK} ${.CURDIR:T}/${.TARGET} 1033_MKTARGET_LINK?= ${_MKMSG_LINK} ${.CURDIR:T}/${.TARGET}
1032_MKTARGET_LEX?= ${_MKMSG_LEX} ${.CURDIR:T}/${.TARGET} 1034_MKTARGET_LEX?= ${_MKMSG_LEX} ${.CURDIR:T}/${.TARGET}
1033_MKTARGET_REMOVE?= ${_MKMSG_REMOVE} ${.TARGET} 1035_MKTARGET_REMOVE?= ${_MKMSG_REMOVE} ${.TARGET}
1034_MKTARGET_YACC?= ${_MKMSG_YACC} ${.CURDIR:T}/${.TARGET} 1036_MKTARGET_YACC?= ${_MKMSG_YACC} ${.CURDIR:T}/${.TARGET}
1035 1037
1036.if ${MKMANDOC} == "yes" 1038.if ${MKMANDOC} == "yes"
1037TARGETS+= lintmanpages 1039TARGETS+= lintmanpages
1038.endif 1040.endif
1039 1041
1040.endif # !defined(_BSD_OWN_MK_) 1042.endif # !defined(_BSD_OWN_MK_)