4 # Make command line options:
5 # -DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir
6 # -DNO_CLEAN do not clean at all
7 # -DNO_SHARE do not go into share subdir
8 # -DNO_KERNELCONFIG do not run config in ${MAKE} buildkernel
9 # -DNO_KERNELCLEAN do not run ${MAKE} clean in ${MAKE} buildkernel
10 # -DNO_KERNELDEPEND do not run ${MAKE} depend in ${MAKE} buildkernel
11 # -DNO_PORTSUPDATE do not update ports in ${MAKE} update
12 # -DNO_DOCUPDATE do not update doc in ${MAKE} update
13 # -DNO_CTF do not run the DTrace CTF conversion tools on built objects
14 # LOCAL_DIRS="list of dirs" to add additional dirs to the SUBDIR list
15 # TARGET="machine" to crossbuild world for a different machine type
18 # The intended user-driven targets are:
19 # buildworld - rebuild *everything*, including glue to help do upgrades
20 # installworld- install everything built by "buildworld"
21 # doxygen - build API documentation of the kernel
22 # update - convenient way to update your source tree (eg: cvsup/cvs)
24 # Standard targets (not defined here) are documented in the makefiles in
25 # /usr/share/mk. These include:
26 # obj depend all install clean cleandepend cleanobj
30 # We must do share/info early so that installation of info `dir'
31 # entries works correctly. Do it first since it is less likely to
32 # grow dependencies on include and lib than vice versa.
34 # We must do lib/ and libexec/ before bin/, because if installworld
35 # installs a new /bin/sh, the 'make' command will *immediately*
36 # use that new version. And the new (dynamically-linked) /bin/sh
37 # will expect to find appropriate libraries in /lib and /libexec.
39 SUBDIR= share/info lib libexec
41 .if ${MK_GAMES} != "no"
44 .if ${MK_CDDL} != "no"
50 .if ${MK_KERBEROS} != "no"
53 .if ${MK_RESCUE} != "no"
57 .if ${MK_CRYPT} != "no"
60 .if !defined(NO_SHARE)
63 SUBDIR+=sys usr.bin usr.sbin
65 # We must do etc/ last for install/distribute to work.
69 # These are last, since it is nice to at least get the base system
70 # rebuilt before you do them.
71 .for _DIR in ${LOCAL_DIRS}
72 .if exists(${.CURDIR}/${_DIR}/Makefile)
77 .if defined(SUBDIR_OVERRIDE)
78 SUBDIR= ${SUBDIR_OVERRIDE}
84 .if defined(NO_CLEANDIR)
85 CLEANDIR= clean cleandepend
91 CVSFLAGS?= -A -P -d -I!
95 SUPFLAGS+= -h ${SUPHOST}
98 MAKEOBJDIRPREFIX?= /usr/obj
99 .if !defined(OSRELDATE)
100 .if exists(/usr/include/osreldate.h)
101 OSRELDATE!= awk '/^\#define[[:space:]]*__FreeBSD_version/ { print $$3 }' \
102 /usr/include/osreldate.h
108 .if !defined(VERSION)
110 VERSION+= ${OSRELDATE}
113 # Guess machine architecture from machine type, and vice versa.
114 .if !defined(TARGET_ARCH) && defined(TARGET)
115 TARGET_ARCH= ${TARGET:S/pc98/i386/:S/sun4v/sparc64/}
116 .elif !defined(TARGET) && defined(TARGET_ARCH) && \
117 ${TARGET_ARCH} != ${MACHINE_ARCH}
118 TARGET= ${TARGET_ARCH}
120 # Otherwise, default to current machine type and architecture.
122 TARGET_ARCH?= ${MACHINE_ARCH}
124 KNOWN_ARCHES?= amd64 arm i386 i386/pc98 ia64 powerpc sparc64 sparc64/sun4v
125 .if ${TARGET} == ${TARGET_ARCH}
128 _t= ${TARGET_ARCH}/${TARGET}
131 .if empty(KNOWN_ARCHES:M${_t})
132 .error Unknown target ${TARGET_ARCH}:${TARGET}.
136 .if ${TARGET} == ${MACHINE}
137 TARGET_CPUTYPE?=${CPUTYPE}
142 .if !empty(TARGET_CPUTYPE)
143 _TARGET_CPUTYPE=${TARGET_CPUTYPE}
145 _TARGET_CPUTYPE=dummy
147 _CPUTYPE!= MAKEFLAGS= CPUTYPE=${_TARGET_CPUTYPE} ${MAKE} \
148 -f /dev/null -m ${.CURDIR}/share/mk -V CPUTYPE
149 .if ${_CPUTYPE} != ${_TARGET_CPUTYPE}
150 .error CPUTYPE global should be set with ?=.
153 BUILD_ARCH!= uname -p
154 .if ${MACHINE_ARCH} != ${BUILD_ARCH}
155 .error To cross-build, set TARGET_ARCH.
158 .if ${MACHINE} == ${TARGET} && !defined(CROSS_BUILD_TESTING)
159 OBJTREE= ${MAKEOBJDIRPREFIX}
161 OBJTREE= ${MAKEOBJDIRPREFIX}/${TARGET}
163 WORLDTMP= ${OBJTREE}${.CURDIR}/tmp
164 # /usr/games added for fortune which depend on strfile
165 BPATH= ${WORLDTMP}/legacy/usr/sbin:${WORLDTMP}/legacy/usr/bin:${WORLDTMP}/legacy/usr/games
166 XPATH= ${WORLDTMP}/usr/sbin:${WORLDTMP}/usr/bin:${WORLDTMP}/usr/games
167 STRICTTMPPATH= ${BPATH}:${XPATH}
168 TMPPATH= ${STRICTTMPPATH}:${PATH}
171 # Avoid running mktemp(1) unless actually needed.
172 # It may not be functional, e.g., due to new ABI
173 # when in the middle of installing over this system.
175 .if make(distributeworld) || make(installworld)
176 INSTALLTMP!= /usr/bin/mktemp -d -u -t install
180 # Building a world goes through the following stages
182 # 1. legacy stage [BMAKE]
183 # This stage is responsible for creating compatibility
184 # shims that are needed by the bootstrap-tools,
185 # build-tools and cross-tools stages.
186 # 1. bootstrap-tools stage [BMAKE]
187 # This stage is responsible for creating programs that
188 # are needed for backward compatibility reasons. They
189 # are not built as cross-tools.
190 # 2. build-tools stage [TMAKE]
191 # This stage is responsible for creating the object
192 # tree and building any tools that are needed during
194 # 3. cross-tools stage [XMAKE]
195 # This stage is responsible for creating any tools that
196 # are needed for cross-builds. A cross-compiler is one
198 # 4. world stage [WMAKE]
199 # This stage actually builds the world.
200 # 5. install stage (optional) [IMAKE]
201 # This stage installs a previously built world.
206 # Common environment for world related stages
207 CROSSENV= MAKEOBJDIRPREFIX=${OBJTREE} \
208 MACHINE_ARCH=${TARGET_ARCH} \
210 CPUTYPE=${TARGET_CPUTYPE} \
211 GROFF_BIN_PATH=${WORLDTMP}/legacy/usr/bin \
212 GROFF_FONT_PATH=${WORLDTMP}/legacy/usr/share/groff_font \
213 GROFF_TMAC_PATH=${WORLDTMP}/legacy/usr/share/tmac
214 .if ${OSRELDATE} < 700044
215 CROSSENV+= AR=gnu-ar RANLIB=gnu-ranlib
218 # bootstrap-tools stage
219 BMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \
220 PATH=${BPATH}:${PATH} \
221 WORLDTMP=${WORLDTMP} \
222 VERSION="${VERSION}" \
223 MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}"
224 BMAKE= MAKEOBJDIRPREFIX=${WORLDTMP} \
225 ${BMAKEENV} ${MAKE} -f Makefile.inc1 \
227 BOOTSTRAPPING=${OSRELDATE} \
228 -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT -DWITHOUT_MAN \
229 -DWITHOUT_NLS -DNO_PIC -DWITHOUT_PROFILE -DNO_SHARED \
230 -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF
233 TMAKE= MAKEOBJDIRPREFIX=${OBJTREE} \
234 ${BMAKEENV} ${MAKE} -f Makefile.inc1 \
235 TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
237 BOOTSTRAPPING=${OSRELDATE} -DNO_LINT -DNO_CPU_CFLAGS \
241 XMAKE= TOOLS_PREFIX=${WORLDTMP} ${BMAKE} \
242 TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
246 WMAKEENV= ${CROSSENV} \
247 _SHLIBDIRPREFIX=${WORLDTMP} \
248 VERSION="${VERSION}" \
249 INSTALL="sh ${.CURDIR}/tools/install.sh" \
251 .if ${MK_CDDL} == "no" || defined(NO_CTF)
254 WMAKE= ${WMAKEENV} ${MAKE} -f Makefile.inc1 DESTDIR=${WORLDTMP}
256 .if ${TARGET_ARCH} == "amd64"
258 LIB32TMP= ${OBJTREE}${.CURDIR}/lib32
260 .if empty(TARGET_CPUTYPE)
263 LIB32CPUTYPE= ${TARGET_CPUTYPE}
265 LIB32FLAGS= -m32 -march=${LIB32CPUTYPE} -mfancy-math-387 -DCOMPAT_32BIT \
266 -iprefix ${LIB32TMP}/usr/ \
267 -L${LIB32TMP}/usr/lib32 \
268 -B${LIB32TMP}/usr/lib32
270 # Yes, the flags are redundant.
271 LIB32WMAKEENV= MAKEOBJDIRPREFIX=${OBJTREE}/lib32 \
272 _SHLIBDIRPREFIX=${LIB32TMP} \
273 VERSION="${VERSION}" \
276 INSTALL="sh ${.CURDIR}/tools/install.sh" \
278 CC="${CC} ${LIB32FLAGS}" \
279 CXX="${CXX} ${LIB32FLAGS}" \
280 OBJC="${OBJC} ${LIB32FLAGS}" \
281 LD="${LD} -m elf_i386_fbsd -Y P,${LIB32TMP}/usr/lib32" \
286 LIB32WMAKE= ${LIB32WMAKEENV} ${MAKE} -DNO_CPU_CFLAGS -DCOMPAT_32BIT \
287 -DWITHOUT_BIND -DWITHOUT_MAN -DWITHOUT_NLS -DWITHOUT_INFO \
288 -DWITHOUT_HTML -DNO_CTF DESTDIR=${LIB32TMP}
289 LIB32IMAKE= ${LIB32WMAKE:NINSTALL=*:NDESTDIR=*} -DNO_INCS
293 IMAKEENV= ${CROSSENV}
294 IMAKE= ${IMAKEENV} ${MAKE} -f Makefile.inc1
295 .if empty(.MAKEFLAGS:M-n)
296 IMAKEENV+= PATH=${STRICTTMPPATH}:${INSTALLTMP} \
297 LD_LIBRARY_PATH=${INSTALLTMP} \
298 PATH_LOCALE=${INSTALLTMP}/locale
299 IMAKE+= __MAKE_SHELL=${INSTALLTMP}/sh
301 IMAKEENV+= PATH=${TMPPATH}:${INSTALLTMP}
305 KMAKEENV= ${WMAKEENV}
306 KMAKE= ${KMAKEENV} ${MAKE} KERNEL=${INSTKERNNAME}
311 # Attempt to rebuild the entire system, with reasonable chance of
312 # success, regardless of how old your existing system is.
315 .if ${.CURDIR:C/[^,]//g} != ""
316 # The m4 build of sendmail files doesn't like it if ',' is used
317 # anywhere in the path of it's files.
319 @echo "*** Error: path to source tree contains a comma ','"
324 @echo "--------------------------------------------------------------"
325 @echo ">>> Rebuilding the temporary build tree"
326 @echo "--------------------------------------------------------------"
327 .if !defined(NO_CLEAN)
329 .if ${TARGET_ARCH} == "amd64"
333 rm -rf ${WORLDTMP}/legacy/usr/include
334 # XXX - These three can depend on any header file.
335 rm -f ${OBJTREE}${.CURDIR}/usr.bin/kdump/ioctl.c
336 rm -f ${OBJTREE}${.CURDIR}/usr.bin/kdump/kdump_subr.c
337 rm -f ${OBJTREE}${.CURDIR}/usr.bin/truss/ioctl.c
340 usr/bin usr/games usr/include/sys usr/lib \
341 usr/libexec usr/sbin usr/share/dict \
342 usr/share/groff_font/devX100 \
343 usr/share/groff_font/devX100-12 \
344 usr/share/groff_font/devX75 \
345 usr/share/groff_font/devX75-12 \
346 usr/share/groff_font/devascii \
347 usr/share/groff_font/devcp1047 \
348 usr/share/groff_font/devdvi \
349 usr/share/groff_font/devhtml \
350 usr/share/groff_font/devkoi8-r \
351 usr/share/groff_font/devlatin1 \
352 usr/share/groff_font/devlbp \
353 usr/share/groff_font/devlj4 \
354 usr/share/groff_font/devps \
355 usr/share/groff_font/devutf8 \
356 usr/share/tmac/mdoc usr/share/tmac/mm
357 mkdir -p ${WORLDTMP}/legacy/${_dir}
360 lib usr/bin usr/include usr/lib/compat/aout usr/libdata/ldscripts \
361 usr/libexec usr/sbin usr/share/misc
362 mkdir -p ${WORLDTMP}/${_dir}
364 mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \
365 -p ${WORLDTMP}/usr/include >/dev/null
366 ln -sf ${.CURDIR}/sys ${WORLDTMP}
367 .if ${MK_BIND_LIBS} != "no"
368 mtree -deU -f ${.CURDIR}/etc/mtree/BIND.include.dist \
369 -p ${WORLDTMP}/usr/include >/dev/null
373 @echo "--------------------------------------------------------------"
374 @echo ">>> stage 1.1: legacy release compatibility shims"
375 @echo "--------------------------------------------------------------"
376 ${_+_}cd ${.CURDIR}; ${BMAKE} legacy
379 @echo "--------------------------------------------------------------"
380 @echo ">>> stage 1.2: bootstrap tools"
381 @echo "--------------------------------------------------------------"
382 ${_+_}cd ${.CURDIR}; ${BMAKE} bootstrap-tools
384 .if !defined(NO_CLEAN)
386 @echo "--------------------------------------------------------------"
387 @echo ">>> stage 2.1: cleaning up the object tree"
388 @echo "--------------------------------------------------------------"
389 ${_+_}cd ${.CURDIR}; ${WMAKE} ${CLEANDIR:S/^/par-/}
390 .if ${TARGET_ARCH} == "amd64"
391 ${_+_}cd ${.CURDIR}; ${LIB32WMAKE} -f Makefile.inc1 ${CLEANDIR:S/^/par-/}
396 @echo "--------------------------------------------------------------"
397 @echo ">>> stage 2.2: rebuilding the object tree"
398 @echo "--------------------------------------------------------------"
399 ${_+_}cd ${.CURDIR}; ${WMAKE} par-obj
402 @echo "--------------------------------------------------------------"
403 @echo ">>> stage 2.3: build tools"
404 @echo "--------------------------------------------------------------"
405 ${_+_}cd ${.CURDIR}; ${TMAKE} build-tools
408 @echo "--------------------------------------------------------------"
409 @echo ">>> stage 3: cross tools"
410 @echo "--------------------------------------------------------------"
411 ${_+_}cd ${.CURDIR}; ${XMAKE} cross-tools
414 @echo "--------------------------------------------------------------"
415 @echo ">>> stage 4.1: building includes"
416 @echo "--------------------------------------------------------------"
417 ${_+_}cd ${.CURDIR}; ${WMAKE} SHARED=symlinks par-includes
420 @echo "--------------------------------------------------------------"
421 @echo ">>> stage 4.2: building libraries"
422 @echo "--------------------------------------------------------------"
423 ${_+_}cd ${.CURDIR}; \
424 ${WMAKE} -DNO_FSCHG -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT \
425 -DWITHOUT_MAN -DWITHOUT_NLS -DWITHOUT_PROFILE libraries
428 @echo "--------------------------------------------------------------"
429 @echo ">>> stage 4.3: make dependencies"
430 @echo "--------------------------------------------------------------"
431 ${_+_}cd ${.CURDIR}; ${WMAKE} par-depend
434 @echo "--------------------------------------------------------------"
435 @echo ">>> stage 4.4: building everything"
436 @echo "--------------------------------------------------------------"
437 ${_+_}cd ${.CURDIR}; ${WMAKE} par-all
438 .if ${TARGET_ARCH} == "amd64"
441 @echo "--------------------------------------------------------------"
442 @echo ">>> stage 5.1: building 32 bit shim libraries"
443 @echo "--------------------------------------------------------------"
445 usr/include usr/lib32 usr/share/misc
446 mkdir -p ${LIB32TMP}/${_dir}
448 mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \
449 -p ${LIB32TMP}/usr/include >/dev/null
451 ln -sf ${.CURDIR}/sys ${WORLDTMP}
452 .if ${MK_KERBEROS} != "no"
453 .for _t in obj depend all
454 cd ${.CURDIR}/kerberos5/tools; \
455 MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} DESTDIR= ${_t}
458 .for _t in obj includes
459 cd ${.CURDIR}/include; ${LIB32WMAKE} ${_t}
460 cd ${.CURDIR}/lib; ${LIB32WMAKE} ${_t}
461 .if ${MK_CDDL} != "no"
462 cd ${.CURDIR}/cddl/lib; ${LIB32WMAKE} ${_t}
464 cd ${.CURDIR}/gnu/lib; ${LIB32WMAKE} ${_t}
465 .if ${MK_CRYPT} != "no"
466 cd ${.CURDIR}/secure/lib; ${LIB32WMAKE} ${_t}
468 .if ${MK_KERBEROS} != "no"
469 cd ${.CURDIR}/kerberos5/lib; ${LIB32WMAKE} ${_t}
472 .for _dir in usr.bin/lex/lib
473 cd ${.CURDIR}/${_dir}; ${LIB32WMAKE} obj
475 .for _dir in lib/ncurses/ncurses lib/ncurses/ncursesw lib/libmagic
476 cd ${.CURDIR}/${_dir}; \
477 MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} DESTDIR= build-tools
480 ${LIB32WMAKE} -f Makefile.inc1 libraries
481 .for _t in obj depend all
482 cd ${.CURDIR}/libexec/rtld-elf; \
483 PROG=ld-elf32.so.1 ${LIB32WMAKE} ${_t}
486 distribute32 install32:
487 .if make(distribute32)
488 mkdir -p ${DISTDIR}/${DISTRIBUTION}/usr/lib32 # XXX add to mtree
489 mkdir -p ${DISTDIR}/${DISTRIBUTION}/usr/lib32/dtrace # XXX add to mtree
491 mkdir -p ${DESTDIR}/usr/lib32 # XXX add to mtree
492 mkdir -p ${DESTDIR}/usr/lib32/dtrace # XXX add to mtree
494 cd ${.CURDIR}/lib; ${LIB32IMAKE} ${.TARGET:S/32$//}
495 .if ${MK_CDDL} != "no"
496 cd ${.CURDIR}/cddl/lib; ${LIB32IMAKE} ${.TARGET:S/32$//}
498 cd ${.CURDIR}/gnu/lib; ${LIB32IMAKE} ${.TARGET:S/32$//}
499 .if ${MK_CRYPT} != "no"
500 cd ${.CURDIR}/secure/lib; ${LIB32IMAKE} ${.TARGET:S/32$//}
502 cd ${.CURDIR}/libexec/rtld-elf; PROG=ld-elf32.so.1 ${LIB32IMAKE} ${.TARGET:S/32$//}
507 .if !defined(SUBDIR_OVERRIDE)
508 WMAKE_TGTS+= _worldtmp _legacy _bootstrap-tools
510 WMAKE_TGTS+= _cleanobj _obj _build-tools
511 .if !defined(SUBDIR_OVERRIDE)
512 WMAKE_TGTS+= _cross-tools
514 WMAKE_TGTS+= _includes _libraries _depend everything
515 .if ${TARGET_ARCH} == "amd64" && ${MK_LIB32} != "no"
519 buildworld: buildworld_prologue ${WMAKE_TGTS} buildworld_epilogue
520 .ORDER: buildworld_prologue ${WMAKE_TGTS} buildworld_epilogue
523 @echo "--------------------------------------------------------------"
524 @echo ">>> World build started on `LC_ALL=C date`"
525 @echo "--------------------------------------------------------------"
529 @echo "--------------------------------------------------------------"
530 @echo ">>> World build completed on `LC_ALL=C date`"
531 @echo "--------------------------------------------------------------"
534 # We need to have this as a target because the indirection between Makefile
535 # and Makefile.inc1 causes the correct PATH to be used, rather than a
536 # modification of the current environment's PATH. In addition, we need
537 # to quote multiword values.
543 @echo Entering world for ${TARGET_ARCH}:${TARGET}
544 @cd ${.CURDIR} && env ${WMAKEENV} sh || true
546 TOOLCHAIN_TGTS= ${WMAKE_TGTS:N_depend:Neverything:Nbuild32}
547 toolchain: ${TOOLCHAIN_TGTS}
548 kernel-toolchain: ${TOOLCHAIN_TGTS:N_includes:N_libraries}
553 # Checks to be sure system is ready for installworld/installkernel.
558 # Require DESTDIR to be set if installing for a different architecture.
560 .if ${TARGET_ARCH} != ${MACHINE_ARCH} || ${TARGET} != ${MACHINE}
561 .if !make(distributeworld)
562 installcheck: installcheck_DESTDIR
563 installcheck_DESTDIR:
564 .if !defined(DESTDIR) || empty(DESTDIR)
565 @echo "ERROR: Please set DESTDIR!"; \
572 # Check for missing UIDs/GIDs.
576 .if ${MK_SENDMAIL} != "no"
582 CHECK_GIDS+= proxy authpf
584 installcheck: installcheck_UGID
586 .for uid in ${CHECK_UIDS}
587 @if ! `id -u ${uid} >/dev/null 2>&1`; then \
588 echo "ERROR: Required ${uid} user is missing, see /usr/src/UPDATING."; \
592 .for gid in ${CHECK_GIDS}
593 @if ! `find / -prune -group ${gid} >/dev/null 2>&1`; then \
594 echo "ERROR: Required ${gid} group is missing, see /usr/src/UPDATING."; \
600 # Required install tools to be saved in a scratch dir for safety.
602 ITOOLS= [ awk cap_mkdb cat chflags chmod chown \
603 date echo egrep find grep install-info \
604 ln lockf make mkdir mtree mv pwd_mkdb rm sed sh sysctl \
605 test true uname wc zic
610 # Distributes everything compiled by a `buildworld'.
614 # Installs everything compiled by a 'buildworld'.
616 distributeworld installworld: installcheck
617 mkdir -p ${INSTALLTMP}
618 progs=$$(for prog in ${ITOOLS}; do \
619 if progpath=`which $$prog`; then \
622 echo "Required tool $$prog not found in PATH." >&2; \
626 libs=$$(ldd -f "%o %p\n" -f "%o %p\n" $$progs 2>/dev/null | sort -u | \
627 while read line; do \
629 if [ "$$2 $$3" != "not found" ]; then \
632 echo "Required library $$1 not found." >&2; \
636 cp $$libs $$progs ${INSTALLTMP}
637 cp -R $${PATH_LOCALE:-"/usr/share/locale"} ${INSTALLTMP}/locale
638 ${_+_}cd ${.CURDIR}; ${IMAKE} re${.TARGET:S/world$//}; \
639 ${IMAKEENV} rm -rf ${INSTALLTMP}
644 # If you have a build server, you can NFS mount the source and obj directories
645 # and do a 'make reinstall' on the *client* to install new binaries from the
646 # most recent server build.
649 @echo "--------------------------------------------------------------"
650 @echo ">>> Making hierarchy"
651 @echo "--------------------------------------------------------------"
652 ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 hierarchy
654 @echo "--------------------------------------------------------------"
655 @echo ">>> Installing everything"
656 @echo "--------------------------------------------------------------"
657 ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install
658 .if ${TARGET_ARCH} == "amd64" && ${MK_LIB32} != "no"
659 ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install32
663 @echo "--------------------------------------------------------------"
664 @echo ">>> Distributing everything"
665 @echo "--------------------------------------------------------------"
666 ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 distribute
667 .if ${TARGET_ARCH} == "amd64" && ${MK_LIB32} != "no"
668 ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 distribute32 DISTRIBUTION=lib32
671 distrib-dirs distribution:
672 cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} ${.TARGET}
675 # buildkernel and installkernel
677 # Which kernels to build and/or install is specified by setting
678 # KERNCONF. If not defined a GENERIC kernel is built/installed.
679 # Only the existing (depending TARGET) config files are used
680 # for building kernels and only the first of these is designated
681 # as the one being installed.
683 # Note that we have to use TARGET instead of TARGET_ARCH when
684 # we're in kernel-land. Since only TARGET_ARCH is (expected) to
685 # be set to cross-build, we have to make sure TARGET is set
688 .if !defined(KERNCONF) && defined(KERNEL)
694 INSTKERNNAME?= kernel
696 KERNSRCDIR?= ${.CURDIR}/sys
697 KRNLCONFDIR= ${KERNSRCDIR}/${TARGET}/conf
698 KRNLOBJDIR= ${OBJTREE}${KERNSRCDIR}
699 KERNCONFDIR?= ${KRNLCONFDIR}
703 .for _kernel in ${KERNCONF}
704 .if exists(${KERNCONFDIR}/${_kernel})
705 BUILDKERNELS+= ${_kernel}
706 .if empty(INSTALLKERNEL)
707 INSTALLKERNEL= ${_kernel}
715 # Builds all kernels defined by BUILDKERNELS.
718 .if empty(BUILDKERNELS)
719 @echo "ERROR: Missing kernel configuration file(s) (${KERNCONF})."; \
722 .if defined(KERNWARN)
723 @echo "--------------------------------------------------------------"
724 @echo ">>> WARNING: KERNEL= setting should be changed to KERNCONF="
725 @echo "--------------------------------------------------------------"
729 .for _kernel in ${BUILDKERNELS}
730 @echo "--------------------------------------------------------------"
731 @echo ">>> Kernel build for ${_kernel} started on `LC_ALL=C date`"
732 @echo "--------------------------------------------------------------"
733 @echo "===> ${_kernel}"
734 mkdir -p ${KRNLOBJDIR}
735 .if !defined(NO_KERNELCONFIG)
737 @echo "--------------------------------------------------------------"
738 @echo ">>> stage 1: configuring the kernel"
739 @echo "--------------------------------------------------------------"
742 config ${CONFIGARGS} -d ${KRNLOBJDIR}/${_kernel} \
743 ${KERNCONFDIR}/${_kernel}
745 .if !defined(NO_CLEAN) && !defined(NO_KERNELCLEAN)
747 @echo "--------------------------------------------------------------"
748 @echo ">>> stage 2.1: cleaning up the object tree"
749 @echo "--------------------------------------------------------------"
750 cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} ${CLEANDIR}
753 @echo "--------------------------------------------------------------"
754 @echo ">>> stage 2.2: rebuilding the object tree"
755 @echo "--------------------------------------------------------------"
756 cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} obj
758 @echo "--------------------------------------------------------------"
759 @echo ">>> stage 2.3: build tools"
760 @echo "--------------------------------------------------------------"
761 cd ${KRNLOBJDIR}/${_kernel}; \
762 MAKESRCPATH=${KERNSRCDIR}/dev/aic7xxx/aicasm \
763 ${MAKE} -DNO_CPU_CFLAGS -DNO_CTF \
764 -f ${KERNSRCDIR}/dev/aic7xxx/aicasm/Makefile
765 # XXX - Gratuitously builds aicasm in the ``makeoptions NO_MODULES'' case.
766 .if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists(${KERNSRCDIR}/modules)
767 .for target in obj depend all
768 cd ${KERNSRCDIR}/modules/aic7xxx/aicasm; \
769 MAKEOBJDIRPREFIX=${KRNLOBJDIR}/${_kernel}/modules \
770 ${MAKE} -DNO_CPU_CFLAGS -DNO_CTF ${target}
773 .if !defined(NO_KERNELDEPEND)
775 @echo "--------------------------------------------------------------"
776 @echo ">>> stage 3.1: making dependencies"
777 @echo "--------------------------------------------------------------"
778 cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} depend -DNO_MODULES_OBJ
781 @echo "--------------------------------------------------------------"
782 @echo ">>> stage 3.2: building everything"
783 @echo "--------------------------------------------------------------"
784 cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} all -DNO_MODULES_OBJ
785 @echo "--------------------------------------------------------------"
786 @echo ">>> Kernel build for ${_kernel} completed on `LC_ALL=C date`"
787 @echo "--------------------------------------------------------------"
791 # installkernel, etc.
793 # Install the kernel defined by INSTALLKERNEL
795 installkernel installkernel.debug \
796 reinstallkernel reinstallkernel.debug: installcheck
797 .if empty(INSTALLKERNEL)
798 @echo "ERROR: No kernel \"${KERNCONF}\" to install."; \
801 @echo "--------------------------------------------------------------"
802 @echo ">>> Installing kernel"
803 @echo "--------------------------------------------------------------"
804 cd ${KRNLOBJDIR}/${INSTALLKERNEL}; \
805 ${CROSSENV} PATH=${TMPPATH} \
806 ${MAKE} KERNEL=${INSTKERNNAME} ${.TARGET:S/kernel//}
811 # Build the API documentation with doxygen
814 @if [ ! -x `/usr/bin/which doxygen` ]; then \
815 echo "You need doxygen (devel/doxygen) to generate the API documentation of the kernel." | /usr/bin/fmt; \
818 cd ${.CURDIR}/tools/kerneldoc/subsys && ${MAKE} obj all
823 # Update the source tree, by running cvsup and/or running cvs to update to the
827 .if defined(SUP_UPDATE)
828 @echo "--------------------------------------------------------------"
829 @echo ">>> Running ${SUP}"
830 @echo "--------------------------------------------------------------"
832 @${SUP} ${SUPFLAGS} ${SUPFILE}
834 .if defined(SUPFILE1)
835 @${SUP} ${SUPFLAGS} ${SUPFILE1}
837 .if defined(SUPFILE2)
838 @${SUP} ${SUPFLAGS} ${SUPFILE2}
840 .if defined(PORTSSUPFILE) && !defined(NO_PORTSUPDATE)
841 @${SUP} ${SUPFLAGS} ${PORTSSUPFILE}
843 .if defined(DOCSUPFILE) && !defined(NO_DOCUPDATE)
844 @${SUP} ${SUPFLAGS} ${DOCSUPFILE}
847 .if defined(CVS_UPDATE)
848 @echo "--------------------------------------------------------------"
849 @echo ">>> Updating ${.CURDIR} from CVS repository" ${CVSROOT}
850 @echo "--------------------------------------------------------------"
851 cd ${.CURDIR}; ${CVS} -R -q update ${CVSFLAGS}
855 # ------------------------------------------------------------------------
857 # From here onwards are utility targets used by the 'make world' and
858 # related targets. If your 'world' breaks, you may like to try to fix
859 # the problem and manually run the following targets to attempt to
860 # complete the build. Beware, this is *not* guaranteed to work, you
861 # need to have a pretty good grip on the current state of the system
862 # to attempt to manually finish it. If in doubt, 'make world' again.
866 # legacy: Build compatibility shims for the next three targets
869 .if ${BOOTSTRAPPING} < 600034 && ${BOOTSTRAPPING} != 0
870 @echo "ERROR: Source upgrades from versions prior to 6.0 not supported."; \
873 .for _tool in tools/build
874 ${_+_}@${ECHODIR} "===> ${_tool} (obj,includes,depend,all,install)"; \
875 cd ${.CURDIR}/${_tool}; \
876 ${MAKE} DIRPRFX=${_tool}/ obj; \
877 ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy includes; \
878 ${MAKE} DIRPRFX=${_tool}/ depend; \
879 ${MAKE} DIRPRFX=${_tool}/ all; \
880 ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy install
884 # bootstrap-tools: Build tools needed for compatibility
886 .if ${MK_GAMES} != "no"
887 _strfile= games/fortune/strfile
890 .if ${MK_CXX} != "no"
891 _gperf= gnu/usr.bin/gperf
892 .if ${BOOTSTRAPPING} < 700004
893 _groff= gnu/usr.bin/groff
895 _groff= gnu/usr.bin/groff/tmac
899 .if ${BOOTSTRAPPING} >= 700044 && ${BOOTSTRAPPING} < 800022
903 .if ${BOOTSTRAPPING} < 800013
904 _mklocale= usr.bin/mklocale
907 .if ${BOOTSTRAPPING} < 700018
908 _gensnmptree= usr.sbin/bsnmpd/gensnmptree
911 .if ${MK_RESCUE} != "no" && \
912 ${BOOTSTRAPPING} < 700026
913 _crunchgen= usr.sbin/crunch/crunchgen
916 .if ${MK_CDDL} != "no"
917 _dtrace_tools= cddl/usr.bin/sgsmsg cddl/lib/libctf lib/libelf \
918 lib/libdwarf cddl/usr.bin/ctfconvert cddl/usr.bin/ctfmerge
936 ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \
937 cd ${.CURDIR}/${_tool}; \
938 ${MAKE} DIRPRFX=${_tool}/ obj; \
939 ${MAKE} DIRPRFX=${_tool}/ depend; \
940 ${MAKE} DIRPRFX=${_tool}/ all; \
941 ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy install
945 # build-tools: Build special purpose build tools
947 .if defined(MODULES_WITH_WORLD) && exists(${KERNSRCDIR}/modules)
948 _aicasm= sys/modules/aic7xxx/aicasm
951 .if !defined(NO_SHARE)
952 _share= share/syscons/scrnmaps
955 .if ${MK_KERBEROS} != "no"
956 _kerberos5_tools= kerberos5/tools
959 .if ${MK_RESCUE} != "no"
960 _rescue= rescue/rescue
968 lib/ncurses/ncurses \
969 lib/ncurses/ncursesw \
975 ${_+_}@${ECHODIR} "===> ${_tool} (obj,build-tools)"; \
976 cd ${.CURDIR}/${_tool}; \
977 ${MAKE} DIRPRFX=${_tool}/ obj; \
978 ${MAKE} DIRPRFX=${_tool}/ build-tools
981 gnu/usr.bin/cc/cc_tools \
983 ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all)"; \
984 cd ${.CURDIR}/${_tool}; \
985 ${MAKE} DIRPRFX=${_tool}/ obj; \
986 ${MAKE} DIRPRFX=${_tool}/ depend; \
987 ${MAKE} DIRPRFX=${_tool}/ all
991 # cross-tools: Build cross-building tools
993 .if ${TARGET_ARCH} != ${MACHINE_ARCH} || ${BOOTSTRAPPING} < 800035
994 .if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386"
995 _btxld= usr.sbin/btxld
998 .if ${TARGET_ARCH} != ${MACHINE_ARCH}
999 .if ${MK_RESCUE} != "no" || defined(RELEASEDIR)
1000 _crunchide= usr.sbin/crunch/crunchide
1002 .if ${TARGET_ARCH} == "i386" && defined(RELEASEDIR)
1003 _kgzip= usr.sbin/kgzip
1009 gnu/usr.bin/binutils \
1012 usr.bin/xlint/lint1 usr.bin/xlint/lint2 usr.bin/xlint/xlint \
1016 ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \
1017 cd ${.CURDIR}/${_tool}; \
1018 ${MAKE} DIRPRFX=${_tool}/ obj; \
1019 ${MAKE} DIRPRFX=${_tool}/ depend; \
1020 ${MAKE} DIRPRFX=${_tool}/ all; \
1021 ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX} install
1025 # hierarchy - ensure that all the needed directories are present
1028 cd ${.CURDIR}/etc; ${MAKE} distrib-dirs
1031 # libraries - build all libraries, and install them under ${DESTDIR}.
1033 # The list of libraries with dependents (${_prebuild_libs}) and their
1034 # interdependencies (__L) are built automatically by the
1035 # ${.CURDIR}/tools/make_libdeps.sh script.
1039 ${MAKE} -f Makefile.inc1 _prereq_libs; \
1040 ${MAKE} -f Makefile.inc1 _startup_libs; \
1041 ${MAKE} -f Makefile.inc1 _prebuild_libs; \
1042 ${MAKE} -f Makefile.inc1 _generic_libs;
1045 # static libgcc.a prerequisite for shared libc
1047 _prereq_libs= gnu/lib/libgcc
1049 # These dependencies are not automatically generated:
1051 # gnu/lib/csu, gnu/lib/libgcc, lib/csu and lib/libc must be built before
1052 # all shared libraries for ELF.
1054 _startup_libs= gnu/lib/csu
1055 .if exists(${.CURDIR}/lib/csu/${MACHINE_ARCH}-elf)
1056 _startup_libs+= lib/csu/${MACHINE_ARCH}-elf
1058 _startup_libs+= lib/csu/${MACHINE_ARCH}
1060 _startup_libs+= gnu/lib/libgcc
1061 _startup_libs+= lib/libc
1063 gnu/lib/libgcc__L: lib/libc__L
1065 _prebuild_libs= ${_kerberos5_lib_libasn1} ${_kerberos5_lib_libkrb5} \
1066 ${_kerberos5_lib_libhx509} ${_kerberos5_lib_libroken} \
1067 ${_kerberos5_lib_libheimntlm} ${_kerberos5_lib_libgssapi_krb5} \
1068 lib/libbz2 lib/libcom_err lib/libcrypt lib/libelf \
1070 ${_lib_cddl} ${_lib_libgssapi} ${_lib_libipx} \
1071 lib/libkiconv lib/libkvm lib/libmd \
1072 lib/ncurses/ncurses lib/ncurses/ncursesw \
1073 lib/libopie lib/libpam ${_lib_libthr} \
1074 lib/libradius lib/libsbuf lib/libtacplus lib/libutil \
1075 ${_lib_libypclnt} lib/libz lib/msun \
1076 ${_secure_lib_libcrypto} ${_secure_lib_libssh} \
1077 ${_secure_lib_libssl} lib/libdwarf lib/libproc
1079 .if ${MK_LIBTHR} != "no"
1080 _lib_libthr= lib/libthr
1083 _generic_libs= ${_cddl_lib} gnu/lib ${_kerberos5_lib} lib ${_secure_lib} usr.bin/lex/lib
1085 lib/libopie__L lib/libtacplus__L: lib/libmd__L
1087 .if ${MK_CDDL} != "no"
1091 .if ${MK_CRYPT} != "no"
1092 .if ${MK_OPENSSL} != "no"
1093 _secure_lib_libcrypto= secure/lib/libcrypto
1094 _secure_lib_libssl= secure/lib/libssl
1095 lib/libradius__L secure/lib/libssl__L: secure/lib/libcrypto__L
1096 .if ${MK_OPENSSH} != "no"
1097 _secure_lib_libssh= secure/lib/libssh
1098 secure/lib/libssh__L: lib/libz__L secure/lib/libcrypto__L lib/libcrypt__L
1099 .if ${MK_KERBEROS} != "no"
1100 kerberos5/lib/libgssapi_krb5__L: kerberos5/lib/libkrb5__L \
1101 kerberos5/lib/libhx509__L kerberos5/lib/libasn1__L lib/libcom_err__L \
1102 lib/libmd__L kerberos5/lib/libroken__L secure/lib/libcrypto__L \
1104 secure/lib/libssh__L: lib/libgssapi__L kerberos5/lib/libgssapi_krb5__L
1108 _secure_lib= secure/lib
1111 .if ${MK_IPX} != "no"
1112 _lib_libipx= lib/libipx
1115 .if ${MK_KERBEROS} != "no"
1116 _kerberos5_lib= kerberos5/lib
1117 _kerberos5_lib_libasn1= kerberos5/lib/libasn1
1118 _kerberos5_lib_libkrb5= kerberos5/lib/libkrb5
1119 _kerberos5_lib_libhx509= kerberos5/lib/libhx509
1120 _kerberos5_lib_libroken= kerberos5/lib/libroken
1121 _kerberos5_lib_libheimntlm= kerberos5/lib/libheimntlm
1122 _kerberos5_lib_libgssapi_krb5= kerberos5/lib/libgssapi_krb5
1123 _lib_libgssapi= lib/libgssapi
1126 .if ${MK_NIS} != "no"
1127 _lib_libypclnt= lib/libypclnt
1130 .if ${MK_OPENSSL} == "no"
1131 lib/libradius__L: lib/libmd__L
1134 .for _lib in ${_prereq_libs}
1136 .if exists(${.CURDIR}/${_lib})
1137 ${_+_}@${ECHODIR} "===> ${_lib} (obj,depend,all,install)"; \
1138 cd ${.CURDIR}/${_lib}; \
1139 ${MAKE} DIRPRFX=${_lib}/ obj; \
1140 ${MAKE} DIRPRFX=${_lib}/ depend; \
1141 ${MAKE} -DWITHOUT_PROFILE -DNO_PIC DIRPRFX=${_lib}/ all; \
1142 ${MAKE} -DWITHOUT_PROFILE -DNO_PIC DIRPRFX=${_lib}/ install
1146 .for _lib in ${_startup_libs} ${_prebuild_libs:Nlib/libpam} ${_generic_libs}
1148 .if exists(${.CURDIR}/${_lib})
1149 ${_+_}@${ECHODIR} "===> ${_lib} (obj,depend,all,install)"; \
1150 cd ${.CURDIR}/${_lib}; \
1151 ${MAKE} DIRPRFX=${_lib}/ obj; \
1152 ${MAKE} DIRPRFX=${_lib}/ depend; \
1153 ${MAKE} DIRPRFX=${_lib}/ all; \
1154 ${MAKE} DIRPRFX=${_lib}/ install
1158 # libpam is special: we need to build static PAM modules before
1159 # static PAM library, and dynamic PAM library before dynamic PAM
1161 lib/libpam__L: .PHONY
1162 ${_+_}@${ECHODIR} "===> lib/libpam (obj,depend,all,install)"; \
1163 cd ${.CURDIR}/lib/libpam; \
1164 ${MAKE} DIRPRFX=lib/libpam/ obj; \
1165 ${MAKE} DIRPRFX=lib/libpam/ depend; \
1166 ${MAKE} DIRPRFX=lib/libpam/ -D_NO_LIBPAM_SO_YET all; \
1167 ${MAKE} DIRPRFX=lib/libpam/ -D_NO_LIBPAM_SO_YET install
1169 _prereq_libs: ${_prereq_libs:S/$/__PL/}
1170 _startup_libs: ${_startup_libs:S/$/__L/}
1171 _prebuild_libs: ${_prebuild_libs:S/$/__L/}
1172 _generic_libs: ${_generic_libs:S/$/__L/}
1174 .for __target in all clean cleandepend cleandir depend includes obj
1175 .for entry in ${SUBDIR}
1176 ${entry}.${__target}__D: .PHONY
1177 ${_+_}@if test -d ${.CURDIR}/${entry}.${MACHINE_ARCH}; then \
1178 ${ECHODIR} "===> ${DIRPRFX}${entry}.${MACHINE_ARCH} (${__target})"; \
1179 edir=${entry}.${MACHINE_ARCH}; \
1180 cd ${.CURDIR}/$${edir}; \
1182 ${ECHODIR} "===> ${DIRPRFX}${entry} (${__target})"; \
1184 cd ${.CURDIR}/$${edir}; \
1186 ${MAKE} ${__target} DIRPRFX=${DIRPRFX}$${edir}/
1188 par-${__target}: ${SUBDIR:S/$/.${__target}__D/}
1191 .include <bsd.subdir.mk>
1193 .if make(check-old) || make(check-old-dirs) || \
1194 make(check-old-files) || make(check-old-libs) || \
1195 make(delete-old) || make(delete-old-dirs) || \
1196 make(delete-old-files) || make(delete-old-libs)
1199 # check for / delete old files section
1202 .include "ObsoleteFiles.inc"
1204 OLD_LIBS_MESSAGE="Please be sure no application still uses those libraries, \
1205 else you can not start such an application. Consult UPDATING for more \
1206 information regarding how to cope with the removal/revision bump of a \
1209 .if !defined(BATCH_DELETE_OLD_FILES)
1216 @echo ">>> Removing old files (only deletes safe to delete libs)"
1217 # Ask for every old file if the user really wants to remove it.
1218 # It's annoying, but better safe than sorry.
1219 @for file in ${OLD_FILES}; do \
1220 if [ -f "${DESTDIR}/$${file}" -o -L "${DESTDIR}/$${file}" ]; then \
1221 chflags noschg "${DESTDIR}/$${file}" 2>/dev/null || true; \
1222 rm ${RM_I} "${DESTDIR}/$${file}"; \
1225 # Remove catpages without corresponding manpages.
1227 find ${DESTDIR}/usr/share/man/cat* ! -type d | \
1228 sed -ep -e's:${DESTDIR}/usr/share/man/cat:${DESTDIR}/usr/share/man/man:' | \
1229 while read catpage; do \
1231 if [ ! -e "$${manpage}" ]; then \
1232 rm ${RM_I} $${catpage} <&3 ; \
1235 @echo ">>> Old files removed"
1238 @echo ">>> Checking for old files"
1239 @for file in ${OLD_FILES}; do \
1240 if [ -f "${DESTDIR}/$${file}" -o -L "${DESTDIR}/$${file}" ]; then \
1241 echo "${DESTDIR}/$${file}"; \
1244 # Check for catpages without corresponding manpages.
1245 @find ${DESTDIR}/usr/share/man/cat* ! -type d | \
1246 sed -ep -e's:${DESTDIR}/usr/share/man/cat:${DESTDIR}/usr/share/man/man:' | \
1247 while read catpage; do \
1249 if [ ! -e "$${manpage}" ]; then \
1250 echo $${catpage} ; \
1255 @echo ">>> Removing old libraries"
1256 @echo "${OLD_LIBS_MESSAGE}" | fmt
1257 @for file in ${OLD_LIBS}; do \
1258 if [ -f "${DESTDIR}/$${file}" -o -L "${DESTDIR}/$${file}" ]; then \
1259 chflags noschg "${DESTDIR}/$${file}" 2>/dev/null || true; \
1260 rm ${RM_I} "${DESTDIR}/$${file}"; \
1263 @echo ">>> Old libraries removed"
1266 @echo ">>> Checking for old libraries"
1267 @for file in ${OLD_LIBS}; do \
1268 if [ -f "${DESTDIR}/$${file}" -o -L "${DESTDIR}/$${file}" ]; then \
1269 echo "${DESTDIR}/$${file}"; \
1274 @echo ">>> Removing old directories"
1275 @for dir in ${OLD_DIRS}; do \
1276 if [ -d "${DESTDIR}/$${dir}" ]; then \
1277 rmdir -v "${DESTDIR}/$${dir}" || true; \
1278 elif [ -L "${DESTDIR}/$${dir}" ]; then \
1279 echo "${DESTDIR}/$${dir} is a link, please remove everything manually."; \
1282 @echo ">>> Old directories removed"
1285 @echo ">>> Checking for old directories"
1286 @for dir in ${OLD_DIRS}; do \
1287 if [ -d "${DESTDIR}/$${dir}" ]; then \
1288 echo "${DESTDIR}/$${dir}"; \
1289 elif [ -L "${DESTDIR}/$${dir}" ]; then \
1290 echo "${DESTDIR}/$${dir} is a link, please remove everything manually."; \
1294 delete-old: delete-old-files delete-old-dirs
1295 @echo "To remove old libraries run '${MAKE} delete-old-libs'."
1297 check-old: check-old-files check-old-libs check-old-dirs
1298 @echo "To remove old files and directories run '${MAKE} delete-old'."
1299 @echo "To remove old libraries run '${MAKE} delete-old-libs'."
1304 # showconfig - show build configuration.
1307 @${MAKE} -n -f bsd.own.mk -V dummy -dg1 | grep ^MK_ | sort