Changeset View
Changeset View
Standalone View
Standalone View
Mk/Uses/kmod.mk
Context not available. | |||||
# | # | ||||
# Feature: kmod | # Feature: kmod | ||||
# Usage: USES=kmod | # Usage: USES=kmod | ||||
# Valid ARGS: (none) debug | # Valid ARGS: (none), debug, minor | ||||
# | # | ||||
# debug Build with debugging support | |||||
# minor Specify that the kmod must be built for each specific FreeBSD | |||||
# major.minor release per bsd.kmod-releases.mk | |||||
# | |||||
# MAINTAINER: rene@FreeBSD.org | # MAINTAINER: rene@FreeBSD.org | ||||
.if !defined(_INCLUDE_USES_KMOD_MK) | .if !defined(_INCLUDE_USES_KMOD_MK) | ||||
Context not available. | |||||
_USES_POST+= kmod | _USES_POST+= kmod | ||||
.if empty(kmod_ARGS) | .if !empty(kmod_ARGS:Ndebug:Nminor) | ||||
_DEBUG_KMOD= | IGNORE= USES=kmod has invalid arguments: ${kmod_ARGS:Ndebug:Nminor} | ||||
.elif ${kmod_ARGS} == "debug" | .endif | ||||
.if ${kmod_ARGS:Mdebug} | |||||
_DEBUG_KMOD= yes | _DEBUG_KMOD= yes | ||||
.else | .else | ||||
IGNORE= USES=kmod takes either no arguments or 'debug' | _DEBUG_KMOD= | ||||
.endif | .endif | ||||
FLAVORS=host | |||||
# By default FLAVOR will have already been defined empty | |||||
.if empty(FLAVOR) | |||||
FLAVOR=host | |||||
.endif | |||||
.if ${kmod_ARGS:Mminor} | |||||
.include "${PORTSDIR}/Mk/bsd.kmod-releases.mk" | |||||
.for release in ${KMOD_RELEASES_${_OSVERSION_MAJOR}} | |||||
.for flavor in ${release:C,\.([0-9])$,0\1,:S,.,,:S,^,fbsd,} | |||||
_RELEASE_${flavor}= ${release} | |||||
FLAVORS+= ${flavor} | |||||
${flavor}_PKGNAMEPREFIX= fbsd-${release}- | |||||
${flavor}_BUILD_DEPENDS= \ | |||||
${LOCALBASE}/kernel-${release}/sys/Makefile:devel/freebsd-kernel-src@${flavor} | |||||
.endfor | |||||
.endfor | |||||
.endif | |||||
.if "${FLAVOR}" != "host" | |||||
SRC_BASE= ${LOCALBASE}/kernel-${_RELEASE_${FLAVOR}} | |||||
.else | |||||
.if !exists(${SRC_BASE}/sys/Makefile) | .if !exists(${SRC_BASE}/sys/Makefile) | ||||
IGNORE= requires kernel source files in SRC_BASE=${SRC_BASE} | IGNORE= requires kernel source files in SRC_BASE=${SRC_BASE} | ||||
.endif | .endif | ||||
.endif | |||||
CATEGORIES+= kld | CATEGORIES+= kld | ||||
Context not available. |