4 # Make command line options:
5 # -DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir
6 # -DNO_CLEAN do not clean at all
7 # -DDB_FROM_SRC use the user/group databases in src/etc instead of
8 # the system database when installing.
9 # -DNO_SHARE do not go into share subdir
10 # -DKERNFAST define NO_KERNEL{CONFIG,CLEAN,DEPEND,OBJ}
11 # -DNO_KERNELCONFIG do not run config in ${MAKE} buildkernel
12 # -DNO_KERNELCLEAN do not run ${MAKE} clean in ${MAKE} buildkernel
13 # -DNO_KERNELDEPEND do not run ${MAKE} depend in ${MAKE} buildkernel
14 # -DNO_KERNELOBJ do not run ${MAKE} obj in ${MAKE} buildkernel
15 # -DNO_PORTSUPDATE do not update ports in ${MAKE} update
16 # -DNO_ROOT install without using root privilege
17 # -DNO_DOCUPDATE do not update doc in ${MAKE} update
18 # -DNO_CTF do not run the DTrace CTF conversion tools on built objects
19 # LOCAL_DIRS="list of dirs" to add additional dirs to the SUBDIR list
20 # LOCAL_LIB_DIRS="list of dirs" to add additional dirs to libraries target
21 # LOCAL_MTREE="list of mtree files" to process to allow local directories
22 # to be created before files are installed
23 # LOCAL_TOOL_DIRS="list of dirs" to add additional dirs to the build-tools
25 # METALOG="path to metadata log" to write permission and ownership
26 # when NO_ROOT is set. (default: ${DESTDIR}/METALOG)
27 # TARGET="machine" to crossbuild world for a different machine type
28 # TARGET_ARCH= may be required when a TARGET supports multiple endians
29 # BUILDENV_SHELL= shell to launch for the buildenv target (def:/bin/sh)
30 # WORLD_FLAGS= additional flags to pass to make(1) during buildworld
31 # KERNEL_FLAGS= additional flags to pass to make(1) during buildkernel
34 # The intended user-driven targets are:
35 # buildworld - rebuild *everything*, including glue to help do upgrades
36 # installworld- install everything built by "buildworld"
37 # doxygen - build API documentation of the kernel
38 # update - convenient way to update your source tree (eg: cvsup/cvs)
40 # Standard targets (not defined here) are documented in the makefiles in
41 # /usr/share/mk. These include:
42 # obj depend all install clean cleandepend cleanobj
44 # You are supposed to define both of these when calling Makefile.inc1
45 # directly. However, some old scripts don't. Cope for the moment, but
46 # issue a new warning for a transition period.
47 .if defined(TARGET) && !defined(TARGET_ARCH)
48 .warning "You must pass both TARGET and TARGET_ARCH to Makefile.inc1. Setting TARGET_ARCH=${TARGET}."
51 .if !defined(TARGET) || !defined(TARGET_ARCH)
52 .error "Both TARGET and TARGET_ARCH must be defined."
56 .include <bsd.arch.inc.mk>
57 .include <bsd.compiler.mk>
59 # We must do share/info early so that installation of info `dir'
60 # entries works correctly. Do it first since it is less likely to
61 # grow dependencies on include and lib than vice versa.
63 # We must do lib/ and libexec/ before bin/, because if installworld
64 # installs a new /bin/sh, the 'make' command will *immediately*
65 # use that new version. And the new (dynamically-linked) /bin/sh
66 # will expect to find appropriate libraries in /lib and /libexec.
68 SUBDIR= share/info lib libexec
70 .if ${MK_GAMES} != "no"
73 .if ${MK_CDDL} != "no"
77 .if ${MK_KERBEROS} != "no"
80 .if ${MK_RESCUE} != "no"
84 .if ${MK_CRYPT} != "no"
87 .if !defined(NO_SHARE)
90 SUBDIR+=sys usr.bin usr.sbin
91 .if ${MK_OFED} != "no"
95 # We must do etc/ last for install/distribute to work.
99 # These are last, since it is nice to at least get the base system
100 # rebuilt before you do them.
101 .for _DIR in ${LOCAL_LIB_DIRS} ${LOCAL_DIRS}
102 .if exists(${.CURDIR}/${_DIR}/Makefile)
107 .if defined(SUBDIR_OVERRIDE)
108 SUBDIR= ${SUBDIR_OVERRIDE}
114 .if defined(NO_CLEANDIR)
115 CLEANDIR= clean cleandepend
122 BUILDENV_SHELL?=/bin/sh
125 CVSFLAGS?= -A -P -d -I!
131 SUPFLAGS+= -h ${SUPHOST}
134 MAKEOBJDIRPREFIX?= /usr/obj
135 .if !defined(OSRELDATE)
136 .if exists(/usr/include/osreldate.h)
137 OSRELDATE!= awk '/^\#define[[:space:]]*__FreeBSD_version/ { print $$3 }' \
138 /usr/include/osreldate.h
144 .if !defined(VERSION)
146 VERSION+= ${OSRELDATE}
149 KNOWN_ARCHES?= amd64 arm armeb/arm armv6/arm armv6eb/arm i386 i386/pc98 ia64 mips mipsel/mips mips64el/mips mips64/mips mipsn32el/mips mipsn32/mips powerpc powerpc64/powerpc sparc64
150 .if ${TARGET} == ${TARGET_ARCH}
153 _t= ${TARGET_ARCH}/${TARGET}
156 .if empty(KNOWN_ARCHES:M${_t})
157 .error Unknown target ${TARGET_ARCH}:${TARGET}.
161 .if ${TARGET} == ${MACHINE}
162 TARGET_CPUTYPE?=${CPUTYPE}
167 .if !empty(TARGET_CPUTYPE)
168 _TARGET_CPUTYPE=${TARGET_CPUTYPE}
170 _TARGET_CPUTYPE=dummy
172 _CPUTYPE!= MAKEFLAGS= CPUTYPE=${_TARGET_CPUTYPE} ${MAKE} \
173 -f /dev/null -m ${.CURDIR}/share/mk -V CPUTYPE
174 .if ${_CPUTYPE} != ${_TARGET_CPUTYPE}
175 .error CPUTYPE global should be set with ?=.
178 BUILD_ARCH!= uname -p
179 .if ${MACHINE_ARCH} != ${BUILD_ARCH}
180 .error To cross-build, set TARGET_ARCH.
183 .if ${MACHINE} == ${TARGET} && ${MACHINE_ARCH} == ${TARGET_ARCH} && !defined(CROSS_BUILD_TESTING)
184 OBJTREE= ${MAKEOBJDIRPREFIX}
186 OBJTREE= ${MAKEOBJDIRPREFIX}/${TARGET}.${TARGET_ARCH}
188 WORLDTMP= ${OBJTREE}${.CURDIR}/tmp
189 # /usr/games added for fortune which depend on strfile
190 BPATH= ${WORLDTMP}/legacy/usr/sbin:${WORLDTMP}/legacy/usr/bin:${WORLDTMP}/legacy/usr/games:${WORLDTMP}/legacy/bin
191 XPATH= ${WORLDTMP}/usr/sbin:${WORLDTMP}/usr/bin:${WORLDTMP}/usr/games
192 STRICTTMPPATH= ${BPATH}:${XPATH}
193 TMPPATH= ${STRICTTMPPATH}:${PATH}
196 # Avoid running mktemp(1) unless actually needed.
197 # It may not be functional, e.g., due to new ABI
198 # when in the middle of installing over this system.
200 .if make(distributeworld) || make(installworld)
201 INSTALLTMP!= /usr/bin/mktemp -d -u -t install
205 # Building a world goes through the following stages
207 # 1. legacy stage [BMAKE]
208 # This stage is responsible for creating compatibility
209 # shims that are needed by the bootstrap-tools,
210 # build-tools and cross-tools stages.
211 # 1. bootstrap-tools stage [BMAKE]
212 # This stage is responsible for creating programs that
213 # are needed for backward compatibility reasons. They
214 # are not built as cross-tools.
215 # 2. build-tools stage [TMAKE]
216 # This stage is responsible for creating the object
217 # tree and building any tools that are needed during
219 # 3. cross-tools stage [XMAKE]
220 # This stage is responsible for creating any tools that
221 # are needed for cross-builds. A cross-compiler is one
223 # 4. world stage [WMAKE]
224 # This stage actually builds the world.
225 # 5. install stage (optional) [IMAKE]
226 # This stage installs a previously built world.
231 # Common environment for world related stages
232 CROSSENV= MAKEOBJDIRPREFIX=${OBJTREE} \
233 MACHINE_ARCH=${TARGET_ARCH} \
235 CPUTYPE=${TARGET_CPUTYPE}
236 .if ${MK_GROFF} != "no"
237 CROSSENV+= GROFF_BIN_PATH=${WORLDTMP}/legacy/usr/bin \
238 GROFF_FONT_PATH=${WORLDTMP}/legacy/usr/share/groff_font \
239 GROFF_TMAC_PATH=${WORLDTMP}/legacy/usr/share/tmac
242 # bootstrap-tools stage
243 BMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \
244 PATH=${BPATH}:${PATH} \
245 WORLDTMP=${WORLDTMP} \
246 VERSION="${VERSION}" \
247 MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}" \
248 COMPILER_TYPE=${COMPILER_TYPE}
249 BMAKE= MAKEOBJDIRPREFIX=${WORLDTMP} \
250 ${BMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 \
252 BOOTSTRAPPING=${OSRELDATE} \
254 -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT -DWITHOUT_MAN \
255 -DNO_PIC -DNO_PROFILE -DNO_SHARED \
256 -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF -DEARLY_BUILD
259 TMAKE= MAKEOBJDIRPREFIX=${OBJTREE} \
260 ${BMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 \
261 TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
263 BOOTSTRAPPING=${OSRELDATE} \
266 -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF -DEARLY_BUILD
269 XMAKE= TOOLS_PREFIX=${WORLDTMP} ${BMAKE} \
270 TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
274 WMAKEENV= ${CROSSENV} \
275 _SHLIBDIRPREFIX=${WORLDTMP} \
277 VERSION="${VERSION}" \
278 INSTALL="sh ${.CURDIR}/tools/install.sh" \
280 .if ${MK_CDDL} == "no"
283 .if ${CC:T:Mgcc} == "gcc"
284 WMAKE_COMPILER_TYPE= gcc
285 .elif ${CC:T:Mclang} == "clang"
286 WMAKE_COMPILER_TYPE= clang
287 .elif ${MK_CLANG_IS_CC} == "no"
288 WMAKE_COMPILER_TYPE= gcc
290 WMAKE_COMPILER_TYPE= clang
292 WMAKEENV+= COMPILER_TYPE=${WMAKE_COMPILER_TYPE}
293 WMAKE= ${WMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 DESTDIR=${WORLDTMP}
295 .if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64"
297 LIB32TMP= ${OBJTREE}${.CURDIR}/lib32
299 .if ${TARGET_ARCH} == "amd64"
300 .if empty(TARGET_CPUTYPE)
301 LIB32CPUFLAGS= -march=i686 -mmmx -msse -msse2
303 LIB32CPUFLAGS= -march=${TARGET_CPUTYPE}
305 LIB32WMAKEENV= MACHINE=i386 MACHINE_ARCH=i386 \
306 MACHINE_CPU="i686 mmx sse sse2"
309 LD="${LD} -m elf_i386_fbsd -Y P,${LIB32TMP}/usr/lib32"
311 .elif ${TARGET_ARCH} == "powerpc64"
312 .if empty(TARGET_CPUTYPE)
313 LIB32CPUFLAGS= -mcpu=powerpc
315 LIB32CPUFLAGS= -mcpu=${TARGET_CPUTYPE}
317 LIB32WMAKEENV= MACHINE=powerpc MACHINE_ARCH=powerpc
319 LD="${LD} -m elf32ppc_fbsd"
323 LIB32FLAGS= -m32 ${LIB32CPUFLAGS} -DCOMPAT_32BIT \
324 -isystem ${LIB32TMP}/usr/include/ \
325 -L${LIB32TMP}/usr/lib32 \
326 -B${LIB32TMP}/usr/lib32
328 # Yes, the flags are redundant.
329 LIB32WMAKEENV+= MAKEOBJDIRPREFIX=${OBJTREE}/lib32 \
330 _SHLIBDIRPREFIX=${LIB32TMP} \
331 _LDSCRIPTROOT=${LIB32TMP} \
332 VERSION="${VERSION}" \
333 INSTALL="sh ${.CURDIR}/tools/install.sh" \
336 SHLIBDIR=/usr/lib32 \
337 COMPILER_TYPE=${WMAKE_COMPILER_TYPE}
339 CC="${CC} ${LIB32FLAGS}" \
340 CXX="${CXX} ${LIB32FLAGS}" \
341 DESTDIR=${LIB32TMP} \
348 LIB32WMAKE= ${LIB32WMAKEENV} ${MAKE} ${LIB32WMAKEFLAGS} \
349 -DWITHOUT_BIND -DWITHOUT_MAN -DWITHOUT_INFO -DWITHOUT_HTML
350 LIB32IMAKE= ${LIB32WMAKE:NINSTALL=*:NDESTDIR=*:N_LDSCRIPTROOT=*} -DNO_INCS \
354 IMAKEENV= ${CROSSENV:N_LDSCRIPTROOT=*}
355 IMAKE= ${IMAKEENV} ${MAKE} -f Makefile.inc1 \
356 ${IMAKE_INSTALL} ${IMAKE_MTREE}
357 .if empty(.MAKEFLAGS:M-n)
358 IMAKEENV+= PATH=${STRICTTMPPATH}:${INSTALLTMP} \
359 LD_LIBRARY_PATH=${INSTALLTMP} \
360 PATH_LOCALE=${INSTALLTMP}/locale
361 IMAKE+= __MAKE_SHELL=${INSTALLTMP}/sh
363 IMAKEENV+= PATH=${TMPPATH}:${INSTALLTMP}
365 .if defined(DB_FROM_SRC)
366 INSTALLFLAGS+= -N ${.CURDIR}/etc
367 MTREEFLAGS+= -N ${.CURDIR}/etc
370 METALOG?= ${DESTDIR}/${DISTDIR}/METALOG
371 IMAKE+= -DNO_ROOT METALOG=${METALOG}
372 INSTALL_DDIR= ${DESTDIR}/${DISTDIR}
373 INSTALLFLAGS+= -U -M ${METALOG} -D ${INSTALL_DDIR:S://:/:g:C:/$::}
376 .if defined(DB_FROM_SRC) || defined(NO_ROOT)
377 IMAKE_INSTALL= INSTALL="install ${INSTALLFLAGS}"
378 IMAKE_MTREE= MTREE_CMD="nmtree ${MTREEFLAGS}"
382 KMAKEENV= ${WMAKEENV}
383 KMAKE= ${KMAKEENV} ${MAKE} ${KERNEL_FLAGS} KERNEL=${INSTKERNNAME}
388 # Attempt to rebuild the entire system, with reasonable chance of
389 # success, regardless of how old your existing system is.
392 .if ${.CURDIR:C/[^,]//g} != ""
393 # The m4 build of sendmail files doesn't like it if ',' is used
394 # anywhere in the path of it's files.
396 @echo "*** Error: path to source tree contains a comma ','"
401 @echo "--------------------------------------------------------------"
402 @echo ">>> Rebuilding the temporary build tree"
403 @echo "--------------------------------------------------------------"
404 .if !defined(NO_CLEAN)
406 .if defined(LIB32TMP)
410 rm -rf ${WORLDTMP}/legacy/usr/include
411 # XXX - These three can depend on any header file.
412 rm -f ${OBJTREE}${.CURDIR}/usr.bin/kdump/ioctl.c
413 rm -f ${OBJTREE}${.CURDIR}/usr.bin/kdump/kdump_subr.c
414 rm -f ${OBJTREE}${.CURDIR}/usr.bin/truss/ioctl.c
417 lib usr legacy/bin legacy/usr
418 mkdir -p ${WORLDTMP}/${_dir}
420 mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \
421 -p ${WORLDTMP}/legacy/usr >/dev/null
422 .if ${MK_GROFF} != "no"
423 mtree -deU -f ${.CURDIR}/etc/mtree/BSD.groff.dist \
424 -p ${WORLDTMP}/legacy/usr >/dev/null
426 mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \
427 -p ${WORLDTMP}/usr >/dev/null
428 mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \
429 -p ${WORLDTMP}/usr/include >/dev/null
430 ln -sf ${.CURDIR}/sys ${WORLDTMP}
431 .if ${MK_BIND_LIBS} != "no"
432 mtree -deU -f ${.CURDIR}/etc/mtree/BIND.include.dist \
433 -p ${WORLDTMP}/usr/include >/dev/null
435 .for _mtree in ${LOCAL_MTREE}
436 mtree -deU -f ${.CURDIR}/${_mtree} -p ${WORLDTMP} > /dev/null
440 @echo "--------------------------------------------------------------"
441 @echo ">>> stage 1.1: legacy release compatibility shims"
442 @echo "--------------------------------------------------------------"
443 ${_+_}cd ${.CURDIR}; ${BMAKE} legacy
446 @echo "--------------------------------------------------------------"
447 @echo ">>> stage 1.2: bootstrap tools"
448 @echo "--------------------------------------------------------------"
449 ${_+_}cd ${.CURDIR}; ${BMAKE} bootstrap-tools
451 .if !defined(NO_CLEAN)
453 @echo "--------------------------------------------------------------"
454 @echo ">>> stage 2.1: cleaning up the object tree"
455 @echo "--------------------------------------------------------------"
456 ${_+_}cd ${.CURDIR}; ${WMAKE} ${CLEANDIR:S/^/par-/}
457 .if defined(LIB32TMP)
458 ${_+_}cd ${.CURDIR}; ${LIB32WMAKE} -f Makefile.inc1 ${CLEANDIR:S/^/par-/}
463 @echo "--------------------------------------------------------------"
464 @echo ">>> stage 2.2: rebuilding the object tree"
465 @echo "--------------------------------------------------------------"
466 ${_+_}cd ${.CURDIR}; ${WMAKE} par-obj
469 @echo "--------------------------------------------------------------"
470 @echo ">>> stage 2.3: build tools"
471 @echo "--------------------------------------------------------------"
472 ${_+_}cd ${.CURDIR}; ${TMAKE} build-tools
475 @echo "--------------------------------------------------------------"
476 @echo ">>> stage 3: cross tools"
477 @echo "--------------------------------------------------------------"
478 ${_+_}cd ${.CURDIR}; ${XMAKE} cross-tools
481 @echo "--------------------------------------------------------------"
482 @echo ">>> stage 4.1: building includes"
483 @echo "--------------------------------------------------------------"
484 ${_+_}cd ${.CURDIR}; ${WMAKE} SHARED=symlinks par-includes
487 @echo "--------------------------------------------------------------"
488 @echo ">>> stage 4.2: building libraries"
489 @echo "--------------------------------------------------------------"
490 ${_+_}cd ${.CURDIR}; \
491 ${WMAKE} -DNO_FSCHG -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT \
492 -DWITHOUT_MAN -DNO_PROFILE libraries
495 @echo "--------------------------------------------------------------"
496 @echo ">>> stage 4.3: make dependencies"
497 @echo "--------------------------------------------------------------"
498 ${_+_}cd ${.CURDIR}; ${WMAKE} par-depend
501 @echo "--------------------------------------------------------------"
502 @echo ">>> stage 4.4: building everything"
503 @echo "--------------------------------------------------------------"
504 ${_+_}cd ${.CURDIR}; ${WMAKE} par-all
505 .if defined(LIB32TMP)
508 @echo "--------------------------------------------------------------"
509 @echo ">>> stage 5.1: building 32 bit shim libraries"
510 @echo "--------------------------------------------------------------"
511 mkdir -p ${LIB32TMP}/usr/include
512 mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \
513 -p ${LIB32TMP}/usr >/dev/null
514 mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \
515 -p ${LIB32TMP}/usr/include >/dev/null
517 ln -sf ${.CURDIR}/sys ${WORLDTMP}
518 .for _t in obj includes
519 cd ${.CURDIR}/include; ${LIB32WMAKE} DIRPRFX=include/ ${_t}
520 cd ${.CURDIR}/lib; ${LIB32WMAKE} DIRPRFX=lib/ ${_t}
521 .if ${MK_CDDL} != "no"
522 cd ${.CURDIR}/cddl/lib; ${LIB32WMAKE} DIRPRFX=cddl/lib/ ${_t}
524 cd ${.CURDIR}/gnu/lib; ${LIB32WMAKE} DIRPRFX=gnu/lib/ ${_t}
525 .if ${MK_CRYPT} != "no"
526 cd ${.CURDIR}/secure/lib; ${LIB32WMAKE} DIRPRFX=secure/lib/ ${_t}
528 .if ${MK_KERBEROS} != "no"
529 cd ${.CURDIR}/kerberos5/lib; ${LIB32WMAKE} DIRPRFX=kerberos5/lib ${_t}
532 .for _dir in usr.bin/lex/lib
533 cd ${.CURDIR}/${_dir}; ${LIB32WMAKE} DIRPRFX=${_dir}/ obj
535 .for _dir in lib/ncurses/ncurses lib/ncurses/ncursesw lib/libmagic
536 cd ${.CURDIR}/${_dir}; \
537 WORLDTMP=${WORLDTMP} \
538 MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}" \
539 MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} SSP_CFLAGS= DESTDIR= \
540 DIRPRFX=${_dir}/ -DNO_LINT -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF \
541 -DEARLY_BUILD build-tools
544 ${LIB32WMAKE} -f Makefile.inc1 libraries
545 .for _t in obj depend all
546 cd ${.CURDIR}/libexec/rtld-elf; PROG=ld-elf32.so.1 ${LIB32WMAKE} \
547 DIRPRFX=libexec/rtld-elf/ ${_t}
548 cd ${.CURDIR}/usr.bin/ldd; PROG=ldd32 ${LIB32WMAKE} \
549 DIRPRFX=usr.bin/ldd ${_t}
552 distribute32 install32:
553 cd ${.CURDIR}/lib; ${LIB32IMAKE} ${.TARGET:S/32$//}
554 .if ${MK_CDDL} != "no"
555 cd ${.CURDIR}/cddl/lib; ${LIB32IMAKE} ${.TARGET:S/32$//}
557 cd ${.CURDIR}/gnu/lib; ${LIB32IMAKE} ${.TARGET:S/32$//}
558 .if ${MK_CRYPT} != "no"
559 cd ${.CURDIR}/secure/lib; ${LIB32IMAKE} ${.TARGET:S/32$//}
561 .if ${MK_KERBEROS} != "no"
562 cd ${.CURDIR}/kerberos5/lib; ${LIB32IMAKE} ${.TARGET:S/32$//}
564 cd ${.CURDIR}/libexec/rtld-elf; \
565 PROG=ld-elf32.so.1 ${LIB32IMAKE} ${.TARGET:S/32$//}
566 cd ${.CURDIR}/usr.bin/ldd; PROG=ldd32 ${LIB32IMAKE} ${.TARGET:S/32$//}
570 .if !defined(SUBDIR_OVERRIDE)
571 WMAKE_TGTS+= _worldtmp _legacy _bootstrap-tools
573 WMAKE_TGTS+= _cleanobj _obj _build-tools
574 .if !defined(SUBDIR_OVERRIDE)
575 WMAKE_TGTS+= _cross-tools
577 WMAKE_TGTS+= _includes _libraries _depend everything
578 .if defined(LIB32TMP) && ${MK_LIB32} != "no"
582 buildworld: buildworld_prologue ${WMAKE_TGTS} buildworld_epilogue
583 .ORDER: buildworld_prologue ${WMAKE_TGTS} buildworld_epilogue
586 @echo "--------------------------------------------------------------"
587 @echo ">>> World build started on `LC_ALL=C date`"
588 @echo "--------------------------------------------------------------"
592 @echo "--------------------------------------------------------------"
593 @echo ">>> World build completed on `LC_ALL=C date`"
594 @echo "--------------------------------------------------------------"
597 # We need to have this as a target because the indirection between Makefile
598 # and Makefile.inc1 causes the correct PATH to be used, rather than a
599 # modification of the current environment's PATH. In addition, we need
600 # to quote multiword values.
606 @echo Entering world for ${TARGET_ARCH}:${TARGET}
607 @cd ${.CURDIR} && env ${WMAKEENV} ${BUILDENV_SHELL} || true
609 TOOLCHAIN_TGTS= ${WMAKE_TGTS:N_depend:Neverything:Nbuild32}
610 toolchain: ${TOOLCHAIN_TGTS}
611 kernel-toolchain: ${TOOLCHAIN_TGTS:N_includes:N_libraries}
616 # Checks to be sure system is ready for installworld/installkernel.
621 # Require DESTDIR to be set if installing for a different architecture or
622 # using the user/group database in the source tree.
624 .if ${TARGET_ARCH} != ${MACHINE_ARCH} || ${TARGET} != ${MACHINE} || \
626 .if !make(distributeworld)
627 installcheck: installcheck_DESTDIR
628 installcheck_DESTDIR:
629 .if !defined(DESTDIR) || empty(DESTDIR)
630 @echo "ERROR: Please set DESTDIR!"; \
636 .if !defined(DB_FROM_SRC)
638 # Check for missing UIDs/GIDs.
640 CHECK_UIDS= auditdistd
642 .if ${MK_SENDMAIL} != "no"
648 CHECK_GIDS+= proxy authpf
650 installcheck: installcheck_UGID
652 .for uid in ${CHECK_UIDS}
653 @if ! `id -u ${uid} >/dev/null 2>&1`; then \
654 echo "ERROR: Required ${uid} user is missing, see /usr/src/UPDATING."; \
658 .for gid in ${CHECK_GIDS}
659 @if ! `find / -prune -group ${gid} >/dev/null 2>&1`; then \
660 echo "ERROR: Required ${gid} group is missing, see /usr/src/UPDATING."; \
667 # Required install tools to be saved in a scratch dir for safety.
669 .if ${MK_INFO} != "no"
670 _install-info= install-info
672 .if ${MK_ZONEINFO} != "no"
673 _zoneinfo= zic tzsetup
676 .if exists(/usr/sbin/nmtree)
677 _nmtree_itools= nmtree
680 ITOOLS= [ awk cap_mkdb cat chflags chmod chown \
681 date echo egrep find grep id install ${_install-info} \
682 ln lockf make mkdir mtree ${_nmtree_itools} mv pwd_mkdb \
683 rm sed sh sysctl test true uname wc ${_zoneinfo}
688 # Distributes everything compiled by a `buildworld'.
692 # Installs everything compiled by a 'buildworld'.
695 # Non-base distributions produced by the base system
696 EXTRA_DISTRIBUTIONS= doc
697 .if ${MK_GAMES} != "no"
698 EXTRA_DISTRIBUTIONS+= games
700 .if defined(LIB32TMP) && ${MK_LIB32} != "no"
701 EXTRA_DISTRIBUTIONS+= lib32
704 MTREE_MAGIC?= mtree 2.0
706 distributeworld installworld: installcheck
707 mkdir -p ${INSTALLTMP}
708 progs=$$(for prog in ${ITOOLS}; do \
709 if progpath=`which $$prog`; then \
712 echo "Required tool $$prog not found in PATH." >&2; \
716 libs=$$(ldd -f "%o %p\n" -f "%o %p\n" $$progs 2>/dev/null | sort -u | \
717 while read line; do \
719 if [ "$$2 $$3" != "not found" ]; then \
722 echo "Required library $$1 not found." >&2; \
726 cp $$libs $$progs ${INSTALLTMP}
727 cp -R $${PATH_LOCALE:-"/usr/share/locale"} ${INSTALLTMP}/locale
729 echo "#${MTREE_MAGIC}" > ${METALOG}
731 .if make(distributeworld)
732 .for dist in ${EXTRA_DISTRIBUTIONS}
733 -mkdir ${DESTDIR}/${DISTDIR}/${dist}
734 mtree -deU -f ${.CURDIR}/etc/mtree/BSD.root.dist \
735 -p ${DESTDIR}/${DISTDIR}/${dist} >/dev/null
736 mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \
737 -p ${DESTDIR}/${DISTDIR}/${dist}/usr >/dev/null
738 mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \
739 -p ${DESTDIR}/${DISTDIR}/${dist}/usr/include >/dev/null
741 ${IMAKEENV} nmtree -C -f ${.CURDIR}/etc/mtree/BSD.root.dist | \
742 sed -e 's#^\./#./${dist}/#' >> ${METALOG}
743 ${IMAKEENV} nmtree -C -f ${.CURDIR}/etc/mtree/BSD.usr.dist | \
744 sed -e 's#^\./#./${dist}/usr/#' >> ${METALOG}
745 ${IMAKEENV} nmtree -C -f ${.CURDIR}/etc/mtree/BSD.include.dist | \
746 sed -e 's#^\./#./${dist}/usr/include/#' >> ${METALOG}
749 -mkdir ${DESTDIR}/${DISTDIR}/base
750 cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} \
751 METALOG=${METALOG} ${IMAKE_INSTALL} ${IMAKE_MTREE} \
752 DISTBASE=/base DESTDIR=${DESTDIR}/${DISTDIR}/base \
753 LOCAL_MTREE=${LOCAL_MTREE} distrib-dirs
755 ${_+_}cd ${.CURDIR}; ${IMAKE} re${.TARGET:S/world$//}; \
756 ${IMAKEENV} rm -rf ${INSTALLTMP}
757 .if make(distributeworld)
758 .for dist in ${EXTRA_DISTRIBUTIONS}
759 find ${DESTDIR}/${DISTDIR}/${dist} -empty -delete
762 .for dist in base ${EXTRA_DISTRIBUTIONS}
763 @# For each file that exists in this dist, print the corresponding
764 @# line from the METALOG. This relies on the fact that
765 @# a line containing only the filename will sort immediatly before
766 @# the relevant mtree line.
767 cd ${DESTDIR}/${DISTDIR}; \
768 find ./${dist} | sort -u ${METALOG} - | \
769 awk 'BEGIN { print "#${MTREE_MAGIC}" } !/ type=/ { file = $$1 } / type=/ { if ($$1 == file) { sub(/^\.\/${dist}\//, "./"); print } }' > \
770 ${DESTDIR}/${DISTDIR}/${dist}.meta
776 .for dist in base ${EXTRA_DISTRIBUTIONS}
778 ${_+_}cd ${DESTDIR}/${DISTDIR}/${dist}; \
779 tar cvJf ${DESTDIR}/${DISTDIR}/${dist}.txz \
780 @${DESTDIR}/${DISTDIR}/${dist}.meta
782 ${_+_}cd ${DESTDIR}/${DISTDIR}/${dist}; \
783 tar cvJf ${DESTDIR}/${DISTDIR}/${dist}.txz .
790 # If you have a build server, you can NFS mount the source and obj directories
791 # and do a 'make reinstall' on the *client* to install new binaries from the
792 # most recent server build.
795 @echo "--------------------------------------------------------------"
796 @echo ">>> Making hierarchy"
797 @echo "--------------------------------------------------------------"
798 ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 \
799 LOCAL_MTREE=${LOCAL_MTREE} hierarchy
801 @echo "--------------------------------------------------------------"
802 @echo ">>> Installing everything"
803 @echo "--------------------------------------------------------------"
804 ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install
805 .if defined(LIB32TMP) && ${MK_LIB32} != "no"
806 ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install32
810 @echo "--------------------------------------------------------------"
811 @echo ">>> Distributing everything"
812 @echo "--------------------------------------------------------------"
813 ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 distribute
814 .if defined(LIB32TMP) && ${MK_LIB32} != "no"
815 ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 distribute32 \
819 distrib-dirs distribution:
820 cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} \
821 ${IMAKE_INSTALL} ${IMAKE_MTREE} METALOG=${METALOG} ${.TARGET}
824 # buildkernel and installkernel
826 # Which kernels to build and/or install is specified by setting
827 # KERNCONF. If not defined a GENERIC kernel is built/installed.
828 # Only the existing (depending TARGET) config files are used
829 # for building kernels and only the first of these is designated
830 # as the one being installed.
832 # Note that we have to use TARGET instead of TARGET_ARCH when
833 # we're in kernel-land. Since only TARGET_ARCH is (expected) to
834 # be set to cross-build, we have to make sure TARGET is set
837 .if defined(KERNFAST)
842 # Shortcut for KERNCONF=Blah -DKERNFAST is now KERNFAST=Blah
843 .if !defined(KERNCONF) && ${KERNFAST} != "1"
847 .if !defined(KERNCONF) && defined(KERNEL)
851 .if ${TARGET_ARCH} == "powerpc64"
857 INSTKERNNAME?= kernel
859 KERNSRCDIR?= ${.CURDIR}/sys
860 KRNLCONFDIR= ${KERNSRCDIR}/${TARGET}/conf
861 KRNLOBJDIR= ${OBJTREE}${KERNSRCDIR}
862 KERNCONFDIR?= ${KRNLCONFDIR}
866 .for _kernel in ${KERNCONF}
867 .if exists(${KERNCONFDIR}/${_kernel})
868 BUILDKERNELS+= ${_kernel}
869 .if empty(INSTALLKERNEL)
870 INSTALLKERNEL= ${_kernel}
878 # Builds all kernels defined by BUILDKERNELS.
881 .if empty(BUILDKERNELS)
882 @echo "ERROR: Missing kernel configuration file(s) (${KERNCONF})."; \
885 .if defined(KERNWARN)
886 @echo "--------------------------------------------------------------"
887 @echo ">>> WARNING: KERNEL= setting should be changed to KERNCONF="
888 @echo "--------------------------------------------------------------"
892 .for _kernel in ${BUILDKERNELS}
893 @echo "--------------------------------------------------------------"
894 @echo ">>> Kernel build for ${_kernel} started on `LC_ALL=C date`"
895 @echo "--------------------------------------------------------------"
896 @echo "===> ${_kernel}"
897 mkdir -p ${KRNLOBJDIR}
898 .if !defined(NO_KERNELCONFIG)
900 @echo "--------------------------------------------------------------"
901 @echo ">>> stage 1: configuring the kernel"
902 @echo "--------------------------------------------------------------"
905 config ${CONFIGARGS} -d ${KRNLOBJDIR}/${_kernel} \
906 ${KERNCONFDIR}/${_kernel}
908 .if !defined(NO_CLEAN) && !defined(NO_KERNELCLEAN)
910 @echo "--------------------------------------------------------------"
911 @echo ">>> stage 2.1: cleaning up the object tree"
912 @echo "--------------------------------------------------------------"
913 cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} ${CLEANDIR}
915 .if !defined(NO_KERNELOBJ)
917 @echo "--------------------------------------------------------------"
918 @echo ">>> stage 2.2: rebuilding the object tree"
919 @echo "--------------------------------------------------------------"
920 cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} obj
923 @echo "--------------------------------------------------------------"
924 @echo ">>> stage 2.3: build tools"
925 @echo "--------------------------------------------------------------"
926 cd ${KRNLOBJDIR}/${_kernel}; \
927 PATH=${BPATH}:${PATH} \
928 MAKESRCPATH=${KERNSRCDIR}/dev/aic7xxx/aicasm \
929 ${MAKE} SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_CTF -DEARLY_BUILD \
930 -f ${KERNSRCDIR}/dev/aic7xxx/aicasm/Makefile
931 # XXX - Gratuitously builds aicasm in the ``makeoptions NO_MODULES'' case.
932 .if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists(${KERNSRCDIR}/modules)
933 .for target in obj depend all
934 cd ${KERNSRCDIR}/modules/aic7xxx/aicasm; \
935 PATH=${BPATH}:${PATH} \
936 MAKEOBJDIRPREFIX=${KRNLOBJDIR}/${_kernel}/modules \
937 ${MAKE} SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_CTF -DEARLY_BUILD ${target}
940 .if !defined(NO_KERNELDEPEND)
942 @echo "--------------------------------------------------------------"
943 @echo ">>> stage 3.1: making dependencies"
944 @echo "--------------------------------------------------------------"
945 cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} depend -DNO_MODULES_OBJ
948 @echo "--------------------------------------------------------------"
949 @echo ">>> stage 3.2: building everything"
950 @echo "--------------------------------------------------------------"
951 cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} all -DNO_MODULES_OBJ
952 @echo "--------------------------------------------------------------"
953 @echo ">>> Kernel build for ${_kernel} completed on `LC_ALL=C date`"
954 @echo "--------------------------------------------------------------"
958 # installkernel, etc.
960 # Install the kernel defined by INSTALLKERNEL
962 installkernel installkernel.debug \
963 reinstallkernel reinstallkernel.debug: installcheck
964 .if empty(INSTALLKERNEL)
965 @echo "ERROR: No kernel \"${KERNCONF}\" to install."; \
968 @echo "--------------------------------------------------------------"
969 @echo ">>> Installing kernel ${INSTALLKERNEL}"
970 @echo "--------------------------------------------------------------"
971 cd ${KRNLOBJDIR}/${INSTALLKERNEL}; \
972 ${CROSSENV} PATH=${TMPPATH} \
973 ${MAKE} ${IMAKE_INSTALL} KERNEL=${INSTKERNNAME} ${.TARGET:S/kernel//}
975 distributekernel distributekernel.debug:
976 .if empty(INSTALLKERNEL)
977 @echo "ERROR: No kernel \"${KERNCONF}\" to install."; \
980 cd ${KRNLOBJDIR}/${INSTALLKERNEL}; \
981 ${CROSSENV} PATH=${TMPPATH} ${MAKE} KERNEL=${INSTKERNNAME} \
982 DESTDIR=${DESTDIR}/${DISTDIR}/kernel \
983 ${.TARGET:S/distributekernel/install/}
984 .for _kernel in ${BUILDKERNELS:S/${INSTALLKERNEL}//}
985 cd ${KRNLOBJDIR}/${_kernel}; \
986 ${CROSSENV} PATH=${TMPPATH} ${MAKE} \
987 KERNEL=${INSTKERNNAME}.${_kernel} \
988 DESTDIR=${DESTDIR}/${DISTDIR}/kernel.${_kernel} \
989 ${.TARGET:S/distributekernel/install/}
993 cd ${DESTDIR}/${DISTDIR}/kernel; \
994 tar cvJf ${DESTDIR}/${DISTDIR}/kernel.txz .
995 .for _kernel in ${BUILDKERNELS:S/${INSTALLKERNEL}//}
996 cd ${DESTDIR}/${DISTDIR}/kernel.${_kernel}; \
997 tar cvJf ${DESTDIR}/${DISTDIR}/kernel.${_kernel}.txz .
1003 # Build the API documentation with doxygen
1006 @if [ ! -x `/usr/bin/which doxygen` ]; then \
1007 echo "You need doxygen (devel/doxygen) to generate the API documentation of the kernel." | /usr/bin/fmt; \
1010 cd ${.CURDIR}/tools/kerneldoc/subsys && ${MAKE} obj all
1015 # Update the source tree(s), by running cvsup/cvs/svn to update to the
1019 .if defined(SUP_UPDATE)
1020 @echo "--------------------------------------------------------------"
1021 @echo ">>> Running ${SUP}"
1022 @echo "--------------------------------------------------------------"
1023 @echo "!! WARNING WARNING WARNING WARNING WARNING WARNING WARNING !!"
1024 @echo "!! Update methods with ${SUP} are deprecated."
1025 @echo "!! Please see http://www.freebsd.org/handbook/svn.html"
1026 @echo "!! and convert your update method to SVN_UPDATE or"
1027 @echo "!! freebsd-update(8)."
1028 @echo "!! WARNING WARNING WARNING WARNING WARNING WARNING WARNING !!"
1030 .if defined(SUPFILE)
1031 @${SUP} ${SUPFLAGS} ${SUPFILE}
1033 .if defined(SUPFILE1)
1034 @${SUP} ${SUPFLAGS} ${SUPFILE1}
1036 .if defined(SUPFILE2)
1037 @${SUP} ${SUPFLAGS} ${SUPFILE2}
1039 .if defined(PORTSSUPFILE) && !defined(NO_PORTSUPDATE)
1040 @${SUP} ${SUPFLAGS} ${PORTSSUPFILE}
1042 .if defined(DOCSUPFILE) && !defined(NO_DOCUPDATE)
1043 @${SUP} ${SUPFLAGS} ${DOCSUPFILE}
1046 .if defined(CVS_UPDATE)
1048 if [ -d CVS ] ; then \
1049 echo "--------------------------------------------------------------" ; \
1050 echo ">>> Updating ${.CURDIR} from CVS repository" ${CVSROOT} ; \
1051 echo "--------------------------------------------------------------" ; \
1052 echo "!! WARNING WARNING WARNING WARNING WARNING WARNING WARNING !!" ; \
1053 echo "!! Update methods with CVS are deprecated." ; \
1054 echo "!! Please see http://www.freebsd.org/handbook/svn.html" ; \
1055 echo "!! and convert your update method to SVN_UPDATE or" ; \
1056 echo "!! freebsd-update(8)." ; \
1057 echo "!! WARNING WARNING WARNING WARNING WARNING WARNING WARNING !!" ; \
1059 echo ${CVS} -R -q update ${CVSFLAGS} ; \
1060 ${CVS} -R -q update ${CVSFLAGS} ; \
1063 .if defined(SVN_UPDATE)
1065 if [ -d .svn ] ; then \
1066 echo "--------------------------------------------------------------" ; \
1067 echo ">>> Updating ${.CURDIR} using Subversion" ; \
1068 echo "--------------------------------------------------------------" ; \
1069 echo ${SVN} update ${SVNFLAGS} ; \
1070 ${SVN} update ${SVNFLAGS} ; \
1075 # ------------------------------------------------------------------------
1077 # From here onwards are utility targets used by the 'make world' and
1078 # related targets. If your 'world' breaks, you may like to try to fix
1079 # the problem and manually run the following targets to attempt to
1080 # complete the build. Beware, this is *not* guaranteed to work, you
1081 # need to have a pretty good grip on the current state of the system
1082 # to attempt to manually finish it. If in doubt, 'make world' again.
1086 # legacy: Build compatibility shims for the next three targets
1089 .if ${BOOTSTRAPPING} < 700055 && ${BOOTSTRAPPING} != 0
1090 @echo "ERROR: Source upgrades from versions prior to 7.0 not supported."; \
1093 .for _tool in tools/build
1094 ${_+_}@${ECHODIR} "===> ${_tool} (obj,includes,depend,all,install)"; \
1095 cd ${.CURDIR}/${_tool}; \
1096 ${MAKE} DIRPRFX=${_tool}/ obj; \
1097 ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy includes; \
1098 ${MAKE} DIRPRFX=${_tool}/ depend; \
1099 ${MAKE} DIRPRFX=${_tool}/ all; \
1100 ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy install
1104 # bootstrap-tools: Build tools needed for compatibility
1106 .if ${MK_GAMES} != "no"
1107 _strfile= games/fortune/strfile
1110 .if ${MK_CXX} != "no"
1111 _gperf= gnu/usr.bin/gperf
1114 .if ${MK_GROFF} != "no"
1115 _groff= gnu/usr.bin/groff
1118 .if ${BOOTSTRAPPING} < 800022
1122 .if ${BOOTSTRAPPING} < 800013
1123 _mklocale= usr.bin/mklocale
1126 .if ${BOOTSTRAPPING} < 900002
1130 .if ${BOOTSTRAPPING} < 900006
1134 .if ${BOOTSTRAPPING} < 1000013
1139 .if ${BOOTSTRAPPING} < 1000026
1140 _nmtree= lib/libnetbsd \
1144 .if ${BOOTSTRAPPING} < 1000027
1148 .if ${BOOTSTRAPPING} >= 900040 && ${BOOTSTRAPPING} < 900041
1152 .if ${MK_BSNMP} != "no" && !exists(/usr/sbin/gensnmptree)
1153 _gensnmptree= usr.sbin/bsnmpd/gensnmptree
1156 .if ${MK_CLANG} != "no"
1158 lib/clang/libllvmsupport \
1159 lib/clang/libllvmtablegen \
1160 usr.bin/clang/tblgen \
1161 usr.bin/clang/clang-tblgen
1164 # dtrace tools are required for older bootstrap env and cross-build
1165 .if ${MK_CDDL} != "no" && \
1166 ((${BOOTSTRAPPING} < 800038 && \
1167 !(${BOOTSTRAPPING} >= 700112 && ${BOOTSTRAPPING} < 799999)) \
1168 || (${MACHINE} != ${TARGET} || ${MACHINE_ARCH} != ${TARGET_ARCH}))
1169 _dtrace_tools= cddl/usr.bin/sgsmsg cddl/lib/libctf lib/libelf \
1170 lib/libdwarf cddl/usr.bin/ctfconvert cddl/usr.bin/ctfmerge
1173 # Default to building the BSDL DTC, but build the GPL one if users explicitly
1176 .if ${MK_GPL_DTC} != "no"
1177 _dtc= gnu/usr.bin/dtc
1180 .if ${MK_KERBEROS} != "no"
1181 _kerberos5_bootstrap_tools= \
1182 kerberos5/tools/make-roken \
1183 kerberos5/lib/libroken \
1184 kerberos5/lib/libvers \
1185 kerberos5/tools/asn1_compile \
1189 # Please document (add comment) why something is in 'bootstrap-tools'.
1190 # Try to bound the building of the bootstrap-tool to just the
1191 # FreeBSD versions that need the tool built at this stage of the build.
1195 ${_kerberos5_bootstrap_tools} \
1205 usr.bin/makewhatis \
1216 ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \
1217 cd ${.CURDIR}/${_tool}; \
1218 ${MAKE} DIRPRFX=${_tool}/ obj; \
1219 ${MAKE} DIRPRFX=${_tool}/ depend; \
1220 ${MAKE} DIRPRFX=${_tool}/ all; \
1221 ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy install
1225 # build-tools: Build special purpose build tools
1227 .if defined(MODULES_WITH_WORLD) && exists(${KERNSRCDIR}/modules)
1228 _aicasm= sys/modules/aic7xxx/aicasm
1231 .if !defined(NO_SHARE)
1232 _share= share/syscons/scrnmaps
1235 .if ${MK_GCC} != "no"
1236 _gcc_tools= gnu/usr.bin/cc/cc_tools
1239 .if ${MK_RESCUE} != "no"
1240 _rescue= rescue/rescue
1248 ${LOCAL_TOOL_DIRS} \
1249 lib/ncurses/ncurses \
1250 lib/ncurses/ncursesw \
1255 usr.bin/mkesdb_static \
1256 usr.bin/mkcsmapper_static
1257 ${_+_}@${ECHODIR} "===> ${_tool} (obj,build-tools)"; \
1258 cd ${.CURDIR}/${_tool}; \
1259 ${MAKE} DIRPRFX=${_tool}/ obj; \
1260 ${MAKE} DIRPRFX=${_tool}/ build-tools
1264 ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all)"; \
1265 cd ${.CURDIR}/${_tool}; \
1266 ${MAKE} DIRPRFX=${_tool}/ obj; \
1267 ${MAKE} DIRPRFX=${_tool}/ depend; \
1268 ${MAKE} DIRPRFX=${_tool}/ all
1272 # cross-tools: Build cross-building tools
1274 .if ${TARGET_ARCH} != ${MACHINE_ARCH} || ${BOOTSTRAPPING} < 800035
1275 .if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386"
1276 _btxld= usr.sbin/btxld
1279 .if ${TARGET_ARCH} != ${MACHINE_ARCH}
1280 .if ${MK_RESCUE} != "no" || defined(RELEASEDIR)
1281 _crunchide= usr.sbin/crunch/crunchide
1283 .if ${TARGET_ARCH} == "i386" && defined(RELEASEDIR)
1284 _kgzip= usr.sbin/kgzip
1288 .if ${MK_BINUTILS} != "no"
1289 _binutils= gnu/usr.bin/binutils
1292 .if ${MK_CLANG} != "no" && (${MK_CLANG_IS_CC} != "no" || ${CC:T:Mclang} == "clang")
1293 _clang= usr.bin/clang
1294 _clang_libs= lib/clang
1297 .if ${MK_GCC} != "no" && (${MK_CLANG_IS_CC} == "no" || ${TARGET} == "pc98")
1307 usr.bin/xlint/lint1 usr.bin/xlint/lint2 usr.bin/xlint/xlint \
1311 ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \
1312 cd ${.CURDIR}/${_tool}; \
1313 ${MAKE} DIRPRFX=${_tool}/ obj; \
1314 ${MAKE} DIRPRFX=${_tool}/ depend; \
1315 ${MAKE} DIRPRFX=${_tool}/ all; \
1316 ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX} install
1320 # hierarchy - ensure that all the needed directories are present
1323 .if defined(NO_ROOT)
1324 cd ${.CURDIR}/etc; ${MAKE} LOCAL_MTREE=${LOCAL_MTREE} \
1325 -DNO_ROOT METALOG=${METALOG} distrib-dirs
1327 cd ${.CURDIR}/etc; ${MAKE} LOCAL_MTREE=${LOCAL_MTREE} distrib-dirs
1331 # libraries - build all libraries, and install them under ${DESTDIR}.
1333 # The list of libraries with dependents (${_prebuild_libs}) and their
1334 # interdependencies (__L) are built automatically by the
1335 # ${.CURDIR}/tools/make_libdeps.sh script.
1339 ${MAKE} -f Makefile.inc1 _prereq_libs; \
1340 ${MAKE} -f Makefile.inc1 _startup_libs; \
1341 ${MAKE} -f Makefile.inc1 _prebuild_libs; \
1342 ${MAKE} -f Makefile.inc1 _generic_libs;
1345 # static libgcc.a prerequisite for shared libc
1347 _prereq_libs= gnu/lib/libssp/libssp_nonshared gnu/lib/libgcc lib/libcompiler_rt
1349 # These dependencies are not automatically generated:
1351 # gnu/lib/csu, gnu/lib/libgcc, lib/csu and lib/libc must be built before
1352 # all shared libraries for ELF.
1354 _startup_libs= gnu/lib/csu
1355 .if exists(${.CURDIR}/lib/csu/${MACHINE_ARCH}-elf)
1356 _startup_libs+= lib/csu/${MACHINE_ARCH}-elf
1357 .elif exists(${.CURDIR}/lib/csu/${MACHINE_ARCH})
1358 _startup_libs+= lib/csu/${MACHINE_ARCH}
1360 _startup_libs+= lib/csu/${MACHINE_CPUARCH}
1362 _startup_libs+= gnu/lib/libgcc
1363 _startup_libs+= lib/libcompiler_rt
1364 _startup_libs+= lib/libc
1365 .if ${MK_LIBCPLUSPLUS} != "no"
1366 _startup_libs+= lib/libcxxrt
1369 gnu/lib/libgcc__L: lib/libc__L
1370 .if ${MK_LIBCPLUSPLUS} != "no"
1371 lib/libcxxrt__L: gnu/lib/libgcc__L
1374 _prebuild_libs= ${_kerberos5_lib_libasn1} \
1375 ${_kerberos5_lib_libhdb} \
1376 ${_kerberos5_lib_libheimbase} \
1377 ${_kerberos5_lib_libheimntlm} \
1378 ${_kerberos5_lib_libheimsqlite} \
1379 ${_kerberos5_lib_libheimipcc} \
1380 ${_kerberos5_lib_libhx509} ${_kerberos5_lib_libkrb5} \
1381 ${_kerberos5_lib_libroken} \
1382 ${_kerberos5_lib_libwind} \
1383 ${_lib_atf_libatf_c} \
1384 lib/libbz2 ${_libcom_err} lib/libcrypt \
1386 ${_lib_libgssapi} ${_lib_libipx} \
1387 lib/libkiconv lib/libkvm lib/liblzma lib/libmd \
1388 lib/ncurses/ncurses lib/ncurses/ncursesw \
1389 lib/libopie lib/libpam ${_lib_libthr} \
1390 lib/libradius lib/libsbuf lib/libtacplus \
1391 ${_cddl_lib_libumem} ${_cddl_lib_libnvpair} \
1392 lib/libutil ${_lib_libypclnt} lib/libz lib/msun \
1393 ${_secure_lib_libcrypto} ${_secure_lib_libssh} \
1394 ${_secure_lib_libssl}
1396 .if ${MK_ATF} != "no"
1397 _lib_atf_libatf_c= lib/atf/libatf-c
1400 .if ${MK_LIBTHR} != "no"
1401 _lib_libthr= lib/libthr
1404 .if ${MK_OFED} != "no"
1405 _ofed_lib= contrib/ofed/usr.lib/
1408 _generic_libs= ${_cddl_lib} gnu/lib ${_kerberos5_lib} lib ${_secure_lib} usr.bin/lex/lib ${_ofed_lib}
1409 .for _DIR in ${LOCAL_LIB_DIRS}
1410 .if exists(${.CURDIR}/${_DIR}/Makefile)
1411 _generic_libs+= ${_DIR}
1415 lib/libopie__L lib/libtacplus__L: lib/libmd__L
1417 .if ${MK_CDDL} != "no"
1418 _cddl_lib_libumem= cddl/lib/libumem
1419 _cddl_lib_libnvpair= cddl/lib/libnvpair
1423 .if ${MK_CRYPT} != "no"
1424 .if ${MK_OPENSSL} != "no"
1425 _secure_lib_libcrypto= secure/lib/libcrypto
1426 _secure_lib_libssl= secure/lib/libssl
1427 lib/libradius__L secure/lib/libssl__L: secure/lib/libcrypto__L
1428 .if ${MK_OPENSSH} != "no"
1429 _secure_lib_libssh= secure/lib/libssh
1430 secure/lib/libssh__L: lib/libz__L secure/lib/libcrypto__L lib/libcrypt__L
1431 .if ${MK_KERBEROS_SUPPORT} != "no"
1432 secure/lib/libssh__L: lib/libgssapi__L kerberos5/lib/libkrb5__L \
1433 kerberos5/lib/libhx509__L kerberos5/lib/libasn1__L lib/libcom_err__L \
1434 lib/libmd__L kerberos5/lib/libroken__L
1438 _secure_lib= secure/lib
1441 .if ${MK_KERBEROS} != "no"
1442 kerberos5/lib/libasn1__L: lib/libcom_err__L kerberos5/lib/libroken__L
1443 kerberos5/lib/libhdb__L: kerberos5/lib/libasn1__L lib/libcom_err__L \
1444 kerberos5/lib/libkrb5__L kerberos5/lib/libroken__L \
1445 kerberos5/lib/libwind__L kerberos5/lib/libheimsqlite__L
1446 kerberos5/lib/libheimntlm__L: secure/lib/libcrypto__L kerberos5/lib/libkrb5__L \
1447 kerberos5/lib/libroken__L lib/libcom_err__L
1448 kerberos5/lib/libhx509__L: kerberos5/lib/libasn1__L lib/libcom_err__L \
1449 secure/lib/libcrypto__L kerberos5/lib/libroken__L kerberos5/lib/libwind__L
1450 kerberos5/lib/libkrb5__L: kerberos5/lib/libasn1__L lib/libcom_err__L \
1451 lib/libcrypt__L secure/lib/libcrypto__L kerberos5/lib/libhx509__L \
1452 kerberos5/lib/libroken__L kerberos5/lib/libwind__L \
1453 kerberos5/lib/libheimbase__L kerberos5/lib/libheimipcc__L
1454 kerberos5/lib/libroken__L: lib/libcrypt__L
1455 kerberos5/lib/libwind__L: kerberos5/lib/libroken__L lib/libcom_err__L
1456 kerberos5/lib/libheimbase__L: lib/libthr__L
1457 kerberos5/lib/libheimipcc__L: kerberos5/lib/libroken__L kerberos5/lib/libheimbase__L lib/libthr__L
1458 kerberos5/lib/libheimsqlite__L: lib/libthr__L
1461 .if ${MK_GSSAPI} != "no"
1462 _lib_libgssapi= lib/libgssapi
1465 .if ${MK_IPX} != "no"
1466 _lib_libipx= lib/libipx
1469 .if ${MK_KERBEROS} != "no"
1470 _kerberos5_lib= kerberos5/lib
1471 _kerberos5_lib_libasn1= kerberos5/lib/libasn1
1472 _kerberos5_lib_libhdb= kerberos5/lib/libhdb
1473 _kerberos5_lib_libheimbase= kerberos5/lib/libheimbase
1474 _kerberos5_lib_libkrb5= kerberos5/lib/libkrb5
1475 _kerberos5_lib_libhx509= kerberos5/lib/libhx509
1476 _kerberos5_lib_libroken= kerberos5/lib/libroken
1477 _kerberos5_lib_libheimntlm= kerberos5/lib/libheimntlm
1478 _kerberos5_lib_libheimsqlite= kerberos5/lib/libheimsqlite
1479 _kerberos5_lib_libheimipcc= kerberos5/lib/libheimipcc
1480 _kerberos5_lib_libwind= kerberos5/lib/libwind
1481 _libcom_err= lib/libcom_err
1484 .if ${MK_NIS} != "no"
1485 _lib_libypclnt= lib/libypclnt
1488 .if ${MK_OPENSSL} == "no"
1489 lib/libradius__L: lib/libmd__L
1492 .for _lib in ${_prereq_libs}
1494 .if exists(${.CURDIR}/${_lib})
1495 ${_+_}@${ECHODIR} "===> ${_lib} (obj,depend,all,install)"; \
1496 cd ${.CURDIR}/${_lib}; \
1497 ${MAKE} DIRPRFX=${_lib}/ obj; \
1498 ${MAKE} DIRPRFX=${_lib}/ depend; \
1499 ${MAKE} -DNO_PROFILE -DNO_PIC DIRPRFX=${_lib}/ all; \
1500 ${MAKE} -DNO_PROFILE -DNO_PIC DIRPRFX=${_lib}/ install
1504 .for _lib in ${_startup_libs} ${_prebuild_libs:Nlib/libpam} ${_generic_libs}
1506 .if exists(${.CURDIR}/${_lib})
1507 ${_+_}@${ECHODIR} "===> ${_lib} (obj,depend,all,install)"; \
1508 cd ${.CURDIR}/${_lib}; \
1509 ${MAKE} DIRPRFX=${_lib}/ obj; \
1510 ${MAKE} DIRPRFX=${_lib}/ depend; \
1511 ${MAKE} DIRPRFX=${_lib}/ all; \
1512 ${MAKE} DIRPRFX=${_lib}/ install
1516 # libpam is special: we need to build static PAM modules before
1517 # static PAM library, and dynamic PAM library before dynamic PAM
1519 lib/libpam__L: .PHONY
1520 ${_+_}@${ECHODIR} "===> lib/libpam (obj,depend,all,install)"; \
1521 cd ${.CURDIR}/lib/libpam; \
1522 ${MAKE} DIRPRFX=lib/libpam/ obj; \
1523 ${MAKE} DIRPRFX=lib/libpam/ depend; \
1524 ${MAKE} DIRPRFX=lib/libpam/ -D_NO_LIBPAM_SO_YET all; \
1525 ${MAKE} DIRPRFX=lib/libpam/ -D_NO_LIBPAM_SO_YET install
1527 _prereq_libs: ${_prereq_libs:S/$/__PL/}
1528 _startup_libs: ${_startup_libs:S/$/__L/}
1529 _prebuild_libs: ${_prebuild_libs:S/$/__L/}
1530 _generic_libs: ${_generic_libs:S/$/__L/}
1532 .for __target in all clean cleandepend cleandir depend includes obj
1533 .for entry in ${SUBDIR}
1534 ${entry}.${__target}__D: .PHONY
1535 ${_+_}@if test -d ${.CURDIR}/${entry}.${MACHINE_ARCH}; then \
1536 ${ECHODIR} "===> ${DIRPRFX}${entry}.${MACHINE_ARCH} (${__target})"; \
1537 edir=${entry}.${MACHINE_ARCH}; \
1538 cd ${.CURDIR}/$${edir}; \
1540 ${ECHODIR} "===> ${DIRPRFX}${entry} (${__target})"; \
1542 cd ${.CURDIR}/$${edir}; \
1544 ${MAKE} ${__target} DIRPRFX=${DIRPRFX}$${edir}/
1546 par-${__target}: ${SUBDIR:S/$/.${__target}__D/}
1549 .include <bsd.subdir.mk>
1551 .if make(check-old) || make(check-old-dirs) || \
1552 make(check-old-files) || make(check-old-libs) || \
1553 make(delete-old) || make(delete-old-dirs) || \
1554 make(delete-old-files) || make(delete-old-libs)
1557 # check for / delete old files section
1560 .include "ObsoleteFiles.inc"
1562 OLD_LIBS_MESSAGE="Please be sure no application still uses those libraries, \
1563 else you can not start such an application. Consult UPDATING for more \
1564 information regarding how to cope with the removal/revision bump of a \
1567 .if !defined(BATCH_DELETE_OLD_FILES)
1574 @echo ">>> Removing old files (only deletes safe to delete libs)"
1575 # Ask for every old file if the user really wants to remove it.
1576 # It's annoying, but better safe than sorry.
1577 # NB: We cannot pass the list of OLD_FILES as a parameter because the
1578 # argument list will get too long. Using .for/.endfor make "loops" will make
1579 # the Makefile parser segfault.
1581 ${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \
1582 -V OLD_FILES -V "OLD_FILES:Musr/share/*.gz:R" | xargs -n1 | \
1583 while read file; do \
1584 if [ -f "${DESTDIR}/$${file}" -o -L "${DESTDIR}/$${file}" ]; then \
1585 chflags noschg "${DESTDIR}/$${file}" 2>/dev/null || true; \
1586 rm ${RM_I} "${DESTDIR}/$${file}" <&3; \
1589 # Remove catpages without corresponding manpages.
1591 find ${DESTDIR}/usr/share/man/cat* ! -type d | \
1592 sed -ep -e's:${DESTDIR}/usr/share/man/cat:${DESTDIR}/usr/share/man/man:' | \
1593 while read catpage; do \
1595 if [ ! -e "$${manpage}" ]; then \
1596 rm ${RM_I} $${catpage} <&3; \
1599 @echo ">>> Old files removed"
1602 @echo ">>> Checking for old files"
1603 @${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \
1604 -V OLD_FILES -V "OLD_FILES:Musr/share/*.gz:R" | xargs -n1 | \
1605 while read file; do \
1606 if [ -f "${DESTDIR}/$${file}" -o -L "${DESTDIR}/$${file}" ]; then \
1607 echo "${DESTDIR}/$${file}"; \
1610 # Check for catpages without corresponding manpages.
1611 @find ${DESTDIR}/usr/share/man/cat* ! -type d | \
1612 sed -ep -e's:${DESTDIR}/usr/share/man/cat:${DESTDIR}/usr/share/man/man:' | \
1613 while read catpage; do \
1615 if [ ! -e "$${manpage}" ]; then \
1621 @echo ">>> Removing old libraries"
1622 @echo "${OLD_LIBS_MESSAGE}" | fmt
1624 ${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \
1625 -V OLD_LIBS | xargs -n1 | \
1626 while read file; do \
1627 if [ -f "${DESTDIR}/$${file}" -o -L "${DESTDIR}/$${file}" ]; then \
1628 chflags noschg "${DESTDIR}/$${file}" 2>/dev/null || true; \
1629 rm ${RM_I} "${DESTDIR}/$${file}" <&3; \
1632 @echo ">>> Old libraries removed"
1635 @echo ">>> Checking for old libraries"
1636 @${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \
1637 -V OLD_LIBS | xargs -n1 | \
1638 while read file; do \
1639 if [ -f "${DESTDIR}/$${file}" -o -L "${DESTDIR}/$${file}" ]; then \
1640 echo "${DESTDIR}/$${file}"; \
1645 @echo ">>> Removing old directories"
1646 @${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \
1647 -V OLD_DIRS | xargs -n1 | \
1648 while read dir; do \
1649 if [ -d "${DESTDIR}/$${dir}" ]; then \
1650 rmdir -v "${DESTDIR}/$${dir}" || true; \
1651 elif [ -L "${DESTDIR}/$${dir}" ]; then \
1652 echo "${DESTDIR}/$${dir} is a link, please remove everything manually."; \
1655 @echo ">>> Old directories removed"
1658 @echo ">>> Checking for old directories"
1659 @${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \
1660 -V OLD_DIRS | xargs -n1 | \
1661 while read dir; do \
1662 if [ -d "${DESTDIR}/$${dir}" ]; then \
1663 echo "${DESTDIR}/$${dir}"; \
1664 elif [ -L "${DESTDIR}/$${dir}" ]; then \
1665 echo "${DESTDIR}/$${dir} is a link, please remove everything manually."; \
1669 delete-old: delete-old-files delete-old-dirs
1670 @echo "To remove old libraries run '${MAKE} delete-old-libs'."
1672 check-old: check-old-files check-old-libs check-old-dirs
1673 @echo "To remove old files and directories run '${MAKE} delete-old'."
1674 @echo "To remove old libraries run '${MAKE} delete-old-libs'."
1679 # showconfig - show build configuration.
1682 @${MAKE} -n -f bsd.own.mk -V dummy -dg1 2>&1 | grep ^MK_ | sort
1684 .if !empty(KRNLOBJDIR) && !empty(KERNCONF)
1685 DTBOUTPUTPATH= ${KRNLOBJDIR}/${KERNCONF}/
1687 .if !defined(FDT_DTS_FILE) || empty(FDT_DTS_FILE)
1688 .if exists(${KERNCONFDIR}/${KERNCONF})
1689 FDT_DTS_FILE!= awk 'BEGIN {FS="="} /^makeoptions[[:space:]]+FDT_DTS_FILE/ {print $$2}' \
1690 ${KERNCONFDIR}/${KERNCONF} ; echo
1696 .if !defined(DTBOUTPUTPATH) || !exists(${DTBOUTPUTPATH})
1697 DTBOUTPUTPATH= ${.CURDIR}
1701 # Build 'standalone' Device Tree Blob
1704 @if [ "${FDT_DTS_FILE}" = "" ]; then \
1705 echo "ERROR: FDT_DTS_FILE must be specified!"; \
1708 if [ ! -f ${.CURDIR}/sys/boot/fdt/dts/${FDT_DTS_FILE} ]; then \
1709 echo "ERROR: Specified DTS file (${FDT_DTS_FILE}) does not \
1713 if [ "${DTBOUTPUTPATH}" = "${.CURDIR}" ]; then \
1714 echo "WARNING: DTB will be placed in the current working \
1719 ${DTBOUTPUTPATH}/`echo ${FDT_DTS_FILE} | cut -d. -f1`.dtb -b 0 \
1720 -p 1024 ${.CURDIR}/sys/boot/fdt/dts/${FDT_DTS_FILE}
1724 .if defined(XDEV) && defined(XDEV_ARCH)
1726 .if ${XDEV} == ${MACHINE} && ${XDEV_ARCH} == ${MACHINE_ARCH}
1727 XDEV_CPUTYPE?=${CPUTYPE}
1729 XDEV_CPUTYPE?=${TARGET_CPUTYPE}
1732 NOFUN=-DNO_FSCHG -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT \
1733 -DWITHOUT_MAN -DWITHOUT_NLS -DNO_PROFILE \
1734 -DWITHOUT_KERBEROS -DWITHOUT_RESCUE -DNO_WARNS \
1735 TARGET=${XDEV} TARGET_ARCH=${XDEV_ARCH} \
1736 CPUTYPE=${XDEV_CPUTYPE}
1738 XDDIR=${XDEV_ARCH}-freebsd
1740 CDBENV=MAKEOBJDIRPREFIX=${MAKEOBJDIRPREFIX}/${XDDIR} \
1741 INSTALL="sh ${.CURDIR}/tools/install.sh"
1743 _SHLIBDIRPREFIX=${XDTP} \
1744 TOOLS_PREFIX=${XDTP}
1746 MACHINE=${XDEV} MACHINE_ARCH=${XDEV_ARCH}
1748 CDTMP= ${MAKEOBJDIRPREFIX}/${XDEV}/${.CURDIR}/tmp
1749 CDMAKE=${CDENV} ${MAKE} ${NOFUN}
1750 CD2MAKE=${CD2ENV} PATH=${CDTMP}/usr/bin:${XDTP}/usr/bin:${PATH} ${MAKE} ${NOFUN}
1751 XDDESTDIR=${DESTDIR}${XDTP}
1753 OSREL!= uname -r | sed -e 's/[-(].*//'
1756 .ORDER: xdev-build xdev-install
1757 xdev: xdev-build xdev-install
1759 .ORDER: _xb-build-tools _xb-cross-tools
1760 xdev-build: _xb-build-tools _xb-cross-tools
1763 ${_+_}@cd ${.CURDIR}; \
1764 ${CDBENV} ${MAKE} -f Makefile.inc1 ${NOFUN} build-tools
1768 gnu/usr.bin/binutils \
1771 ${_+_}@${ECHODIR} "===> xdev ${_tool} (obj,depend,all)"; \
1772 cd ${.CURDIR}/${_tool}; \
1773 ${CDMAKE} DIRPRFX=${_tool}/ obj; \
1774 ${CDMAKE} DIRPRFX=${_tool}/ depend; \
1775 ${CDMAKE} DIRPRFX=${_tool}/ all
1779 ${_+_}@${ECHODIR} "mtree populating ${XDDESTDIR}"
1780 mkdir -p ${XDDESTDIR}
1781 mtree -deU -f ${.CURDIR}/etc/mtree/BSD.root.dist \
1782 -p ${XDDESTDIR} >/dev/null
1783 mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \
1784 -p ${XDDESTDIR}/usr >/dev/null
1785 mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \
1786 -p ${XDDESTDIR}/usr/include >/dev/null
1788 .ORDER: xdev-build _xi-mtree _xi-cross-tools _xi-includes _xi-libraries _xi-links
1789 xdev-install: xdev-build _xi-mtree _xi-cross-tools _xi-includes _xi-libraries _xi-links
1792 @echo "_xi-cross-tools"
1794 gnu/usr.bin/binutils \
1797 ${_+_}@${ECHODIR} "===> xdev ${_tool} (install)"; \
1798 cd ${.CURDIR}/${_tool}; \
1799 ${CDMAKE} DIRPRFX=${_tool}/ install DESTDIR=${XDDESTDIR}
1803 ${_+_}cd ${.CURDIR}; ${CD2MAKE} -f Makefile.inc1 par-includes \
1804 DESTDIR=${XDDESTDIR}
1807 ${_+_}cd ${.CURDIR}; ${CD2MAKE} -f Makefile.inc1 libraries \
1808 DESTDIR=${XDDESTDIR}
1811 ${_+_}cd ${XDDESTDIR}/usr/bin; \
1813 ln -sf ../../${XDTP}/usr/bin/$$i \
1814 ../../../../usr/bin/${XDDIR}-$$i; \
1815 ln -sf ../../${XDTP}/usr/bin/$$i \
1816 ../../../../usr/bin/${XDDIR}${OSREL}-$$i; \
1819 xdev xdev-buil xdev-install:
1820 @echo "*** Error: Both XDEV and XDEV_ARCH must be defined for \"${.TARGET}\" target"