1#	$NetBSD: Makefile,v 1.291.2.1 2012/05/09 20:06:36 riz Exp $
2
3#
4# This is the top-level makefile for building NetBSD. For an outline of
5# how to build a snapshot or release, as well as other release engineering
6# information, see http://www.NetBSD.org/developers/releng/index.html
7#
8# Not everything you can set or do is documented in this makefile. In
9# particular, you should review the files in /usr/share/mk (especially
10# bsd.README) for general information on building programs and writing
11# Makefiles within this structure, and see the comments in src/etc/Makefile
12# for further information on installation and release set options.
13#
14# Variables listed below can be set on the make command line (highest
15# priority), in /etc/mk.conf (middle priority), or in the environment
16# (lowest priority).
17#
18# Variables:
19#   DESTDIR is the target directory for installation of the compiled
20#	software. It defaults to /. Note that programs are built against
21#	libraries installed in DESTDIR.
22#   MKMAN, if `no', will prevent building of manual pages.
23#   MKOBJDIRS, if not `no', will build object directories at
24#	an appropriate point in a build.
25#   MKSHARE, if `no', will prevent building and installing
26#	anything in /usr/share.
27#   MKUPDATE, if not `no', will avoid a `make cleandir' at the start of
28#	`make build', as well as having the effects listed in
29#	/usr/share/mk/bsd.README.
30#   NOCLEANDIR, if defined, will avoid a `make cleandir' at the start
31#	of the `make build'.
32#   NOINCLUDES will avoid the `make includes' usually done by `make build'.
33#
34#   See mk.conf(5) for more details.
35#
36#
37# Targets:
38#   build:
39#	Builds a full release of NetBSD in DESTDIR, except for the
40#	/etc configuration files.
41#	If BUILD_DONE is set, this is an empty target.
42#   distribution:
43#	Builds a full release of NetBSD in DESTDIR, including the /etc
44#	configuration files.
45#   buildworld:
46#	As per `make distribution', except that it ensures that DESTDIR
47#	is not the root directory.
48#   installworld:
49#	Install the distribution from DESTDIR to INSTALLWORLDDIR (which
50#	defaults to the root directory).  Ensures that INSTALLWORLDDIR
51#	is not the root directory if cross compiling.
52#   release:
53#	Does a `make distribution', and then tars up the DESTDIR files
54#	into ${RELEASEDIR}/${RELEASEMACHINEDIR}, in release(7) format.
55#	(See etc/Makefile for more information on this.)
56#   regression-tests:
57#	Runs the regression tests in "regress" on this host.
58#   sets:
59#	Populate ${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/sets
60#	from ${DESTDIR}
61#   sourcesets:
62#	Populate ${RELEASEDIR}/source/sets from ${NETBSDSRCDIR}
63#   syspkgs:
64#	Populate ${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/syspkgs
65#	from ${DESTDIR}
66#   iso-image:
67#	Create CD-ROM image in RELEASEDIR/iso.
68#	RELEASEDIR must already have been populated by `make release'
69#	or equivalent.
70#   iso-image-source:
71#	Create CD-ROM image with source in RELEASEDIR/iso.
72#	RELEASEDIR must already have been populated by
73#	`make release sourcesets' or equivalent.
74#   live-image:
75#	Create bootable live image for emulators or USB stick etc.
76#	in RELEASEDIR/liveimage.
77#	RELEASEDIR must already have been populated by `make release'
78#	or equivalent.
79#   install-image:
80#	Create bootable installation image for USB stick etc.
81#	in RELEASEDIR/installimage.
82#	RELEASEDIR must already have been populated by `make release'
83#	or equivalent.
84#
85# Targets invoked by `make build,' in order:
86#   cleandir:        cleans the tree.
87#   do-top-obj:      creates the top level object directory.
88#   do-tools-obj:    creates object directories for the host toolchain.
89#   do-tools:        builds host toolchain.
90#   obj:             creates object directories.
91#   do-distrib-dirs: creates the distribution directories.
92#   includes:        installs include files.
93#   do-tools-compat: builds the "libnbcompat" library; needed for some
94#                    random host tool programs in the source tree.
95#   do-lib-csu:      builds and installs prerequisites from lib/csu.
96#   do-libgcc:       builds and installs prerequisites from
97#                    gnu/lib/crtstuff${LIBGCC_EXT} (if necessary) and
98#                    gnu/lib/libgcc${LIBGCC_EXT}.
99#   do-libpcc:       builds and install prerequisites from
100#                    external/bsd/pcc/crtstuff (if necessary) and
101#                    external/bsd/pcc/libpcc.
102#   do-lib-libc:     builds and installs prerequisites from lib/libc.
103#   do-lib:          builds and installs prerequisites from lib.
104#   do-sys-rump-dev-lib: builds and installs prerequisites from sys/rump/dev/lib
105#   do-sys-rump-fs-lib:  builds and installs prerequisites from sys/rump/fs/lib
106#   do-sys-rump-kern-lib:  builds and installs prereq. from sys/rump/kern/lib
107#   do-sys-rump-net-lib: builds and installs prerequisites from sys/rump/net/lib
108#   do-sys-modules:  builds and installs kernel modules (used by rump binaries)
109#   do-ld.so:        builds and installs prerequisites from libexec/ld.*_so.
110#   do-compat-lib-csu: builds and installs prerequisites from compat/lib/csu
111#                    if ${MKCOMPAT} != "no".
112#   do-compat-libgcc: builds and installs prerequisites from
113#                    compat/gnu/lib/crtstuff${LIBGCC_EXT} (if necessary) and
114#                    compat/gnu/lib/libgcc${LIBGCC_EXT} if ${MKCOMPAT} != "no".
115#   do-compat-lib-libc: builds and installs prerequisites from compat/lib/libc
116#                    if ${MKCOMPAT} != "no".
117#   do-build:        builds and installs the entire system.
118#   do-x11:          builds and installs X11 if ${MKX11} != "no"; either
119#                    X11R7 from src/external/mit/xorg if ${X11FLAVOUR} == "Xorg"
120#                    or X11R6 from src/x11
121#   do-extsrc:       builds and installs extsrc if ${MKEXTSRC} != "no".
122#   do-obsolete:     installs the obsolete sets (for the postinstall-* targets).
123#
124
125.if ${.MAKEFLAGS:M${.CURDIR}/share/mk} == ""
126.MAKEFLAGS: -m ${.CURDIR}/share/mk
127.endif
128
129#
130# If _SRC_TOP_OBJ_ gets set here, we will end up with a directory that may
131# not be the top level objdir, because "make obj" can happen in the *middle*
132# of "make build" (long after <bsd.own.mk> is calculated it).  So, pre-set
133# _SRC_TOP_OBJ_ here so it will not be added to ${.MAKEOVERRIDES}.
134#
135_SRC_TOP_OBJ_=
136
137.include <bsd.own.mk>
138
139#
140# Sanity check: make sure that "make build" is not invoked simultaneously
141# with a standard recursive target.
142#
143
144.if make(build) || make(release) || make(snapshot)
145.for targ in ${TARGETS:Nobj:Ncleandir}
146.if make(${targ}) && !target(.BEGIN)
147.BEGIN:
148	@echo 'BUILD ABORTED: "make build" and "make ${targ}" are mutually exclusive.'
149	@false
150.endif
151.endfor
152.endif
153
154#
155# _SUBDIR is used to set SUBDIR, after removing directories that have
156# BUILD_${dir}=no, or that have no ${dir}/Makefile.
157#
158_SUBDIR=	tools lib include gnu external crypto/external bin games
159_SUBDIR+=	libexec sbin usr.bin
160_SUBDIR+=	usr.sbin share rescue sys etc tests compat .WAIT distrib regress
161
162.for dir in ${_SUBDIR}
163.if "${dir}" == ".WAIT" \
164	|| (${BUILD_${dir}:Uyes} != "no" && exists(${dir}/Makefile))
165SUBDIR+=	${dir}
166.endif
167.endfor
168
169.if exists(regress)
170regression-tests: .PHONY .MAKE
171	@echo Running regression tests...
172	${MAKEDIRTARGET} regress regress
173.endif
174
175.if ${MKUNPRIVED} != "no"
176NOPOSTINSTALL=	# defined
177.endif
178
179afterinstall: .PHONY .MAKE
180.if ${MKMAN} != "no"
181	${MAKEDIRTARGET} share/man makedb
182.endif
183.if (${MKUNPRIVED} != "no" && ${MKINFO} != "no")
184	${MAKEDIRTARGET} gnu/usr.bin/texinfo/install-info infodir-meta
185.endif
186.if !defined(NOPOSTINSTALL)
187	${MAKEDIRTARGET} . postinstall-check
188.endif
189
190_POSTINSTALL=	${.CURDIR}/usr.sbin/postinstall/postinstall
191_POSTINSTALL_ENV= \
192	AWK=${TOOL_AWK:Q}		\
193	DB=${TOOL_DB:Q}			\
194	HOST_SH=${HOST_SH:Q}		\
195	MAKE=${MAKE:Q}			\
196	PWD_MKDB=${TOOL_PWD_MKDB:Q}	\
197	STAT=${TOOL_STAT:Q}
198
199postinstall-check: .PHONY
200	@echo "   === Post installation checks ==="
201	${_POSTINSTALL_ENV} ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} -d ${DESTDIR}/ check; if [ $$? -gt 1 ]; then exit 1; fi
202	@echo "   ================================"
203
204postinstall-fix: .NOTMAIN .PHONY
205	@echo "   === Post installation fixes ==="
206	${_POSTINSTALL_ENV} ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} -d ${DESTDIR}/ fix
207	@echo "   ==============================="
208
209postinstall-fix-obsolete: .NOTMAIN .PHONY
210	@echo "   === Removing obsolete files ==="
211	${_POSTINSTALL_ENV} ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} -d ${DESTDIR}/ fix obsolete
212	@echo "   ==============================="
213
214
215#
216# Targets (in order!) called by "make build".
217#
218.if defined(HAVE_GCC)
219.if ${HAVE_GCC} == "4"
220LIBGCC_EXT=4
221BUILD_CC_LIB_BASEDIR= gnu/lib
222BUILD_CC_LIB_BASETARGET= gnu-lib
223.else
224LIBGCC_EXT=
225BUILD_CC_LIB_BASEDIR= external/gpl3/gcc/lib
226BUILD_CC_LIB_BASETARGET= external-gpl3-gcc-lib
227.endif
228.endif
229
230BUILDTARGETS+=	check-tools
231.if ${MKUPDATE} == "no" && !defined(NOCLEANDIR)
232BUILDTARGETS+=	cleandir
233.endif
234.if ${MKOBJDIRS} != "no"
235BUILDTARGETS+=	do-top-obj
236.endif
237.if ${USETOOLS} == "yes"	# {
238.if ${MKOBJDIRS} != "no"
239BUILDTARGETS+=	do-tools-obj
240.endif
241BUILDTARGETS+=	do-tools
242.endif # USETOOLS		# }
243.if ${MKOBJDIRS} != "no"
244BUILDTARGETS+=	obj
245.endif
246BUILDTARGETS+=	clean_METALOG
247.if !defined(NODISTRIBDIRS)
248BUILDTARGETS+=	do-distrib-dirs
249.endif
250.if !defined(NOINCLUDES)
251BUILDTARGETS+=	includes
252.endif
253BUILDTARGETS+=	do-tools-compat
254BUILDTARGETS+=	do-lib-csu
255.if ${MKGCC} != "no"
256BUILDTARGETS+=	do-libgcc
257.endif
258.if ${MKPCC} != "no"
259BUILDTARGET+=	do-libpcc
260.endif
261BUILDTARGETS+=	do-lib-libc
262BUILDTARGETS+=	do-lib
263.if ${MKKMOD} != "no"
264BUILDTARGETS+=	do-sys-modules
265.endif
266BUILDTARGETS+=	do-sys-rump-dev-lib do-sys-rump-fs-lib
267BUILDTARGETS+=	do-sys-rump-kern-lib do-sys-rump-net-lib
268.if ${MKCOMPAT} != "no"
269BUILDTARGETS+=	do-compat-lib-csu
270BUILDTARGETS+=	do-compat-libgcc
271BUILDTARGETS+=	do-compat-lib-libc
272.endif
273BUILDTARGETS+=	do-ld.so
274BUILDTARGETS+=	do-build
275.if ${MKX11} != "no"
276BUILDTARGETS+=	do-x11
277.endif
278.if ${MKEXTSRC} != "no"
279BUILDTARGETS+=	do-extsrc
280.endif
281BUILDTARGETS+=	do-obsolete
282
283#
284# Enforce proper ordering of some rules.
285#
286
287.ORDER:		${BUILDTARGETS}
288includes-lib:	.PHONY includes-include includes-sys
289includes-gnu:	.PHONY includes-lib
290
291#
292# Build the system and install into DESTDIR.
293#
294
295START_TIME!=	date
296
297build: .PHONY .MAKE
298.if defined(BUILD_DONE)
299	@echo "Build already installed into ${DESTDIR}"
300.else
301	@echo "Build started at: ${START_TIME}"
302.for tgt in ${BUILDTARGETS}
303	${MAKEDIRTARGET} . ${tgt}
304.endfor
305	${MAKEDIRTARGET} etc install-etc-release
306	@echo   "Build started at:  ${START_TIME}"
307	@printf "Build finished at: " && date
308.endif
309
310#
311# Build a full distribution, but not a release (i.e. no sets into
312# ${RELEASEDIR}).  "buildworld" enforces a build to ${DESTDIR} != /
313#
314
315distribution buildworld: .PHONY .MAKE
316.if make(buildworld) && \
317    (!defined(DESTDIR) || ${DESTDIR} == "" || ${DESTDIR} == "/")
318	@echo "Won't make ${.TARGET} with DESTDIR=/"
319	@false
320.endif
321	${MAKEDIRTARGET} . build NOPOSTINSTALL=1
322	${MAKEDIRTARGET} etc distribution INSTALL_DONE=1
323.if defined(DESTDIR) && ${DESTDIR} != "" && ${DESTDIR} != "/"
324	${MAKEDIRTARGET} . postinstall-fix-obsolete
325	${MAKEDIRTARGET} distrib/sets checkflist
326.endif
327	@echo   "make ${.TARGET} started at:  ${START_TIME}"
328	@printf "make ${.TARGET} finished at: " && date
329
330#
331# Install the distribution from $DESTDIR to $INSTALLWORLDDIR (defaults to `/')
332# If installing to /, ensures that the host's operating system is NetBSD and
333# the host's `uname -m` == ${MACHINE}.
334#
335
336HOST_UNAME_S!=	uname -s
337HOST_UNAME_M!=	uname -m
338
339installworld: .PHONY .MAKE
340.if (!defined(DESTDIR) || ${DESTDIR} == "" || ${DESTDIR} == "/")
341	@echo "Can't make ${.TARGET} to DESTDIR=/"
342	@false
343.endif
344.if !defined(INSTALLWORLDDIR) || \
345    ${INSTALLWORLDDIR} == "" || ${INSTALLWORLDDIR} == "/"
346.if (${HOST_UNAME_S} != "NetBSD")
347	@echo "Won't cross-make ${.TARGET} from ${HOST_UNAME_S} to NetBSD with INSTALLWORLDDIR=/"
348	@false
349.endif
350.if (${HOST_UNAME_M} != ${MACHINE})
351	@echo "Won't cross-make ${.TARGET} from ${HOST_UNAME_M} to ${MACHINE} with INSTALLWORLDDIR=/"
352	@false
353.endif
354.endif
355	${MAKEDIRTARGET} distrib/sets installsets \
356		INSTALLDIR=${INSTALLWORLDDIR:U/} INSTALLSETS=${INSTALLSETS:Q}
357	${MAKEDIRTARGET} . postinstall-check DESTDIR=${INSTALLWORLDDIR}
358	@echo   "make ${.TARGET} started at:  ${START_TIME}"
359	@printf "make ${.TARGET} finished at: " && date
360
361#
362# Install modules from $DESTDIR to $INSTALLMODULESDIR
363#
364installmodules: .PHONY .MAKE
365.if (!defined(DESTDIR) || ${DESTDIR} == "" || ${DESTDIR} == "/")
366	@echo "Can't make ${.TARGET} to DESTDIR=/"
367	@false
368.endif
369.if !defined(INSTALLMODULESDIR) || \
370    ${INSTALLMODULESDIR} == "" || ${INSTALLMODULESDIR} == "/"
371.if (${HOST_UNAME_S} != "NetBSD")
372	@echo "Won't cross-make ${.TARGET} from ${HOST_UNAME_S} to NetBSD with INSTALLMODULESDIR=/"
373	@false
374.endif
375.if (${HOST_UNAME_M} != ${MACHINE})
376	@echo "Won't cross-make ${.TARGET} from ${HOST_UNAME_M} to ${MACHINE} with INSTALLMODULESDIR=/"
377	@false
378.endif
379.endif
380	${MAKEDIRTARGET} sys/modules install DESTDIR=${INSTALLMODULESDIR:U/}
381	@echo   "make ${.TARGET} started at:  ${START_TIME}"
382	@printf "make ${.TARGET} finished at: " && date
383
384#
385# Create sets from $DESTDIR or $NETBSDSRCDIR into $RELEASEDIR
386#
387
388.for tgt in sets sourcesets syspkgs
389${tgt}: .PHONY .MAKE
390	${MAKEDIRTARGET} distrib/sets ${tgt}
391.endfor
392
393#
394# Build a release or snapshot (implies "make distribution").  Note that
395# in this case, the set lists will be checked before the tar files
396# are made.
397#
398
399release snapshot: .PHONY .MAKE
400	${MAKEDIRTARGET} . distribution
401	${MAKEDIRTARGET} etc release DISTRIBUTION_DONE=1
402	@echo   "make ${.TARGET} started at:  ${START_TIME}"
403	@printf "make ${.TARGET} finished at: " && date
404
405#
406# Create a CD-ROM image.
407#
408
409iso-image: .PHONY
410	${MAKEDIRTARGET} distrib iso_image
411	${MAKEDIRTARGET} etc iso-image
412	@echo   "make ${.TARGET} started at:  ${START_TIME}"
413	@printf "make ${.TARGET} finished at: " && date
414
415iso-image-source: .PHONY
416	${MAKEDIRTARGET} distrib iso_image CDSOURCE=true
417	${MAKEDIRTARGET} etc iso-image
418	@echo   "make ${.TARGET} started at:  ${START_TIME}"
419	@printf "make ${.TARGET} finished at: " && date
420
421#
422# Create bootable live images.
423#
424
425live-image: .PHONY
426	${MAKEDIRTARGET} etc live-image
427	@echo   "make ${.TARGET} started at:  ${START_TIME}"
428	@printf "make ${.TARGET} finished at: " && date
429
430#
431# Create bootable installation images.
432#
433
434install-image: .PHONY
435	${MAKEDIRTARGET} etc install-image
436	@echo   "make ${.TARGET} started at:  ${START_TIME}"
437	@printf "make ${.TARGET} finished at: " && date
438
439#
440# Special components of the "make build" process.
441#
442
443check-tools: .PHONY
444.if ${TOOLCHAIN_MISSING} != "no" && !defined(EXTERNAL_TOOLCHAIN)
445	@echo '*** WARNING:  Building on MACHINE=${MACHINE} with missing toolchain.'
446	@echo '*** May result in a failed build or corrupt binaries!'
447.elif defined(EXTERNAL_TOOLCHAIN)
448	@echo '*** Using external toolchain rooted at ${EXTERNAL_TOOLCHAIN}.'
449.endif
450.if defined(NBUILDJOBS)
451	@echo '*** WARNING: NBUILDJOBS is obsolete; use -j directly instead!'
452.endif
453
454# Delete or sanitise a leftover METALOG from a previous build.
455clean_METALOG: .PHONY .MAKE
456.if ${MKUPDATE} != "no"
457	${MAKEDIRTARGET} distrib/sets clean_METALOG
458.endif
459
460do-distrib-dirs: .PHONY .MAKE
461.if !defined(DESTDIR) || ${DESTDIR} == ""
462	${MAKEDIRTARGET} etc distrib-dirs DESTDIR=/
463.else
464	${MAKEDIRTARGET} etc distrib-dirs DESTDIR=${DESTDIR}
465.endif
466
467.for targ in cleandir obj includes
468do-${targ}: .PHONY ${targ}
469	@true
470.endfor
471
472.if defined(HAVE_GCC)
473.if ${USE_COMPILERCRTSTUFF} == "yes"
474BUILD_CC_LIB= ${BUILD_CC_LIB_BASEDIR}/crtstuff${LIBGCC_EXT}
475.endif
476BUILD_CC_LIB+= ${BUILD_CC_LIB_BASEDIR}/libgcc${LIBGCC_EXT}
477.elif defined(HAVE_PCC)
478BUILD_CC_LIB+= external/bsd/pcc/crtstuff
479BUILD_CC_LIB+= external/bsd/pcc/libpcc
480.endif
481
482.for dir in tools tools/compat lib/csu ${BUILD_CC_LIB} lib/libc lib sys/rump/dev/lib sys/rump/fs/lib sys/rump/kern/lib sys/rump/net/lib sys/modules
483do-${dir:S/\//-/g}: .PHONY .MAKE
484.for targ in dependall install
485	${MAKEDIRTARGET} ${dir} ${targ}
486.endfor
487.endfor
488
489.if ${MKCOMPAT} != "no"
490COMPAT_SUBDIR_LIST=lib/csu ${BUILD_CC_LIB} lib/libc
491.for dir in ${COMPAT_SUBDIR_LIST}
492do-compat-${dir:S/\//-/g}: .PHONY .MAKE
493.for targ in dependall install
494	${MAKEDIRTARGET} compat ${targ} BOOTSTRAP_SUBDIRS="../../../${dir}"
495.endfor
496.endfor
497.endif
498
499do-top-obj: .PHONY .MAKE
500	${MAKEDIRTARGET} . obj NOSUBDIR=
501
502do-tools-obj: .PHONY .MAKE
503	${MAKEDIRTARGET} tools obj
504
505do-libgcc: .PHONY .MAKE
506.if defined(HAVE_GCC)
507.if ${MKGCC} != "no"
508.if ${USE_COMPILERCRTSTUFF} == "yes"
509	${MAKEDIRTARGET} . do-${BUILD_CC_LIB_BASETARGET}-crtstuff${LIBGCC_EXT}
510.endif
511	${MAKEDIRTARGET} . do-${BUILD_CC_LIB_BASETARGET}-libgcc${LIBGCC_EXT}
512.endif
513.endif
514
515do-compat-libgcc: .PHONY .MAKE
516.if defined(HAVE_GCC)
517.if ${MKGCC} != "no"
518.if ${USE_COMPILERCRTSTUFF} == "yes"
519	${MAKEDIRTARGET} . do-compat-${BUILD_CC_LIB_BASETARGET}-crtstuff${LIBGCC_EXT}
520.endif
521	${MAKEDIRTARGET} . do-compat-${BUILD_CC_LIB_BASETARGET}-libgcc${LIBGCC_EXT}
522.endif
523.endif
524
525do-libpcc: .PHONY .MAKE
526.if defined(HAVE_PCC)
527.if ${MKPCC} != "no"
528.if ${USE_COMPILERCRTSTUFF} == "yes"
529	${MAKEDIRTARGET} . do-pcc-lib-crtstuff
530.endif
531	${MAKEDIRTARGET} . do-pcc-lib-libpcc
532.endif
533.endif
534
535do-ld.so: .PHONY .MAKE
536.for targ in dependall install
537	${MAKEDIRTARGET} libexec/ld.elf_so ${targ}
538.endfor
539
540do-build: .PHONY .MAKE
541.for targ in dependall install
542	${MAKEDIRTARGET} . ${targ} BUILD_tools=no BUILD_lib=no
543.endfor
544
545do-x11: .PHONY .MAKE
546.if ${MKX11} != "no"
547.if ${X11FLAVOUR} == "Xorg"
548	${MAKEDIRTARGET} external/mit/xorg build
549.else
550	${MAKEDIRTARGET} x11 build
551.endif
552.else
553	@echo "MKX11 is not enabled"
554	@false
555.endif
556
557do-extsrc: .PHONY .MAKE
558.if ${MKEXTSRC} != "no"
559	${MAKEDIRTARGET} extsrc build
560.else
561	@echo "MKEXTSRC is not enabled"
562	@false
563.endif
564
565do-obsolete: .PHONY .MAKE
566	${MAKEDIRTARGET} etc install-obsolete-lists
567
568#
569# Speedup stubs for some subtrees that don't need to run these rules.
570# (Tells <bsd.subdir.mk> not to recurse for them.)
571#
572
573.for dir in bin etc distrib games libexec regress sbin usr.bin usr.sbin tools
574includes-${dir}: .PHONY
575	@true
576.endfor
577.for dir in etc distrib regress
578install-${dir}: .PHONY
579	@true
580.endfor
581
582#
583# XXX this needs to change when distrib Makefiles are recursion compliant
584# XXX many distrib subdirs need "cd etc && make snap_pre snap_kern" first...
585#
586dependall-distrib depend-distrib all-distrib: .PHONY
587	@true
588
589.include <bsd.sys.mk>
590.include <bsd.obj.mk>
591.include <bsd.kernobj.mk>
592.include <bsd.subdir.mk>
593
594#
595# Display current make(1) parameters
596#
597params: .PHONY .MAKE
598	${MAKEDIRTARGET} etc params
599