Changeset View
Changeset View
Standalone View
Standalone View
Mk/bsd.port.mk
Show First 20 Lines • Show All 1,057 Lines • ▼ Show 20 Lines | |||||
NOTPHONY?= | NOTPHONY?= | ||||
FLAVORS?= | FLAVORS?= | ||||
FLAVOR?= | FLAVOR?= | ||||
# XXX: We have no real FLAVORS support in ports or tools yet. | # XXX: We have no real FLAVORS support in ports or tools yet. | ||||
#PORTS_FEATURES+= FLAVORS | #PORTS_FEATURES+= FLAVORS | ||||
MINIMAL_PKG_VERSION= 1.6.0 | MINIMAL_PKG_VERSION= 1.6.0 | ||||
_PORTS_DIRECTORIES+= ${PKG_DBDIR} ${PREFIX} ${WRKDIR} ${EXTRACT_WRKDIR} \ | _PORTS_DIRECTORIES+= ${PKG_DBDIR} ${PREFIX} ${WRKDIR} ${EXTRACT_WRKDIR} \ | ||||
${STAGEDIR}${PREFIX} ${WRKDIR}/pkg | ${STAGEDIR}${PREFIX} ${WRKDIR}/pkg ${WRKDIRBIN} | ||||
# Ensure .CURDIR contains an absolute path without a trailing slash. Failed | # Ensure .CURDIR contains an absolute path without a trailing slash. Failed | ||||
# builds can occur when PORTSDIR is a symbolic link, or with something like | # builds can occur when PORTSDIR is a symbolic link, or with something like | ||||
# make -C /usr/ports/category/port/. | # make -C /usr/ports/category/port/. | ||||
.CURDIR:= ${.CURDIR:tA} | .CURDIR:= ${.CURDIR:tA} | ||||
# make sure bmake treats -V as expected | # make sure bmake treats -V as expected | ||||
.MAKE.EXPAND_VARIABLES= yes | .MAKE.EXPAND_VARIABLES= yes | ||||
▲ Show 20 Lines • Show All 527 Lines • ▼ Show 20 Lines | |||||
.if empty(FLAVOR) | .if empty(FLAVOR) | ||||
_WRKDIR= work | _WRKDIR= work | ||||
.else | .else | ||||
_WRKDIR= work-${FLAVOR} | _WRKDIR= work-${FLAVOR} | ||||
.endif | .endif | ||||
WRKDIR?= ${WRKDIRPREFIX}${.CURDIR}/${_WRKDIR} | WRKDIR?= ${WRKDIRPREFIX}${.CURDIR}/${_WRKDIR} | ||||
WRKDIRBIN?= ${WRKDIR}/.bin | |||||
adamw: Consider `BINARY_LINKDIR`. What matters most is what it does, not where it is. | |||||
PATH:= ${WRKDIRBIN}:${PATH} | |||||
.if !${MAKE_ENV:MPATH=*} && !${CONFIGURE_ENV:MPATH=*} | |||||
MAKE_ENV+= PATH=${PATH} | |||||
CONFIGURE_ENV+= PATH=${PATH} | |||||
.endif | |||||
.if !defined(IGNORE_MASTER_SITE_GITHUB) && defined(USE_GITHUB) && empty(USE_GITHUB:Mnodefault) | .if !defined(IGNORE_MASTER_SITE_GITHUB) && defined(USE_GITHUB) && empty(USE_GITHUB:Mnodefault) | ||||
WRKSRC?= ${WRKDIR}/${GH_PROJECT}-${GH_TAGNAME_EXTRACT} | WRKSRC?= ${WRKDIR}/${GH_PROJECT}-${GH_TAGNAME_EXTRACT} | ||||
.endif | .endif | ||||
# If the distname is not extracting into a specific subdirectory, have the | # If the distname is not extracting into a specific subdirectory, have the | ||||
# ports framework force extract into a subdirectory so that metadata files | # ports framework force extract into a subdirectory so that metadata files | ||||
# do not get in the way of the build, and vice-versa. | # do not get in the way of the build, and vice-versa. | ||||
.if defined(NO_WRKSUBDIR) | .if defined(NO_WRKSUBDIR) | ||||
# Some ports have DISTNAME=PORTNAME, and USE_RC_SUBR=PORTNAME, in those case, | # Some ports have DISTNAME=PORTNAME, and USE_RC_SUBR=PORTNAME, in those case, | ||||
▲ Show 20 Lines • Show All 3,559 Lines • ▼ Show 20 Lines | while [ $$# -gt 6 ]; do \ | ||||
if [ -n "$$6" ]; then \ | if [ -n "$$6" ]; then \ | ||||
${ECHO_CMD} "StartupNotify=$$6" >> $$pathname; \ | ${ECHO_CMD} "StartupNotify=$$6" >> $$pathname; \ | ||||
fi; \ | fi; \ | ||||
shift 6; \ | shift 6; \ | ||||
done | done | ||||
.endif | .endif | ||||
.endif | .endif | ||||
.if !empty(BINARY_ALIAS) | |||||
.if !target(create-binary-alias) | |||||
Done Inline Actionscreate-build-links: ? mat: `create-build-links:` ? | |||||
create-binary-alias: ${WRKDIRBIN} | |||||
Done Inline ActionsThanks, @bapt! Is there value to making it behave like the shell alias command, and switching the src target order? sh: alias sed=gsed adamw: Thanks, @bapt!
Is there value to making it behave like the shell `alias` command, and… | |||||
.for target src in ${BINARY_ALIAS:C/=/ /} | |||||
@${RLN} `which ${src}` ${WRKDIRBIN}/${target} | |||||
.endfor | |||||
Done Inline Actionsguard with a .if !empty(BINARY_RENAME) or something. mat: guard with a `.if !empty(BINARY_RENAME)` or something. | |||||
Done Inline ActionsNo need, the target will be defined but not doing anything if BINARY_LINKS is empty (as if it were guarded) bapt: No need, the target will be defined but not doing anything if BINARY_LINKS is empty (as if it… | |||||
Done Inline ActionsWell, might as well not create it if not needed, so that it is not added to the active target list later. mat: Well, might as well not create it if not needed, so that it is not added to the active target… | |||||
.endif | |||||
.endif | |||||
.if defined(WARNING) | .if defined(WARNING) | ||||
WARNING_WAIT?= 10 | WARNING_WAIT?= 10 | ||||
show-warnings: | show-warnings: | ||||
@${ECHO_MSG} "/!\\ WARNING /!\\" | @${ECHO_MSG} "/!\\ WARNING /!\\" | ||||
@${ECHO_MSG} | @${ECHO_MSG} | ||||
.for m in ${WARNING} | .for m in ${WARNING} | ||||
@${ECHO_MSG} "${m}" | ${FMT_80} | @${ECHO_MSG} "${m}" | ${FMT_80} | ||||
@${ECHO_MSG} | @${ECHO_MSG} | ||||
▲ Show 20 Lines • Show All 71 Lines • ▼ Show 20 Lines | _EXTRACT_SEQ= 010:check-build-conflicts 050:extract-message 100:checksum \ | ||||
999:extract-fixup-modes \ | 999:extract-fixup-modes \ | ||||
${_OPTIONS_extract} ${_USES_extract} ${_SITES_extract} | ${_OPTIONS_extract} ${_USES_extract} ${_SITES_extract} | ||||
_PATCH_DEP= extract | _PATCH_DEP= extract | ||||
_PATCH_SEQ= 050:ask-license 100:patch-message 150:patch-depends \ | _PATCH_SEQ= 050:ask-license 100:patch-message 150:patch-depends \ | ||||
300:pre-patch 450:pre-patch-script 500:do-patch \ | 300:pre-patch 450:pre-patch-script 500:do-patch \ | ||||
700:post-patch 850:post-patch-script \ | 700:post-patch 850:post-patch-script \ | ||||
${_OPTIONS_patch} ${_USES_patch} | ${_OPTIONS_patch} ${_USES_patch} | ||||
_CONFIGURE_DEP= patch | _CONFIGURE_DEP= patch | ||||
_CONFIGURE_SEQ= 150:build-depends 151:lib-depends 200:configure-message \ | _CONFIGURE_SEQ= 150:build-depends 151:lib-depends 160:create-binary-alias \ | ||||
200:configure-message \ | |||||
300:pre-configure 450:pre-configure-script \ | 300:pre-configure 450:pre-configure-script \ | ||||
490:run-autotools-fixup 500:do-configure 700:post-configure \ | 490:run-autotools-fixup 500:do-configure 700:post-configure \ | ||||
850:post-configure-script \ | 850:post-configure-script \ | ||||
${_OPTIONS_configure} ${_USES_configure} | ${_OPTIONS_configure} ${_USES_configure} | ||||
_BUILD_DEP= configure | _BUILD_DEP= configure | ||||
_BUILD_SEQ= 100:build-message 300:pre-build 450:pre-build-script \ | _BUILD_SEQ= 100:build-message 300:pre-build 450:pre-build-script \ | ||||
500:do-build 700:post-build 850:post-build-script \ | 500:do-build 700:post-build 850:post-build-script \ | ||||
${_OPTIONS_build} ${_USES_build} | ${_OPTIONS_build} ${_USES_build} | ||||
▲ Show 20 Lines • Show All 152 Lines • Show Last 20 Lines |
Consider BINARY_LINKDIR. What matters most is what it does, not where it is.