Lines Matching +full:libsqlite3 +full:- +full:dev

4 #	-DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir
5 # -DNO_CLEAN do not clean at all
6 # -DDB_FROM_SRC use the user/group databases in src/etc instead of
8 # -DNO_SHARE do not go into share subdir
9 # -DKERNFAST define NO_KERNEL{CONFIG,CLEAN,OBJ}
10 # -DNO_KERNELCONFIG do not run config in ${MAKE} buildkernel
11 # -DNO_KERNELCLEAN do not run ${MAKE} clean in ${MAKE} buildkernel
12 # -DNO_KERNELOBJ do not run ${MAKE} obj in ${MAKE} buildkernel
13 # -DNO_ROOT install without using root privilege
14 # -DWITHOUT_CTF do not run the DTrace CTF conversion tools on built objects
23 # bootstrap-tools target
24 # LOCAL_TOOL_DIRS="list of dirs" to add additional dirs to the build-tools
27 # cross-tools target
40 # The intended user-driven targets are:
41 # buildworld - rebuild *everything*, including glue to help do upgrades
42 # installworld- install everything built by "buildworld"
43 # checkworld - run test suite on installed world
44 # doxygen - build API documentation of the kernel
54 .if make(showconfig) || make(test-system-*)
98 # Make sure sub-makes see the option as disabled so the hack in bsd.sys.mk to
107 .-include "${OBJTOP}/toolchain-metadata.mk"
144 MACHINE_TRIPLE?=${MACHINE_ARCH:S/amd64/x86_64/}-${MACHINE_TRIPLE_ABI}-freebsd${OS_REVISION}
146 TARGET_TRIPLE?= ${TARGET_ARCH:S/amd64/x86_64/}-${TARGET_TRIPLE_ABI}-freebsd${OS_REVISION}
219 # for cross-builds.
253 # WITH_SYSTEM_COMPILER - Pull in needed values and make a decision.
264 !make(test-system-linker)
280 # GCC cannot be used for cross-arch yet. For clang we pass -target later if
295 # WITH_SYSTEM_LD - Pull in needed values and make a decision.
306 !make(test-system-compiler)
335 # WITH_SYSTEM_COMPILER / WITH_SYSTEM_LINKER - Handle defaults and debug.
359 test-system-${_t}: .PHONY
361 ${_+_}@printf "%-35s= %s\n" "${v}" "${${v}}"
364 .if (make(buildworld) || make(buildkernel) || make(kernel-toolchain) || \
365 make(toolchain) || make(_cross-tools))
367 …EM_COMPILER: Determined that CC=${CC} matches the source tree. Not bootstrapping a cross-compiler.
369 .info SYSTEM_COMPILER: libclang will be built for bootstrapping a cross-compiler.
372 .info SYSTEM_LINKER: Determined that LD=${LD} matches the source tree. Not bootstrapping a cross-l…
374 .info SYSTEM_LINKER: libclang will be built for bootstrapping a cross-linker.
391 toolchain-metadata.mk: .PHONY .META
404 # We must do lib/ and libexec/ before bin/ in case of a mid-install error to
405 # keep the users system reasonably usable. For static->dynamic root upgrades,
410 # system here would require fine-grained ordering of all components based
501 # If filemon is used then we can rely on the build being incremental-safe.
546 # Set VERSION for CTFMERGE to use via the default CTFFLAGS=-L VERSION.
559 VERSION= FreeBSD ${_REVISION}-${_BRANCH:C/-p[0-9]+$//} ${TARGET_ARCH} ${SRCRELDATE}
574 EXTRA_REVISION= .a${_BRANCH:C/ALPHA([0-9]+).*/\1/}.${_TIMENOW}
577 EXTRA_REVISION= .b${_BRANCH:C/BETA([0-9]+).*/\1/}.${_TIMENOW}
580 EXTRA_REVISION= .rc${_BRANCH:C/RC([0-9]+).*/\1/}.${_TIMENOW}
581 .elif ${_BRANCH:M*-p*}
582 EXTRA_REVISION= p${_BRANCH:C/.*-p([0-9]+$)/\1/}
602 SOURCE_DATE_EPOCH!= ${GIT_CMD} -C ${SRCDIR} show -s --format=%ct HEAD
613 _CPUTYPE!= MAKEFLAGS= CPUTYPE=${_TARGET_CPUTYPE} ${MAKE} -f /dev/null \
614 -m ${.CURDIR}/share/mk MK_AUTO_OBJ=no -V CPUTYPE
620 BUILD_ARCH!= uname -p
621 # On some Linux systems uname -p returns "unknown" so skip this check there.
623 # MACHINE_ARCH so skipping it when crossbuilding on non-FreeBSD should be fine.
625 .error To cross-build, set TARGET_ARCH.
648 # When building on non-FreeBSD we can't rely on the tools in /usr/bin being compatible
650 # during the world build stage. We build most tools during the bootstrap-tools
674 INSTALLTMP!= ${MKTEMP} -d -u -t install
685 INSTALLTMP_COPY_HOST_TOOL=ln -s
699 # shims that are needed by the bootstrap-tools,
700 # build-tools and cross-tools stages. These are generally
703 # 1. bootstrap-tools stage [BMAKE]
706 # are not built as cross-tools.
707 # 2. build-tools stage [TMAKE]
713 # builds the 'build-tools' target rather than 'all'.
714 # 3. cross-tools stage [XMAKE]
716 # are needed for building the system. A cross-compiler is one
718 # 1. the 'all' target is built rather than 'build-tools'
737 # Don't rebuild build-tools targets during normal build.
750 # bootstrap-tools stage
755 MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}"
756 # need to keep this in sync with targets/pseudo/bootstrap-tools/Makefile
758 OBJTOP='${WORLDTMP}/obj-tools' \
764 -DNO_CPU_CFLAGS \
765 -DNO_PIC \
766 -DNO_SHARED \
783 ${TIME_ENV} ${BMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 \
789 # build-tools stage
791 ${TIME_ENV} ${BMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 \
796 -DNO_CPU_CFLAGS \
809 # cross-tools stage
818 # kernel-tools stage
822 MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}"
826 ${KTMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 \
828 OBJTOP='${WORLDTMP}/obj-kernel-tools' \
833 -DNO_CPU_CFLAGS \
834 -DNO_PIC \
835 -DNO_SHARED \
845 INSTALL="${INSTALL_CMD} -U" \
852 HMAKE+= PATH=${TMPPATH:Q} METALOG=${METALOG} -DNO_ROOT
863 # In the case of xdev-build tools, CROSS_BINUTILS_PREFIX won't be a
866 BFLAGS+= -B${CROSS_BINUTILS_PREFIX}
872 # always pass an explicit --sysroot and -target.
873 # - External compiler needs sysroot and target flags.
874 # - External ld needs sysroot.
875 # - To be clear about the use of a sysroot when using the internal compiler.
876 # - Easier debugging.
877 # - Allowing WITH_SYSTEM_COMPILER+WITH_META_MODE to work together due to
878 # the flip-flopping build command when sometimes using external and
880 # - Allow using lld which has no support for default paths.
882 BFLAGS+= -B${WORLDTMP}/usr/bin
888 XCFLAGS+= -target ${TARGET_TRIPLE}
890 XCFLAGS+= --sysroot=${WORLDTMP}
911 # r318736 - ino64 major ABI breakage
915 .if exists(${OBJTOP}/host-osreldate.h)
918 ${OBJTOP}/host-osreldate.h
927 # is older than the ABI-breakage OSRELDATE of the HOST then we rebuild.
949 host-osreldate.h: # DO NOT ADD /usr/include/osreldate.h here
951 @cp -f /usr/include/osreldate.h ${.TARGET}
958 WMAKE= ${TIME_ENV} ${WMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 \
963 IMAKE= ${TIME_ENV} ${IMAKEENV} ${MAKE} -f Makefile.inc1 \
965 .if empty(.MAKEFLAGS:M-n)
976 .if make(distributeworld) || make(distrib-dirs) || make(distribution) || \
982 INSTALLFLAGS+= -N ${.CURDIR}/etc
983 MTREEFLAGS+= -N ${.CURDIR}/etc
990 IMAKE+= -DNO_ROOT METALOG=${METALOG}
991 METALOG_INSTALLFLAGS= -U -M ${METALOG} -D ${INSTALL_DDIR}
994 MTREEFLAGS+= -W
997 INSTALLFLAGS+= -h sha256
1016 CERTCTLFLAGS+= -d /base
1020 CERTCTLFLAGS+= -D "${CERTCTLDESTDIR}"
1022 DESTDIR_MTREEFLAGS= -deU
1024 # so we also pass -W
1025 WORLDTMP_MTREEFLAGS= -deUW
1027 # When building with -DNO_ROOT we shouldn't be changing the directories
1029 DESTDIR_MTREEFLAGS+= -W
1032 DISTR_MTREEFLAGS= -N ${.CURDIR}/etc
1042 METALOG_SORT_CMD= env -i LC_COLLATE=C sort
1063 # Using ':' leaks into PATH and breaks finding cross-tools.
1072 # replacing generated files. Handle these cases here in an ad-hoc fashion.
1077 sh ${.CURDIR}/tools/build/depend-cleanup.sh ${OBJTOP} ${SRCTOP}
1082 @echo "--------------------------------------------------------------"
1084 @echo "--------------------------------------------------------------"
1085 rm -rf ${WORLDTMP}
1087 # Note: for delete-old we need to set $PATH to also include the host $PATH
1091 ${_+_}@if [ -e "${WORLDTMP}" ]; then \
1094 _NO_INCLUDE_COMPILERMK=t -DBATCH_DELETE_OLD_FILES delete-old \
1095 delete-old-libs >/dev/null; \
1097 rm -rf ${WORLDTMP}/legacy/usr/include
1100 if [ -x ${WORLDTMP}/usr/bin/${cc} ]; then \
1101 inum=$$(ls -i ${WORLDTMP}/usr/bin/${cc}); \
1102 find ${WORLDTMP}/usr/bin -inum $${inum%% *} -delete; \
1107 @rm -f ${WORLDTMP}/usr/bin/ld ${WORLDTMP}/usr/bin/ld.lld
1112 @echo "--------------------------------------------------------------"
1114 @echo "--------------------------------------------------------------"
1115 @mkdir -p ${WORLDTMP}
1118 # available on the target system (this happens e.g. when building on non-FreeBSD)
1122 # tools in $WORLDTMP for the tools that we don't build during bootstrap-tools
1124 ${MAKE} DIRPRFX=tools/build/ DESTDIR=${WORLDTMP}/legacy host-symlinks
1128 @echo "--------------------------------------------------------------"
1130 @echo "--------------------------------------------------------------"
1132 _bootstrap-tools:
1134 @echo "--------------------------------------------------------------"
1136 @echo "--------------------------------------------------------------"
1140 ${_+_}cd ${.CURDIR}; ${BMAKE} bootstrap-tools
1141 mkdir -p ${WORLDTMP}/usr ${WORLDTMP}/lib/geom ${WORLDTMP}/bin
1142 ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.usr.dist \
1143 -p ${WORLDTMP}/usr >/dev/null
1144 ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.include.dist \
1145 -p ${WORLDTMP}/usr/include >/dev/null
1147 mkdir -p ${WORLDTMP}/usr/include/${d}
1149 ln -sf ${.CURDIR}/sys ${WORLDTMP}
1151 ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.debug.dist \
1152 -p ${WORLDTMP}/usr/lib >/dev/null
1155 ${WORLDTMP_MTREE} -f ${.CURDIR}/${_mtree} -p ${WORLDTMP} > /dev/null
1160 @echo "--------------------------------------------------------------"
1162 @echo "--------------------------------------------------------------"
1167 ${_+_}cd ${.CURDIR}; ${LIB${LIBCOMPAT}WMAKE} _NO_INCLUDE_COMPILERMK=t -f Makefile.inc1 ${CLEANDIR}
1175 @echo "--------------------------------------------------------------"
1177 @echo "--------------------------------------------------------------"
1179 _build-tools:
1181 @echo "--------------------------------------------------------------"
1183 @echo "--------------------------------------------------------------"
1184 ${_+_}cd ${.CURDIR}; ${TMAKE} build-tools
1185 _cross-tools:
1187 @echo "--------------------------------------------------------------"
1189 @echo "--------------------------------------------------------------"
1190 @rm -f ${OBJTOP}/toolchain-metadata.mk
1191 ${_+_}cd ${.CURDIR}; ${XMAKE} cross-tools
1192 ${_+_}cd ${.CURDIR}; ${XMAKE} kernel-tools
1193 _build-metadata:
1195 @echo "--------------------------------------------------------------"
1197 @echo "--------------------------------------------------------------"
1198 ${_+_}cd ${.CURDIR}; ${WMAKE} toolchain-metadata.mk
1199 ${_+_}cd ${.CURDIR}; ${WMAKE} host-osreldate.h
1202 @echo "--------------------------------------------------------------"
1204 @echo "--------------------------------------------------------------"
1212 ${_+_}cd ${.CURDIR}; ${WMAKE} test-includes
1215 @echo "--------------------------------------------------------------"
1217 @echo "--------------------------------------------------------------"
1219 ${WMAKE} -DNO_FSCHG MK_HTML=no MK_MAN=no \
1224 @echo "--------------------------------------------------------------"
1226 @echo "--------------------------------------------------------------"
1233 WMAKE_TGTS+= _bootstrap-tools
1239 WMAKE_TGTS+= _build-tools _cross-tools
1240 WMAKE_TGTS+= _build-metadata
1270 _ncpu_cmd=sysctl -n hw.ncpu 2>/dev/null || nproc 2>/dev/null || echo unknown
1273 @echo "--------------------------------------------------------------"
1275 @echo "--------------------------------------------------------------"
1279 @echo "--------------------------------------------------------------"
1281 @seconds=$$(($$(date '+%s') - ${_BUILDWORLD_START})); \
1282 echo ">>> World built in $$seconds seconds, ncpu: $$(${_ncpu_cmd})${.MAKE.JOBS:S/^/, make -j/}"
1283 @echo "--------------------------------------------------------------"
1295 .if ${.MAKEFLAGS:M-j}
1296 .error The buildenv target is incompatible with -j
1320 .if make(kernel-toolchain)
1323 kernel-toolchain: ${KERNEL_TOOLCHAIN_TGTS} .PHONY
1332 @echo "--------------------------------------------------------------"
1334 @echo "--------------------------------------------------------------"
1336 @echo "--------------------------------------------------------------"
1338 @echo "--------------------------------------------------------------"
1370 .if exists(${LOCALBASE}/sbin/pkg-static)
1371 @if ${LOCALBASE}/sbin/pkg-static info -e ${PKG_NAME_PREFIX}-runtime; then \
1396 @if ! `id -u ${uid} >/dev/null 2>&1`; then \
1402 @if ! `find / -prune -group ${gid} >/dev/null 2>&1`; then \
1418 @if [ "`${OBJTOP}/rescue/rescue/rescue sh -c 'echo OK'`" != \
1458 # Non-base distributions produced by the base system
1475 mkdir -p ${INSTALLTMP}
1484 if [ -z "${CROSSBUILD_HOST}" ] ; then \
1485 libs=$$(ldd -f "%o %p\n" -f "%o %p\n" $$progs 2>/dev/null | sort -u | grep -Ev '\[.*]' | \
1487 set -- $$line; \
1497 cp -R $${PATH_LOCALE:-"/usr/share/locale"} ${INSTALLTMP}/locale
1499 -mkdir -p ${METALOG:H}
1504 -mkdir ${DESTDIR}/${DISTDIR}/${dist}
1505 ${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.root.dist \
1506 -p ${DESTDIR}/${DISTDIR}/${dist} >/dev/null
1507 ${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.usr.dist \
1508 -p ${DESTDIR}/${DISTDIR}/${dist}/usr >/dev/null
1509 ${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.include.dist \
1510 -p ${DESTDIR}/${DISTDIR}/${dist}/usr/include >/dev/null
1512 -mkdir ${DESTDIR}/${DISTDIR}/${dist}/usr/include/${d}
1515 ${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.debug.dist \
1516 -p ${DESTDIR}/${DISTDIR}/${dist}/usr/lib >/dev/null
1519 ${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.lib${libcompat}.dist \
1520 -p ${DESTDIR}/${DISTDIR}/${dist}/usr >/dev/null
1522 ${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.lib${libcompat}.dist \
1523 -p ${DESTDIR}/${DISTDIR}/${dist}/usr/lib/debug/usr >/dev/null
1527 -mkdir -p ${DESTDIR}/${DISTDIR}/${dist}${TESTSBASE}
1528 ${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.tests.dist \
1529 -p ${DESTDIR}/${DISTDIR}/${dist}${TESTSBASE} >/dev/null
1531 ${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.tests.dist \
1532 -p ${DESTDIR}/${DISTDIR}/${dist}/usr/lib/debug${TESTSBASE} >/dev/null
1535 ${IMAKEENV} ${DISTR_MTREE} -C -f ${.CURDIR}/etc/mtree/BSD.root.dist | \
1536 sed -e 's#^\./#./${dist}/#' >> ${METALOG}
1537 ${IMAKEENV} ${DISTR_MTREE} -C -f ${.CURDIR}/etc/mtree/BSD.usr.dist | \
1538 sed -e 's#^\./#./${dist}/usr/#' >> ${METALOG}
1539 ${IMAKEENV} ${DISTR_MTREE} -C -f ${.CURDIR}/etc/mtree/BSD.include.dist | \
1540 sed -e 's#^\./#./${dist}/usr/include/#' >> ${METALOG}
1545 ${IMAKEENV} ${DISTR_MTREE} -C -f ${.CURDIR}/etc/mtree/BSD.lib${libcompat}.dist | \
1546 sed -e 's#^\./#./${dist}/usr/#' >> ${METALOG}
1549 -mkdir ${DESTDIR}/${DISTDIR}/base
1553 LOCAL_MTREE=${LOCAL_MTREE:Q} distrib-dirs
1557 ${IMAKEENV} rm -rf ${INSTALLTMP}
1565 find ${DESTDIR}/${DISTDIR}/${dist} -mindepth 1 -type d -empty -delete
1574 find ./${dist}${path} | ${METALOG_SORT_CMD} -u ${METALOG} - | \
1584 ${TAR_CMD} cvf - --exclude usr/lib/debug \
1591 ${TAR_CMD} cvf - @${DESTDIR}/${DISTDIR}/${dist}.debug.meta | \
1592 ${XZ_CMD} > ${PACKAGEDIR}/${dist}-dbg.txz
1599 # Ensure no regressions in self-includeability of sys/*.h and net*/*.h
1600 test-includes: .PHONY
1601 ${_+_}cd ${.CURDIR}/tools/build/test-includes; \
1602 ${WMAKEENV} ${MAKE} ${WORLD_FLAGS} DESTDIR=${WORLDTMP} test-includes
1619 sysent-${_dir}: .PHONY
1620 @echo "${MAKE} -C ${.CURDIR}/${_dir} sysent"
1621 ${_+_}@env PATH=${_sysent_PATH:Q} ${MAKE} -C ${.CURDIR}/${_dir} sysent
1623 sysent: sysent-${_dir}
1634 @echo "--------------------------------------------------------------"
1636 @echo "--------------------------------------------------------------"
1637 ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 \
1640 @echo "--------------------------------------------------------------"
1642 @echo "--------------------------------------------------------------"
1643 ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 \
1647 @echo "--------------------------------------------------------------"
1649 @echo "--------------------------------------------------------------"
1650 ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install
1652 ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install${libcompat}
1654 @echo "--------------------------------------------------------------"
1656 @seconds=$$(($$(date '+%s') - ${_INSTALLWORLD_START})); \
1657 …> Install world completed in $$seconds seconds, ncpu: $$(${_ncpu_cmd})${.MAKE.JOBS:S/^/, make -j/}"
1658 @echo "--------------------------------------------------------------"
1661 @echo "--------------------------------------------------------------"
1663 @echo "--------------------------------------------------------------"
1664 ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 distribute
1666 ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 distribute${libcompat} \
1670 distrib-dirs distribution: .MAKE .PHONY
1675 ${MAKE} -f Makefile.inc1 ${IMAKE_INSTALL} \
1684 ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 _worldtmp
1685 ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 _legacy
1686 ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 _bootstrap-tools \
1688 ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 _obj
1689 ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 buildconfig
1690 ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 everything \
1694 @echo "--------------------------------------------------------------"
1696 @echo "--------------------------------------------------------------"
1697 ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 distrib-dirs
1698 @echo "--------------------------------------------------------------"
1700 @echo "--------------------------------------------------------------"
1701 ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 distribution
1713 # we're in kernel-land. Since only TARGET_ARCH is (expected) to
1714 # be set to cross-build, we have to make sure TARGET is set
1721 # Shortcut for KERNCONF=Blah -DKERNFAST is now KERNFAST=Blah
1737 .for _k in ${GENERIC_KERNCONF} MINIMAL${GENERIC_KERNCONF_SUFX_${TARGET_ARCH}} ${GENERIC_KERNCONF}-M…
1741 .if exists(${KERNCONFDIR}/${_k}-${_dbg})
1742 PKG_KERNCONF+= ${_k}-${_dbg}
1778 @if [ -e "${KRNLOBJDIR}/${KERNCONF}/modules${SRCTOP}/sys/modules/${m}/.depend.${f}.o" ] && \
1779 …grep -q ${f}.S "${KRNLOBJDIR}/${KERNCONF}/modules${SRCTOP}/sys/modules/${m}/.depend.${f}.o"; then \
1781 rm -f ${KRNLOBJDIR}/${KERNCONF}/modules${SRCTOP}/sys/modules/${m}/.depend.${f}.*; \
1807 @echo "--------------------------------------------------------------"
1809 @echo "--------------------------------------------------------------"
1811 mkdir -p ${KRNLOBJDIR}
1814 @echo "--------------------------------------------------------------"
1816 @echo "--------------------------------------------------------------"
1819 config ${CONFIGARGS} -d ${KRNLOBJDIR}/${_kernel} \
1820 -I '${KERNCONFDIR}' -I '${KRNLCONFDIR}' \
1825 @echo "--------------------------------------------------------------"
1827 @echo "--------------------------------------------------------------"
1834 @echo "--------------------------------------------------------------"
1836 @echo "--------------------------------------------------------------"
1840 @echo "--------------------------------------------------------------"
1842 @echo "--------------------------------------------------------------"
1843 ${_+_}cd ${.CURDIR}; ${KTMAKE} kernel-tools
1845 @echo "--------------------------------------------------------------"
1847 @echo "--------------------------------------------------------------"
1848 ${_+_}cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} all -DNO_MODULES_OBJ
1849 @echo "--------------------------------------------------------------"
1851 @echo "--------------------------------------------------------------"
1854 @seconds=$$(($$(date '+%s') - ${_BUILDKERNEL_START})); \
1855 …(s) ${BUILDKERNELS} built in $$seconds seconds, ncpu: $$(${_ncpu_cmd})${.MAKE.JOBS:S/^/, make -j/}"
1856 @echo "--------------------------------------------------------------"
1858 .if !make(packages) && !make(update-packages)
1861 # packages/update-packages installs kernels to a staging directory then builds
1880 @echo "--------------------------------------------------------------"
1882 @echo "--------------------------------------------------------------"
1887 @echo "--------------------------------------------------------------"
1889 @echo "--------------------------------------------------------------"
1890 @seconds=$$(($$(date '+%s') - ${_INSTALLKERNEL_START})); \
1891 …{INSTALLKERNEL} completed in $$seconds seconds, ncpu: $$(${_ncpu_cmd})${.MAKE.JOBS:S/^/, make -j/}"
1892 @echo "--------------------------------------------------------------"
1895 .for _kernel in ${BUILDKERNELS:[2..-1]}
1896 @echo "--------------------------------------------------------------"
1898 @echo "--------------------------------------------------------------"
1903 @echo "--------------------------------------------------------------"
1905 @echo "--------------------------------------------------------------"
1907 @seconds=$$(($$(date '+%s') - ${_INSTALLKERNEL_START})); \
1908 …${BUILDKERNELS} completed in $$seconds seconds, ncpu: $$(${_ncpu_cmd})${.MAKE.JOBS:S/^/, make -j/}"
1909 @echo "--------------------------------------------------------------"
1918 mkdir -p ${DESTDIR}/${DISTDIR}
1919 rm -f ${DESTDIR}/${DISTDIR}/kernel.premeta
1928 sed -e 's|^./kernel|.|' ${DESTDIR}/${DISTDIR}/kernel.premeta | \
1933 .for _kernel in ${BUILDKERNELS:[2..-1]}
1934 rm -f ${DESTDIR}/${DISTDIR}/kernel.${_kernel}.premeta
1944 sed -e "s|^./kernel.${_kernel}|.|" \
1954 ${TAR_CMD} cvf - --exclude '*.debug' \
1960 ${TAR_CMD} cvf - --include '*/*/*.debug' \
1962 ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/kernel-dbg.txz
1965 .for _kernel in ${BUILDKERNELS:[2..-1]}
1967 ${TAR_CMD} cvf - --exclude '*.debug' \
1972 ${TAR_CMD} cvf - --include '*/*/*.debug' \
1974 ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/kernel.${_kernel}-dbg.txz
1980 ${_+_}${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} DISTDIR=. distributekernel
1988 PKG_LEVEL?= -1
1989 PKG_CLEVEL?= ${"${PKG_FORMAT:Mtar}" != "":?:-l ${PKG_LEVEL}}
1994 .if make(create-*-packages*) || make(real-update-packages) || make(real-sign-packages)
1995 PKG_ABI!= ${PKG_CMD} -o ABI_FILE=${PKG_ABI_FILE} config ABI
1998 .ORDER: stage-packages create-packages
1999 .ORDER: create-packages create-world-packages
2000 .ORDER: create-packages create-source-packages
2001 .ORDER: create-packages create-kernel-packages
2002 .ORDER: create-packages sign-packages
2007 env - UNAME_r=${UNAME_r} PATH=$$PATH \
2008 make -C ${PORTSDIR}/ports-mgmt/pkg \
2017 PKG_BIN_VERSION!=${PKG_CMD} --version </dev/null 2>/dev/null |\
2018 awk -F. '/^[0-9.]+(-.*)?$$/ {print $$1 * 10000 + $$2 * 100 + $$3}'
2021 .if !defined(PKG_VERSION_FROM) && make(real-update-packages) && \
2051 ${_+_}${MAKE} -C ${.CURDIR} ${PKGMAKEARGS} real-packages
2053 update-packages: .PHONY
2054 ${_+_}${MAKE} -C ${.CURDIR} ${PKGMAKEARGS} real-update-packages
2056 package-pkg: _pkgbootstrap _repodir .PHONY
2059 rm -rf /tmp/ports.${TARGET} || :
2064 sh ${.CURDIR}/release/scripts/make-pkg-package.sh
2068 real-packages: stage-packages create-packages sign-packages .PHONY
2070 real-update-packages: stage-packages .PHONY
2071 ${_+_}${MAKE} -C ${.CURDIR} PKG_VERSION=${PKG_VERSION} create-packages
2074 @for pkg in ${PKG_VERSION_FROM_DIR}/${PKG_NAME_PREFIX}-*; do \
2075 pkgname=$$(pkg query -F $${pkg} '%n' | sed 's/${PKG_NAME_PREFIX}-\(.*\)/\1/') ; \
2076 newpkgname=${PKG_NAME_PREFIX}-$${pkgname}-${PKG_VERSION}.${PKG_EXT} ; \
2077 oldsum=$$(pkg query -F $${pkg} '%X') ; \
2078 if [ ! -f ${REPODIR}/${PKG_ABI}/${PKG_VERSION}/$${newpkgname} ]; then \
2081 newsum=$$(pkg query -F ${REPODIR}/${PKG_ABI}/${PKG_VERSION}/$${newpkgname} '%X') ; \
2082 if [ "${BRANCH_EXT_FROM}" = "${BRANCH_EXT}" -a "$${oldsum}" = "$${newsum}" ]; then \
2083 echo "==> Keeping old ${PKG_NAME_PREFIX}-$${pkgname}-${PKG_VERSION_FROM}.${PKG_EXT}" ; \
2093 ${_+_}${MAKE} -C ${.CURDIR} -f Makefile.inc1 PKG_VERSION=${PKG_VERSION} sign-packages
2095 stage-packages-world: .PHONY
2096 @mkdir -p ${WSTAGEDIR}
2098 ${MAKE} DESTDIR=${WSTAGEDIR} -DNO_ROOT stageworld
2100 stage-packages-kernel: .PHONY
2101 @mkdir -p ${KSTAGEDIR}
2103 ${MAKE} DESTDIR=${KSTAGEDIR} -DNO_ROOT stagekernel
2105 stage-packages-source: .PHONY
2106 @mkdir -p ${SSTAGEDIR};
2108 stage-packages: .PHONY stage-packages-world stage-packages-kernel stage-packages-source
2111 @mkdir -p ${REPODIR}
2113 create-packages-world: _pkgbootstrap _repodir .PHONY
2115 ${MAKE} -f Makefile.inc1 \
2117 PKG_VERSION=${PKG_VERSION} create-world-packages
2119 .ORDER: create-packages-world create-packages-sets
2120 .ORDER: create-packages-kernel create-packages-sets
2121 .ORDER: create-packages-source create-packages-sets
2122 create-packages-sets: _pkgbootstrap _repodir .PHONY
2124 ${MAKE} -f Makefile.inc1 \
2126 PKG_VERSION=${PKG_VERSION} create-sets-packages
2128 create-packages-kernel: _pkgbootstrap _repodir .PHONY
2130 ${MAKE} -f Makefile.inc1 \
2134 create-kernel-packages
2136 create-packages-kernel-repo: .PHONY create-packages-kernel sign-packages
2138 create-packages-world-repo: .PHONY create-packages-world sign-packages
2140 create-packages-sets-repo: .PHONY create-packages-sets sign-packages
2142 create-packages-source: _pkgbootstrap _repodir .PHONY
2144 ${MAKE} -f Makefile.inc1 \
2148 create-source-packages
2150 create-packages: .PHONY create-packages-world create-packages-kernel create-packages-source package
2152 create-source-src-package: _pkgbootstrap .PHONY
2153 rm -f ${SSTAGEDIR}/src.plist 2>/dev/null || :
2157 ${GIT_CMD} ls-files --recurse-submodules ":!:sys/" ) \
2159 ${SRCDIR}/release/packages/generate-ucl.lua \
2169 ${PKG_CMD} -o ABI=${PKG_ABI} \
2170 -o OSVERSION="${SRCRELDATE}" \
2171 create -f ${PKG_FORMAT} ${PKG_CLEVEL} -T${PKG_CTHREADS} \
2172 -M ${SSTAGEDIR}/src.ucl \
2173 -p ${SSTAGEDIR}/src.plist \
2174 -r ${SRCDIR} \
2175 -o ${REPODIR}/${PKG_ABI}/${PKG_OUTPUT_DIR}
2178 create-source-src-sys-package: _pkgbootstrap .PHONY
2179 rm -f ${SSTAGEDIR}/src-sys.plist 2>/dev/null || :
2183 ${GIT_CMD} ls-files --recurse-submodules "sys/" ) \
2184 > ${SSTAGEDIR}/src-sys.plist
2185 ${SRCDIR}/release/packages/generate-ucl.lua \
2186 PKGNAME "src-sys" \
2187 PKGGENNAME "src-sys" \
2194 ${SSTAGEDIR}/src-sys.ucl
2195 ${PKG_CMD} -o ABI=${PKG_ABI} \
2196 -o OSVERSION="${SRCRELDATE}" \
2197 create -f ${PKG_FORMAT} ${PKG_CLEVEL} -T${PKG_CTHREADS} \
2198 -M ${SSTAGEDIR}/src-sys.ucl \
2199 -p ${SSTAGEDIR}/src-sys.plist \
2200 -r ${SRCDIR} \
2201 -o ${REPODIR}/${PKG_ABI}/${PKG_OUTPUT_DIR}
2204 create-source-packages: .PHONY _pkgbootstrap create-source-src-package create-source-src-sys-package
2206 create-world-packages: _pkgbootstrap .PHONY
2207 @rm -f ${WSTAGEDIR}/*.plist 2>/dev/null || :
2210 awk -f ${SRCDIR}/release/scripts/mtree-to-plist.awk
2217 ${MAKE} -f Makefile.inc1 create-world-packages-jobs \
2221 .if make(create-world-packages-jobs)
2225 create-world-packages-jobs: .PHONY
2227 create-world-packages-jobs: create-world-package-${pkgname}
2228 create-world-package-${pkgname}: .PHONY
2229 @sh ${SRCDIR}/release/packages/generate-ucl.sh -o ${pkgname} \
2230 -s ${SRCDIR} -u ${WSTAGEDIR}/${pkgname}.ucl
2231 @awk -F\" ' \
2232 /^name/ { printf("===> Creating %s-", $$2); next } \
2235 ${PKG_CMD} -o ABI=${PKG_ABI} -o ALLOW_BASE_SHLIBS=yes \
2236 -o OSVERSION="${SRCRELDATE}" \
2237 create -f ${PKG_FORMAT} ${PKG_CLEVEL} -T${PKG_CTHREADS} \
2238 -M ${WSTAGEDIR}/${pkgname}.ucl \
2239 -p ${WSTAGEDIR}/${pkgname}.plist \
2240 -r ${WSTAGEDIR} \
2241 -o ${REPODIR}/${PKG_ABI}/${PKG_OUTPUT_DIR}
2244 create-sets-packages-jobs: .PHONY create-sets-packages
2245 create-sets-packages: .PHONY
2247 sh "${SRCDIR}/release/packages/create-sets.sh" "${SRCDIR}" \
2253 @for manifest in ${WSTAGEDIR}/set-*.ucl; do \
2254 echo "--> Processing manifest: $$manifest"; \
2255 ${PKG_CMD} -o ABI=${PKG_ABI} -o OSVERSION="${SRCRELDATE}" \
2256 create -f ${PKG_FORMAT} ${PKG_CLEVEL} -T${PKG_CTHREADS} \
2257 -M $$manifest \
2258 -o "${REPODIR}/${PKG_ABI}/${PKG_OUTPUT_DIR}" \
2262 _default_flavor= -default
2265 _debug=-dbg
2268 create-dtb-package: .PHONY
2269 @if [ -f ${KSTAGEDIR}/${DISTDIR}/dtb.plist ]; then \
2270 ${SRCDIR}/release/packages/generate-ucl.lua \
2280 awk -F\" ' \
2281 /name/ { printf("===> Creating %s-", $$2); next } \
2284 ${PKG_CMD} -o ABI=${PKG_ABI} -o ALLOW_BASE_SHLIBS=yes \
2285 -o OSVERSION="${SRCRELDATE}" \
2286 create -f ${PKG_FORMAT} ${PKG_CLEVEL} -T${PKG_CTHREADS} \
2287 -M ${KSTAGEDIR}/${DISTDIR}/dtb.ucl \
2288 -p ${KSTAGEDIR}/${DISTDIR}/dtb.plist \
2289 -r ${KSTAGEDIR}/${DISTDIR} \
2290 -o ${REPODIR}/${PKG_ABI}/${PKG_OUTPUT_DIR} ; \
2293 create-kernel-packages: .PHONY create-kernel-flavored-packages create-dtb-package
2294 create-kernel-flavored-packages: .PHONY
2295 .ORDER: create-kernel-flavored-packages create-dtb-package
2298 create-kernel-flavored-packages: create-kernel-packages-flavor${flavor:C,^""$,${_default_flavor},}
2299 create-kernel-packages-flavor${flavor:C,^""$,${_default_flavor},}: _pkgbootstrap .PHONY
2302 awk -f ${SRCDIR}/release/scripts/mtree-to-plist.awk \
2303 -v kernel=yes -v _kernconf=${INSTALLKERNEL} ; \
2304 ${SRCDIR}/release/packages/generate-ucl.lua \
2305 PKGNAME "kernel-${INSTALLKERNEL:tl}${flavor}" \
2317 awk -F\" ' \
2318 /name/ { printf("===> Creating %s-", $$2); next } \
2321 ${PKG_CMD} -o ABI=${PKG_ABI} -o ALLOW_BASE_SHLIBS=yes \
2322 -o OSVERSION="${SRCRELDATE}" \
2323 create -f ${PKG_FORMAT} ${PKG_CLEVEL} -T${PKG_CTHREADS} \
2324 -M ${KSTAGEDIR}/${DISTDIR}/kernel.${INSTALLKERNEL}${flavor}.ucl \
2325 -p ${KSTAGEDIR}/${DISTDIR}/kernel.${INSTALLKERNEL}${flavor}.plist \
2326 -r ${KSTAGEDIR}/${DISTDIR} \
2327 -o ${REPODIR}/${PKG_ABI}/${PKG_OUTPUT_DIR}
2330 create-kernel-packages: .PHONY
2334 . for _kernel in ${BUILDKERNELS:[2..-1]}
2337 _debug=-dbg
2340 create-kernel-packages: create-kernel-packages-extra-flavor${flavor:C,^""$,${_default_flavor},}-${_…
2341 create-kernel-packages-extra-flavor${flavor:C,^""$,${_default_flavor},}-${_kernel}: _pkgbootstrap .…
2344 awk -f ${SRCDIR}/release/scripts/mtree-to-plist.awk \
2345 -v kernel=yes -v _kernconf=${_kernel} ; \
2346 ${SRCDIR}/release/packages/generate-ucl.lua \
2347 PKGNAME "kernel-${_kernel:tl}${flavor}" \
2360 awk -F\" ' \
2361 /name/ { printf("===> Creating %s-", $$2); next } \
2364 ${PKG_CMD} -o ABI=${PKG_ABI} -o ALLOW_BASE_SHLIBS=yes \
2365 -o OSVERSION="${SRCRELDATE}" \
2366 create -f ${PKG_FORMAT} ${PKG_CLEVEL} -T${PKG_CTHREADS} \
2367 -M ${KSTAGEDIR}/kernel.${_kernel}/kernel.${_kernel}${flavor}.ucl \
2368 -p ${KSTAGEDIR}/kernel.${_kernel}/kernel.${_kernel}${flavor}.plist \
2369 -r ${KSTAGEDIR}/kernel.${_kernel} \
2370 -o ${REPODIR}/${PKG_ABI}/${PKG_OUTPUT_DIR}
2376 sign-packages: .PHONY
2378 ${MAKE} -f Makefile.inc1 \
2381 real-sign-packages
2383 real-sign-packages: _pkgbootstrap .PHONY
2385 @${PKG_CMD} -o ABI=${PKG_ABI} -o OSVERSION="${SRCRELDATE}" \
2386 -o WORKERS_COUNT=${PKG_WORKERS_COUNT} repo \
2387 -m ${WSTAGEDIR}/meta \
2388 -o ${REPODIR}/${PKG_ABI}/${PKG_VERSION} \
2392 ln -hfs ${PKG_OUTPUT_DIR} latest
2401 @if [ ! -x "${LOCALBASE}/bin/kyua" ] && [ ! -x "/usr/bin/kyua" ]; then \
2405 ${_+_}PATH="$$PATH:${LOCALBASE}/bin" kyua test -k ${TESTSBASE}/Kyuafile
2414 @if [ ! -x "${LOCALBASE}/bin/doxygen" ]; then \
2421 # ------------------------------------------------------------------------
2434 # which don't have the APIs required by the targets built in bootstrap-tools,
2435 # build-tools or cross-tools.
2448 if [ -z "${NO_OBJWALK}" ]; then ${MAKE} DIRPRFX=${_tool}/ obj; fi; \
2456 # bootstrap-tools: Build tools needed for compatibility. These are binaries that
2459 # libraries, augmented by -legacy, in addition to the libraries built during
2460 # bootstrap-tools.
2462 _bt= _bootstrap-tools
2470 # from the FreeBSD sources during the bootstrap-tools stage.
2471 # We want to build without the user's $PATH starting in the bootstrap-tools
2480 # $PATH during the bootstrap-tools stage.
2481 # When building on non-FreeBSD systems we can't assume that the host binaries
2515 # version of m4 (with pre-generated files) then use that to build the real m4.
2518 # For lex we also use the pre-gerated files since we would otherwise need to
2522 _m4= tools/build/bootstrap-m4 usr.bin/m4
2523 ${_bt}-tools/build/bootstrap-m4: ${_bt}-usr.bin/lex ${_bt}-lib/libopenbsd ${_bt}-usr.bin/yacc
2524 ${_bt}-usr.bin/m4: ${_bt}-lib/libopenbsd ${_bt}-usr.bin/yacc ${_bt}-usr.bin/lex ${_bt}-tools/build/…
2525 _bt_m4_depend=${_bt}-usr.bin/m4
2526 _bt_lex_depend=${_bt}-usr.bin/lex ${_bt_m4_depend}
2532 # r296685 fix cross-endian objcopy
2540 ${_bt}-lib/libelf: ${_bt_m4_depend}
2541 ${_bt}-lib/libdwarf: ${_bt_m4_depend}
2542 _bt_libelf_depend=${_bt}-lib/libelf
2546 ${_bt}-lib/libkldelf: ${_bt_libelf_depend}
2547 _bt_libkldelf_depend=${_bt}-lib/libkldelf
2550 ${_bt}-usr.sbin/kldxref: ${_bt_libelf_depend} ${_bt_libkldelf_depend}
2553 # 13.0-CURRENT cycle, thus needs to be built on -older releases and stable
2556 ${_bt}-libexec/flua: ${_bt}-lib/liblua
2560 ${_bt}-libexec/flua: ${_bt}-lib/libmd ${_bt}-lib/libucl ${_bt}-lib/libyaml
2564 # r245440 mtree -N support added
2571 ${_bt}-lib/libnetbsd: ${_bt}-lib/libmd
2572 ${_bt}-usr.sbin/nmtree: ${_bt}-lib/libnetbsd
2577 # r246097: log addition login.conf.db, passwd, pwd.db, and spwd.db with cat -l
2584 # r277259 crunchide: Correct 64-bit section header offset
2585 # r281674 crunchide: always include both 32- and 64-bit ELF support
2592 # 1400052, 1300526, 1203507: Removed -dc from linker invocation
2615 ${_bt}-usr.sbin/makefs: ${_bt}-lib/libnetbsd
2619 ${_bt}-usr.sbin/makefs: ${_bt}-lib/libsbuf
2641 # llvm-tblgen is also needed for various llvm binutils (e.g. objcopy).
2647 usr.bin/clang/llvm-min-tblgen \
2648 usr.bin/clang/llvm-tblgen
2652 _clang_tblgen+= usr.bin/clang/clang-tblgen
2655 _clang_tblgen+= usr.bin/clang/lldb-tblgen
2657 ${_bt}-usr.bin/clang/clang-tblgen: ${_bt}-lib/clang/libllvmminimal
2658 ${_bt}-usr.bin/clang/lldb-tblgen: ${_bt}-lib/clang/libllvmminimal
2659 ${_bt}-usr.bin/clang/llvm-min-tblgen: ${_bt}-lib/clang/libllvmminimal
2660 ${_bt}-usr.bin/clang/llvm-tblgen: ${_bt}-lib/clang/libllvmminimal
2661 ${_bt}-usr.bin/clang/llvm-tblgen: ${_bt}-usr.bin/clang/llvm-min-tblgen
2664 # C.UTF-8 is always built in share/ctypes and we need localedef for that.
2666 ${_bt}-usr.bin/localedef: ${_bt}-usr.bin/yacc ${_bt_lex_depend}
2671 ${_bt}-usr.bin/mkesdb: ${_bt}-usr.bin/yacc ${_bt_lex_depend}
2672 ${_bt}-usr.bin/mkcsmapper: ${_bt}-usr.bin/yacc ${_bt_lex_depend}
2678 krb5/util/build-tools \
2691 kerberos5/tools/make-roken \
2699 .ORDER: ${_kerberos5_bootstrap_tools:C/^/${_bt}-/g}
2701 ${_bt}-${_tool}: ${_bt}-usr.bin/yacc ${_bt_lex_depend}
2705 ${_bt}-usr.bin/mandoc: ${_bt}-lib/libopenbsd
2713 # subdirectory and comma-separated list of files.
2737 # bootstrap ldd on non-FreeBSD systems
2747 # When building on non-FreeBSD, install a fake chflags instead since the
2749 # are install with -DNO_ROOT.
2750 _other_bootstrap_tools+=tools/build/cross-build/fake_chflags
2774 ${_bt}-usr.sbin/certctl: ${_bt}-secure/lib/libcrypto
2784 ${_bt}-usr.bin/awk: ${_bt_lex_depend} ${_bt}-usr.bin/yacc
2785 ${_bt}-bin/expr: ${_bt_lex_depend} ${_bt}-usr.bin/yacc
2787 ${_bt}-usr.sbin/config: ${_bt}-usr.bin/file2c ${_bt_lex_depend}
2790 # `make legacy` step. Not adding a link to make is important on non-FreeBSD
2796 ${_bt}-usr.bin/grep: ${_bt}-lib/libbz2
2800 ${_bt}-lib/libdwarf: ${_bt}-lib/libz
2804 ${_bt}-lib/libroken: ${_bt}-lib/libcrypt
2818 ${_bt}-links: .PHONY
2821 ${_bt}-link-${_tool}: .PHONY
2822 @rm -f "${WORLDTMP}/legacy/bin/${_tool}"; \
2824 if [ ! -e "$${source_path}" ] ; then \
2827 install -p "$${source_path}" "${WORLDTMP}/legacy/bin/${_tool}"
2828 ${_bt}-links: ${_bt}-link-${_tool}
2831 bootstrap-tools: ${_bt}-links .PHONY
2833 # Please document (add comment) why something is in 'bootstrap-tools'.
2834 # Try to bound the building of the bootstrap-tool to just the
2879 # but the target may have been defined earlier to express dependencies -- thus,
2881 .if !commands(${_bt}-${_tool})
2882 ${_bt}-${_tool}: ${_bt}-links .PHONY .MAKE
2885 if [ -z "${NO_OBJWALK}" ]; then ${MAKE} DIRPRFX=${_tool}/ obj; fi; \
2891 bootstrap-tools: ${_bt}-${_tool}
2894 .if target(${_bt}-lib/libmd)
2897 ${_bt}-usr.bin/sort: ${_bt}-lib/libmd
2898 ${_bt}-usr.bin/xinstall: ${_bt}-lib/libmd
2899 ${_bt}-sbin/md5: ${_bt}-lib/libmd
2904 # build-tools: Build special purpose build tools
2911 # rescue includes programs that have build-tools targets
2923 _jevents=lib/libpmc/pmu-events
2926 # kernel-toolchain skips _cleanobj, so handle cleaning up previous
2927 # build-tools directories if needed.
2928 .if ${MK_CLEAN} == "yes" && make(kernel-toolchain)
2943 build-tools_${_tool}: .PHONY
2944 ${_+_}@${ECHODIR} "===> ${_tool} (${_bt_clean:D${_bt_clean},}obj,build-tools)"; \
2946 if [ -n "${_bt_clean}" ]; then ${MAKE} DIRPRFX=${_tool}/ ${_bt_clean}; fi; \
2947 if [ -z "${NO_OBJWALK}" ]; then ${MAKE} DIRPRFX=${_tool}/ obj; fi; \
2948 ${MAKE} DIRPRFX=${_tool}/ build-tools
2949 build-tools: build-tools_${_tool}
2953 # kernel-tools: Build kernel-building tools
2955 kernel-tools: .PHONY
2956 mkdir -p ${WORLDTMP}/usr
2957 ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.usr.dist \
2958 -p ${WORLDTMP}/usr >/dev/null
2961 # cross-tools: All the tools needed to build the rest of the system after
2971 # Rebuild ctfconvert and ctfmerge to avoid difficult-to-diagnose failures
2980 # because llvm-objcopy is currently not capable of translating ELF to PE32+,
2993 # cross-build on a FreeBSD 10 host:
3015 cross-tools: .MAKE .PHONY
3028 if [ -z "${NO_OBJWALK}" ]; then ${MAKE} DIRPRFX=${_tool}/ obj; fi; \
3034 # native-xtools is the current target for qemu-user cross builds of ports
3043 NXTP?= /nxb-bin
3118 # XXX: native-xtools passes along ${NXBDIRS} in SUBDIR_OVERRIDE that needs
3127 -DNO_SHARED \
3128 -DNO_CPU_CFLAGS \
3129 -DNO_PIC \
3156 .if make(native-xtools*) && \
3162 NXBTMAKE= ${NXBMAKEENV} ${MAKE} ${NXBMAKEARGS:N-DNO_PIC:N-DNO_SHARED} \
3164 # For 'everything' we want to produce native binaries (hence -target to
3178 NXBMAKE+= ${NXBMAKEENV} ${MAKE} -f Makefile.inc1 ${NXBMAKEARGS} \
3183 # invoke a sub-make to reevaluate MK_CLANG, etc, for NXBDIRS.
3185 # Need to avoid the -isystem logic when using clang as an external toolchain
3188 native-xtools: .PHONY
3191 ${_+_}cd ${.CURDIR}; ${NXBTMAKE} kernel-toolchain
3195 # polluting the cross-compiler build. The LLVM libs are skipped
3204 @echo ">> native-xtools done. Use 'make native-xtools-install' to install to a given DESTDIR"
3206 native-xtools-install: .PHONY
3207 mkdir -p ${NXBDESTDIR}/bin ${NXBDESTDIR}/sbin ${NXBDESTDIR}/usr
3208 ${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.usr.dist \
3209 -p ${NXBDESTDIR}/usr >/dev/null
3210 ${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.include.dist \
3211 -p ${NXBDESTDIR}/usr/include >/dev/null
3213 mkdir -p ${NXBDESTDIR}/usr/include/${d}
3217 -DNO_ROOT \
3221 # hierarchy - ensure that all the needed directories are present
3224 ${_+_}cd ${.CURDIR}/etc; ${HMAKE} distrib-dirs
3227 # libraries - build all libraries, and install them under ${DESTDIR}.
3235 ${MAKE} -f Makefile.inc1 _prereq_libs; \
3236 ${MAKE} -f Makefile.inc1 _startup_libs; \
3237 ${MAKE} -f Makefile.inc1 _prebuild_libs -DLIBCRYPTO_WITHOUT_SUBDIRS; \
3238 ${MAKE} -f Makefile.inc1 _generic_libs
3249 _prereq_libs+= lib/libclang_rt/asan-preinit
3516 _krb5_util_build_tools= krb5/util/build-tools
3544 _libsqlite3= lib/libsqlite3
3568 if [ -z "${NO_OBJWALK}" ]; then ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ obj; fi; \
3569 ${MAKE} MK_TESTS=no -DNO_PIC \
3571 ${MAKE} MK_TESTS=no -DNO_PIC \
3581 if [ -z "${NO_OBJWALK}" ]; then ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ obj; fi; \
3594 # that running 'make all' from the top-level, especially with a SUBDIR_OVERRIDE
3599 # avoid trashing a system if it crashes mid-install.
3606 .if make(check-old) || make(check-old-dirs) || \
3607 make(check-old-files) || make(check-old-libs) || \
3608 make(delete-old) || make(delete-old-dirs) || \
3609 make(delete-old-files) || make(delete-old-libs) || \
3610 make(list-old-dirs) || make(list-old-files) || make(list-old-libs)
3624 RM_I=-i
3626 RM_I=-fv
3629 list-old-files: .PHONY
3631 ${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \
3632 -V "OLD_FILES:ts\n" -V "OLD_FILES:Musr/share/*.gz:R:ts\n" \
3633 -V "MOVED_LIBS:ts\n" \
3634 ${_ALL_libcompats:@v@-V "OLD_FILES:Mlib/*.so.*:S,^lib,usr/lib$v,:ts\n"@} \
3635 ${_ALL_libcompats:@v@-V "OLD_FILES:Musr/lib/*:S,^usr/lib,usr/lib$v,:ts\n"@} | \
3638 delete-old-files: .PHONY
3647 ${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} list-old-files | \
3649 if [ -f "${DESTDIR}/$${file}" -o -L "${DESTDIR}/$${file}" ]; then \
3650 chflags noschg "${DESTDIR}/$${file}" 2>/dev/null || true; \
3654 if ! [ -e "${DESTDIR}/$${file}" ] && [ -f \
3664 …find ${DESTDIR}/usr/share/man ${DESTDIR}/usr/share/openssl/man ! -type d ! -name \*.gz 2>/dev/null…
3666 if [ -e "$${manpage}.gz" ]; then \
3673 …find ${DESTDIR}/usr/share/man ${DESTDIR}/usr/share/openssl/man ! -type d ! -name \*.gz 2>/dev/null…
3675 if [ -e "$${manpage}.gz" ]; then \
3682 …find -E /usr/share/man/man4/ -mindepth 1 -type d ! -regex '.*/(${MAN_ARCH:C/[[:space:]]+/|/gW})' |…
3684 find $$dir ! -type d -exec rm ${RM_I} {} + <&3; \
3689 check-old-files: .PHONY
3692 ${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} list-old-files | \
3694 if [ -f "${DESTDIR}/$${file}" -o -L "${DESTDIR}/$${file}" ]; then \
3698 if [ -f "${DESTDIR}${DEBUGDIR}/$${file}.$${ext}" ]; then \
3705 …@find ${DESTDIR}/usr/share/man ${DESTDIR}/usr/share/openssl/man ! -type d ! -name \*.gz 2>/dev/nul…
3707 if [ -e "$${manpage}.gz" ]; then \
3713 …@find ${DESTDIR}/usr/share/man ${DESTDIR}/usr/share/openssl/man ! -type d ! -name \*.gz 2>/dev/nul…
3715 if [ -e "$${manpage}.gz" ]; then \
3721 …@find -E /usr/share/man/man4/ -mindepth 1 -type d ! -regex '.*/(${MAN_ARCH:C/[[:space:]]+/|/gW})' …
3723 find $$dir ! -type d; \
3727 list-old-libs: .PHONY
3729 ${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \
3730 -V "OLD_LIBS:ts\n" \
3731 ${_ALL_libcompats:@v@-V "OLD_LIBS:Mlib/*:S,^lib,usr/lib$v,:ts\n"@} \
3732 ${_ALL_libcompats:@v@-V "OLD_LIBS:Musr/lib/*:S,^usr/lib,usr/lib$v,:ts\n"@} \
3733 ${_ALL_libcompats:@v@-V "OLD_LIBS:Mlib/casper/*:S,^lib/casper,usr/lib$v,:ts\n"@} | \
3736 delete-old-libs: .PHONY
3741 ${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} list-old-libs | \
3743 if [ -f "${DESTDIR}/$${file}" -o -L "${DESTDIR}/$${file}" ]; then \
3744 chflags noschg "${DESTDIR}/$${file}" 2>/dev/null || true; \
3748 if ! [ -e "${DESTDIR}/$${file}" ] && [ -f \
3757 check-old-libs: .PHONY
3760 ${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} list-old-libs | \
3762 if [ -f "${DESTDIR}/$${file}" -o -L "${DESTDIR}/$${file}" ]; then \
3766 if [ -f "${DESTDIR}${DEBUGDIR}/$${file}.$${ext}" ]; then \
3772 list-old-dirs: .PHONY
3774 ${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \
3775 -V "OLD_DIRS:ts\n" | sort -r
3777 delete-old-dirs: .PHONY
3780 ${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} list-old-dirs | \
3782 if [ -d "${DESTDIR}/$${dir}" ]; then \
3783 rmdir -v "${DESTDIR}/$${dir}" || true; \
3784 elif [ -L "${DESTDIR}/$${dir}" ]; then \
3787 if [ -d "${DESTDIR}${DEBUGDIR}/$${dir}" ]; then \
3788 rmdir -v "${DESTDIR}${DEBUGDIR}/$${dir}" || true; \
3789 elif [ -L "${DESTDIR}${DEBUGDIR}/$${dir}" ]; then \
3795 check-old-dirs: .PHONY
3798 ${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} list-old-dirs | \
3800 if [ -d "${DESTDIR}/$${dir}" ]; then \
3802 elif [ -L "${DESTDIR}/$${dir}" ]; then \
3805 if [ -d "${DESTDIR}${DEBUGDIR}/$${dir}" ]; then \
3807 elif [ -L "${DESTDIR}${DEBUGDIR}/$${dir}" ]; then \
3812 delete-old: delete-old-files delete-old-dirs .PHONY
3813 @echo "To remove old libraries run '${MAKE_CMD} delete-old-libs'."
3815 check-old: check-old-files check-old-libs check-old-dirs .PHONY
3816 @echo "To remove old files and directories run '${MAKE_CMD} delete-old'."
3817 @echo "To remove old libraries run '${MAKE_CMD} delete-old-libs'."
3822 # showconfig - show build configuration.
3827 …@(${MAKE} -n -f ${.CURDIR}/sys/conf/kern.opts.mk -V dummy -dg1 UPDATE_DEPENDFILE=no NO_OBJ=yes MAC…
3828 …${MAKE} -n -f ${.CURDIR}/share/mk/src.opts.mk -V dummy -dg1 UPDATE_DEPENDFILE=no NO_OBJ=yes MACHIN…
3829 grep -E '^(MK|OPT)_[A-Z]' | sort -u
3885 -(cd ${BW_CANONICALOBJDIR} && rm -rf *)
3886 -chflags -R 0 ${BW_CANONICALOBJDIR}
3887 -(cd ${BW_CANONICALOBJDIR} && rm -rf *)
3903 NOFUN=-DNO_FSCHG MK_HTML=no \
3909 XDDIR=${TARGET_ARCH}-freebsd
3928 # GCC requires -isystem and -L when using a cross-compiler. --sysroot
3929 # won't set header path and -L is used to ensure the base library path
3931 CD2CFLAGS+= -isystem ${XDDESTDIR}/usr/include -L${XDDESTDIR}/usr/lib
3932 # GCC requires -B to find /usr/lib/crti.o when using a cross-compiler
3933 # combined with --sysroot.
3934 CD2CFLAGS+= -B${XDDESTDIR}/usr/lib
3938 CD2CXXFLAGS+= -isystem ${XDDESTDIR}/usr/include/c++/v1 -std=c++11 \
3939 -nostdinc++
3942 CD2CFLAGS+= --sysroot=${XDDESTDIR}/
3952 # Don't rebuild build-tools targets during normal build.
3957 .ORDER: xdev-build xdev-install xdev-links
3958 xdev: xdev-build xdev-install .PHONY
3960 .ORDER: _xb-worldtmp _xb-bootstrap-tools _xb-build-tools _xb-cross-tools
3961 xdev-build: _xb-worldtmp _xb-bootstrap-tools _xb-build-tools _xb-cross-tools .PHONY
3963 _xb-worldtmp: .PHONY
3964 mkdir -p ${CDTMP}/usr
3965 ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.usr.dist \
3966 -p ${CDTMP}/usr >/dev/null
3968 _xb-bootstrap-tools: .PHONY
3974 if [ -z "${NO_OBJWALK}" ]; then ${CDMAKE} DIRPRFX=${_tool}/ obj; fi; \
3979 _xb-build-tools: .PHONY
3981 ${CDBENV} ${MAKE} ${CDMAKEARGS} -f Makefile.inc1 ${NOFUN} build-tools
3990 _xb-cross-tools: .PHONY
3994 if [ -z "${NO_OBJWALK}" ]; then ${CDMAKE} DIRPRFX=${_tool}/ obj; fi; \
3998 _xi-mtree: .PHONY
4000 mkdir -p ${XDDESTDIR}
4001 ${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.root.dist \
4002 -p ${XDDESTDIR} >/dev/null
4003 ${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.usr.dist \
4004 -p ${XDDESTDIR}/usr >/dev/null
4005 ${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.include.dist \
4006 -p ${XDDESTDIR}/usr/include >/dev/null
4008 mkdir -p ${XDDESTDIR}/usr/include/${d}
4011 ${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.lib${libcompat}.dist \
4012 -p ${XDDESTDIR}/usr >/dev/null
4015 mkdir -p ${XDDESTDIR}${TESTSBASE}
4016 ${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.tests.dist \
4017 -p ${XDDESTDIR}${TESTSBASE} >/dev/null
4020 .ORDER: xdev-build _xi-mtree _xi-cross-tools _xi-includes _xi-libraries
4021 xdev-install: xdev-build _xi-mtree _xi-cross-tools _xi-includes _xi-libraries .PHONY
4023 _xi-cross-tools: .PHONY
4024 @echo "_xi-cross-tools"
4031 _xi-includes: .PHONY
4033 ${_+_}cd ${.CURDIR}; ${CD2MAKE} -f Makefile.inc1 _obj \
4036 ${_+_}cd ${.CURDIR}; ${CD2MAKE} -f Makefile.inc1 includes \
4039 _xi-libraries: .PHONY
4040 ${_+_}cd ${.CURDIR}; ${CD2MAKE} -f Makefile.inc1 libraries \
4043 xdev-links: .PHONY
4045 mkdir -p ../../../../usr/bin; \
4047 ln -sf ../../${XDTP}/usr/bin/$$i \
4048 ../../../../usr/bin/${XDDIR}-$$i; \
4049 ln -sf ../../${XDTP}/usr/bin/$$i \
4050 ../../../../usr/bin/${XDDIR}${_REVISION}-$$i; \