Changeset View
Changeset View
Standalone View
Standalone View
Makefile.inc1
Show All 31 Lines | |||||
# KERNEL_FLAGS= additional flags to pass to make(1) during buildkernel | # KERNEL_FLAGS= additional flags to pass to make(1) during buildkernel | ||||
# SUBDIR_OVERRIDE="list of dirs" to build rather than everything. | # SUBDIR_OVERRIDE="list of dirs" to build rather than everything. | ||||
# All libraries and includes, and some build tools will still build. | # All libraries and includes, and some build tools will still build. | ||||
# | # | ||||
# The intended user-driven targets are: | # The intended user-driven targets are: | ||||
# buildworld - rebuild *everything*, including glue to help do upgrades | # buildworld - rebuild *everything*, including glue to help do upgrades | ||||
# installworld- install everything built by "buildworld" | # installworld- install everything built by "buildworld" | ||||
# checkworld - run test suite on installed world | |||||
# doxygen - build API documentation of the kernel | # doxygen - build API documentation of the kernel | ||||
# update - convenient way to update your source tree (eg: svn/svnup) | # update - convenient way to update your source tree (eg: svn/svnup) | ||||
# | # | ||||
# Standard targets (not defined here) are documented in the makefiles in | # Standard targets (not defined here) are documented in the makefiles in | ||||
# /usr/share/mk. These include: | # /usr/share/mk. These include: | ||||
# obj depend all install clean cleandepend cleanobj | # obj depend all install clean cleandepend cleanobj | ||||
.if !defined(TARGET) || !defined(TARGET_ARCH) | .if !defined(TARGET) || !defined(TARGET_ARCH) | ||||
.error "Both TARGET and TARGET_ARCH must be defined." | .error "Both TARGET and TARGET_ARCH must be defined." | ||||
.endif | .endif | ||||
LOCALBASE?= /usr/local | |||||
# Cross toolchain changes must be in effect before bsd.compiler.mk | # Cross toolchain changes must be in effect before bsd.compiler.mk | ||||
# so that gets the right CC, and pass CROSS_TOOLCHAIN to submakes. | # so that gets the right CC, and pass CROSS_TOOLCHAIN to submakes. | ||||
.if defined(CROSS_TOOLCHAIN) | .if defined(CROSS_TOOLCHAIN) | ||||
LOCALBASE?= /usr/local | |||||
.include "${LOCALBASE}/share/toolchains/${CROSS_TOOLCHAIN}.mk" | .include "${LOCALBASE}/share/toolchains/${CROSS_TOOLCHAIN}.mk" | ||||
CROSSENV+=CROSS_TOOLCHAIN="${CROSS_TOOLCHAIN}" | CROSSENV+=CROSS_TOOLCHAIN="${CROSS_TOOLCHAIN}" | ||||
.endif | .endif | ||||
.include <bsd.compiler.mk> # don't depend on src.opts.mk doing it | .include <bsd.compiler.mk> # don't depend on src.opts.mk doing it | ||||
.include "share/mk/src.opts.mk" | .include "share/mk/src.opts.mk" | ||||
# We must do lib/ and libexec/ before bin/ in case of a mid-install error to | # We must do lib/ and libexec/ before bin/ in case of a mid-install error to | ||||
# keep the users system reasonably usable. For static->dynamic root upgrades, | # keep the users system reasonably usable. For static->dynamic root upgrades, | ||||
▲ Show 20 Lines • Show All 1,216 Lines • ▼ Show 20 Lines | .for _kernel in ${BUILDKERNELS:[2..-1]} | ||||
cd ${DESTDIR}/${DISTDIR}/kernel.${_kernel}; \ | cd ${DESTDIR}/${DISTDIR}/kernel.${_kernel}; \ | ||||
tar cvf - . | \ | tar cvf - . | \ | ||||
${XZ_CMD} > ${PACKAGEDIR}/kernel.${_kernel}.txz | ${XZ_CMD} > ${PACKAGEDIR}/kernel.${_kernel}.txz | ||||
.endfor | .endfor | ||||
.endif | .endif | ||||
.endif | .endif | ||||
# | # | ||||
# | |||||
# checkworld | |||||
# | |||||
# Run test suite on installed world. | |||||
# | |||||
checkworld: .PHONY | |||||
@if [ ! -x ${LOCALBASE}/bin/kyua ]; then \ | |||||
echo "You need kyua (devel/kyua) to run the test suite." | /usr/bin/fmt; \ | |||||
exit 1; \ | |||||
fi | |||||
${_+_}${LOCALBASE}/bin/kyua test -k ${TESTSBASE}/Kyuafile | |||||
# | |||||
# | |||||
# doxygen | # doxygen | ||||
# | # | ||||
# Build the API documentation with doxygen | # Build the API documentation with doxygen | ||||
# | # | ||||
doxygen: .PHONY | doxygen: .PHONY | ||||
@if [ ! -x `/usr/bin/which doxygen` ]; then \ | @if [ ! -x ${LOCALBASE}/bin/doxygen ]; then \ | ||||
emaste: You can move LOCALBASE= and make this change first in a separate commit | |||||
echo "You need doxygen (devel/doxygen) to generate the API documentation of the kernel." | /usr/bin/fmt; \ | echo "You need doxygen (devel/doxygen) to generate the API documentation of the kernel." | /usr/bin/fmt; \ | ||||
exit 1; \ | exit 1; \ | ||||
fi | fi | ||||
${_+_}cd ${.CURDIR}/tools/kerneldoc/subsys; ${MAKE} obj all | ${_+_}cd ${.CURDIR}/tools/kerneldoc/subsys; ${MAKE} obj all | ||||
# | # | ||||
# update | # update | ||||
# | # | ||||
▲ Show 20 Lines • Show All 1,077 Lines • Show Last 20 Lines |
You can move LOCALBASE= and make this change first in a separate commit