Changeset View
Changeset View
Standalone View
Standalone View
Mk/bsd.port.mk
Show First 20 Lines • Show All 1,078 Lines • ▼ Show 20 Lines | |||||
# make sure bmake treats -V as expected | # make sure bmake treats -V as expected | ||||
.MAKE.EXPAND_VARIABLES= yes | .MAKE.EXPAND_VARIABLES= yes | ||||
.include "${PORTSDIR}/Mk/bsd.commands.mk" | .include "${PORTSDIR}/Mk/bsd.commands.mk" | ||||
# Do not leak flavors to childs make | # Do not leak flavors to childs make | ||||
.MAKEOVERRIDES:= ${MAKEOVERRIDES:NFLAVOR=*} | .MAKEOVERRIDES:= ${MAKEOVERRIDES:NFLAVOR=*} | ||||
.if !empty(FLAVOR) && !defined(_DID_FLAVORS_HELPERS) | |||||
_DID_FLAVORS_HELPERS= yes | |||||
# These overwrite the current value | |||||
.for v in PKGNAMEPREFIX PKGNAMESUFFIX PLIST DESCR | |||||
bdrewery: move to its own variable IMO, easier to maintain | |||||
.if defined(${FLAVOR}_${v}) | |||||
${v}= ${${FLAVOR}_${v}} | |||||
.endif | |||||
.endfor | |||||
# These append to the current value | |||||
.for v in CONFLICTS CONFLICTS_BUILD CONFLICTS_INSTALL \ | |||||
PKG_DEPENDS EXTRACT_DEPENDS PATCH_DEPENDS FETCH_DEPENDS BUILD_DEPENDS \ | |||||
LIB_DEPENDS RUN_DEPENDS TEST_DEPENDS | |||||
Not Done Inline Actionsmove to its own variable IMO, easier to maintain bdrewery: move to its own variable IMO, easier to maintain | |||||
.if defined(${FLAVOR}_${v}) | |||||
${v}+= ${${FLAVOR}_${v}} | |||||
.endif | |||||
.endfor | |||||
.for v in BROKEN IGNORE | |||||
.if defined(${FLAVOR}_${v}) | |||||
${v}= flavor "${FLAVOR}" ${${FLAVOR}_${v}} | |||||
Done Inline ActionsOPTIONS_OFF here conflicts with the OPTIONS helper usage of "_OFF". _FORCE and _EXCLUDE, or _ENABLE/_DISABLE might be clearer. adamw: `OPTIONS_OFF` here conflicts with the OPTIONS helper usage of "`_OFF`".
`_FORCE` and… | |||||
Done Inline ActionsMmmm, I think whatever we do, we'll use keywords that have already been used before :-) I may prefer _FORCE and _EXCLUDE though, because it is what they do. mat: Mmmm, I think whatever we do, we'll use keywords that have already been used before :-)
I may… | |||||
Done Inline ActionsDefinitely agree on the used-before thing. It's just that _OFF suggests that those options are enabled when this is not the current flavour. adamw: Definitely agree on the used-before thing. It's just that `_OFF` suggests that those options… | |||||
.endif | |||||
.endfor | |||||
.endif # defined(${FLAVOR}) | |||||
.if defined(CROSS_TOOLCHAIN) | .if defined(CROSS_TOOLCHAIN) | ||||
.if !defined(CROSS_SYSROOT) | .if !defined(CROSS_SYSROOT) | ||||
IGNORE= CROSS_SYSROOT should be defined | IGNORE= CROSS_SYSROOT should be defined | ||||
.endif | .endif | ||||
.include "${LOCALBASE}/share/toolchains/${CROSS_TOOLCHAIN}.mk" | .include "${LOCALBASE}/share/toolchains/${CROSS_TOOLCHAIN}.mk" | ||||
# Do not define CPP on purpose | # Do not define CPP on purpose | ||||
.if !defined(HOSTCC) | .if !defined(HOSTCC) | ||||
HOSTCC:= ${CC} | HOSTCC:= ${CC} | ||||
▲ Show 20 Lines • Show All 4,413 Lines • Show Last 20 Lines |
move to its own variable IMO, easier to maintain