Changeset View
Changeset View
Standalone View
Standalone View
Makefile.inc1
Show First 20 Lines • Show All 1,602 Lines • ▼ Show 20 Lines | |||||
.endif | .endif | ||||
INSTKERNNAME?= kernel | INSTKERNNAME?= kernel | ||||
KERNSRCDIR?= ${.CURDIR}/sys | KERNSRCDIR?= ${.CURDIR}/sys | ||||
KRNLCONFDIR= ${KERNSRCDIR}/${TARGET}/conf | KRNLCONFDIR= ${KERNSRCDIR}/${TARGET}/conf | ||||
KRNLOBJDIR= ${OBJTOP}${KERNSRCDIR:C,^${.CURDIR},,} | KRNLOBJDIR= ${OBJTOP}${KERNSRCDIR:C,^${.CURDIR},,} | ||||
KERNCONFDIR?= ${KRNLCONFDIR} | KERNCONFDIR?= ${KRNLCONFDIR} | ||||
.if ${MK_REPRODUCIBLE_BUILD} != "no" | |||||
REPRODUCIBLE_KRNLOBJDIR= ${REPRODUCIBLE_OBJTOP}${KERNSRCDIR:C,^${.CURDIR},,} | |||||
.else | |||||
REPRODUCIBLE_KRNLOBJDIR= ${KRNLOBJDIR} | |||||
.endif | |||||
BUILDKERNELS= | BUILDKERNELS= | ||||
INSTALLKERNEL= | INSTALLKERNEL= | ||||
.if defined(NO_INSTALLKERNEL) | .if defined(NO_INSTALLKERNEL) | ||||
# All of the BUILDKERNELS loops start at index 1. | # All of the BUILDKERNELS loops start at index 1. | ||||
BUILDKERNELS+= dummy | BUILDKERNELS+= dummy | ||||
.endif | .endif | ||||
.for _kernel in ${KERNCONF} | .for _kernel in ${KERNCONF} | ||||
.if !defined(_MKSHOWCONFIG) && exists(${KERNCONFDIR}/${_kernel}) | .if !defined(_MKSHOWCONFIG) && exists(${KERNCONFDIR}/${_kernel}) | ||||
▲ Show 20 Lines • Show All 66 Lines • ▼ Show 20 Lines | |||||
.else | .else | ||||
${_+_}cd ${.CURDIR}; ${WMAKE} _cleankernobj_fast_depend_hack | ${_+_}cd ${.CURDIR}; ${WMAKE} _cleankernobj_fast_depend_hack | ||||
.endif | .endif | ||||
.if !defined(NO_KERNELOBJ) | .if !defined(NO_KERNELOBJ) | ||||
@echo | @echo | ||||
@echo "--------------------------------------------------------------" | @echo "--------------------------------------------------------------" | ||||
@echo ">>> stage 2.2: rebuilding the object tree" | @echo ">>> stage 2.2: rebuilding the object tree" | ||||
@echo "--------------------------------------------------------------" | @echo "--------------------------------------------------------------" | ||||
${_+_}cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} obj | ${_+_}cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} obj \ | ||||
REPRODUCIBLE_KOBJDIR=${REPRODUCIBLE_KRNLOBJDIR}/${_kernel} | |||||
.endif | .endif | ||||
@echo | @echo | ||||
@echo "--------------------------------------------------------------" | @echo "--------------------------------------------------------------" | ||||
@echo ">>> stage 2.3: build tools" | @echo ">>> stage 2.3: build tools" | ||||
@echo "--------------------------------------------------------------" | @echo "--------------------------------------------------------------" | ||||
${_+_}cd ${.CURDIR}; ${KTMAKE} kernel-tools | ${_+_}cd ${.CURDIR}; ${KTMAKE} kernel-tools | ||||
@echo | @echo | ||||
@echo "--------------------------------------------------------------" | @echo "--------------------------------------------------------------" | ||||
@echo ">>> stage 3.1: building everything" | @echo ">>> stage 3.1: building everything" | ||||
@echo "--------------------------------------------------------------" | @echo "--------------------------------------------------------------" | ||||
${_+_}cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} all -DNO_MODULES_OBJ | ${_+_}cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} all -DNO_MODULES_OBJ \ | ||||
REPRODUCIBLE_KOBJDIR=${REPRODUCIBLE_KRNLOBJDIR}/${_kernel} | |||||
@echo "--------------------------------------------------------------" | @echo "--------------------------------------------------------------" | ||||
@echo ">>> Kernel build for ${_kernel} completed on `LC_ALL=C date`" | @echo ">>> Kernel build for ${_kernel} completed on `LC_ALL=C date`" | ||||
@echo "--------------------------------------------------------------" | @echo "--------------------------------------------------------------" | ||||
.endfor | .endfor | ||||
@seconds=$$(($$(date '+%s') - ${_BUILDKERNEL_START})); \ | @seconds=$$(($$(date '+%s') - ${_BUILDKERNEL_START})); \ | ||||
echo -n ">>> Kernel(s) ${BUILDKERNELS} built in $$seconds seconds, "; \ | echo -n ">>> Kernel(s) ${BUILDKERNELS} built in $$seconds seconds, "; \ | ||||
echo "ncpu: $$(${_ncpu_cmd})${.MAKE.JOBS:S/^/, make -j/}" | echo "ncpu: $$(${_ncpu_cmd})${.MAKE.JOBS:S/^/, make -j/}" | ||||
▲ Show 20 Lines • Show All 1,817 Lines • Show Last 20 Lines |