Changeset View
Changeset View
Standalone View
Standalone View
Mk/bsd.port.mk
Show First 20 Lines • Show All 882 Lines • ▼ Show 20 Lines | |||||
# is deleted. | # is deleted. | ||||
# SUB_LIST - List of "variable=value" pair for substitution in ${SUB_FILES} | # SUB_LIST - List of "variable=value" pair for substitution in ${SUB_FILES} | ||||
# Some pairs are added by default: eg. PREFIX=${PREFIX} | # Some pairs are added by default: eg. PREFIX=${PREFIX} | ||||
# | # | ||||
# USE_LDCONFIG - If set to "yes", this adds ${PREFIX}/lib to the list of | # USE_LDCONFIG - If set to "yes", this adds ${PREFIX}/lib to the list of | ||||
# directories to be searched for shared libraries. | # directories to be searched for shared libraries. | ||||
# Otherwise, this is a list of directories to be added to that | # Otherwise, this is a list of directories to be added to that | ||||
# list. The directory names are written to | # list. The directory names are written to | ||||
# ${LOCALBASE}/libdata/ldconfig/${UNIQUENAME} which is then | # ${LOCALBASE}/libdata/ldconfig/${PKGBASE} which is then | ||||
# used by the ldconfig startup script. | # used by the ldconfig startup script. | ||||
# This mechanism replaces ldconfig scripts installed by some | # This mechanism replaces ldconfig scripts installed by some | ||||
# ports, often under such names as 000.${UNQUENAME}.sh. | # ports, often under such names as 000.${UNQUENAME}.sh. | ||||
# If USE_LINUX_PREFIX is defined, the Linux version of | # If USE_LINUX_PREFIX is defined, the Linux version of | ||||
# ldconfig will be used instead of the native FreeBSD | # ldconfig will be used instead of the native FreeBSD | ||||
# version, and the directory list given will be ignored. | # version, and the directory list given will be ignored. | ||||
# USE_LDCONFIG32 | # USE_LDCONFIG32 | ||||
# - Same as USE_LDCONFIG but the target file is | # - Same as USE_LDCONFIG but the target file is | ||||
# ${LOCALBASE}/libdata/ldconfig32/${UNIQUENAME} instead. | # ${LOCALBASE}/libdata/ldconfig32/${PKGBASE} instead. | ||||
# Note: that should only be used on 64-bit architectures. | # Note: that should only be used on 64-bit architectures. | ||||
# | # | ||||
# DOCSDIR - Name of the directory to install the packages docs in. | # DOCSDIR - Name of the directory to install the packages docs in. | ||||
# Default: ${PREFIX}/share/doc/${PORTNAME} | # Default: ${PREFIX}/share/doc/${PORTNAME} | ||||
# DOCSDIR_REL - The DOCSDIR relative to ${PREFIX} | # DOCSDIR_REL - The DOCSDIR relative to ${PREFIX} | ||||
# EXAMPLESDIR - Name of the directory to install the packages examples in. | # EXAMPLESDIR - Name of the directory to install the packages examples in. | ||||
# Default: ${PREFIX}/share/examples/${PORTNAME} | # Default: ${PREFIX}/share/examples/${PORTNAME} | ||||
# EXAMPLESDIR_REL | # EXAMPLESDIR_REL | ||||
▲ Show 20 Lines • Show All 1,963 Lines • ▼ Show 20 Lines | |||||
################################################################ | ################################################################ | ||||
# | # | ||||
# Do preliminary work to detect if we need to run the config | # Do preliminary work to detect if we need to run the config | ||||
# target or not. | # target or not. | ||||
# | # | ||||
################################################################ | ################################################################ | ||||
.if ((!defined(OPTIONS_DEFINE) && !defined(OPTIONS_SINGLE) && !defined(OPTIONS_MULTI)) \ | .if ((!defined(OPTIONS_DEFINE) && !defined(OPTIONS_SINGLE) && !defined(OPTIONS_MULTI)) \ | ||||
&& !defined(OPTIONS_GROUP) && !defined(OPTIONS_RADIO) \ | && !defined(OPTIONS_GROUP) && !defined(OPTIONS_RADIO) \ | ||||
|| defined(CONFIG_DONE_${UNIQUENAME:tu}) || \ | || defined(CONFIG_DONE_${PKGBASE:tu}) || \ | ||||
defined(PACKAGE_BUILDING) || defined(BATCH)) | defined(PACKAGE_BUILDING) || defined(BATCH)) | ||||
_OPTIONS_OK=yes | _OPTIONS_OK=yes | ||||
.endif | .endif | ||||
################################################################ | ################################################################ | ||||
# The following are used to create easy dummy targets for | # The following are used to create easy dummy targets for | ||||
# disabling some bit of default target behavior you don't want. | # disabling some bit of default target behavior you don't want. | ||||
# They still check to see if the target exists, and if so don't | # They still check to see if the target exists, and if so don't | ||||
▲ Show 20 Lines • Show All 664 Lines • ▼ Show 20 Lines | |||||
.if defined(USE_LINUX_PREFIX) | .if defined(USE_LINUX_PREFIX) | ||||
.else | .else | ||||
.if ${USE_LDCONFIG} != "${LOCALBASE}/lib" && !defined(INSTALL_AS_USER) | .if ${USE_LDCONFIG} != "${LOCALBASE}/lib" && !defined(INSTALL_AS_USER) | ||||
@${ECHO_MSG} "===> Installing ldconfig configuration file" | @${ECHO_MSG} "===> Installing ldconfig configuration file" | ||||
.if defined(NO_MTREE) || ${PREFIX} != ${LOCALBASE} | .if defined(NO_MTREE) || ${PREFIX} != ${LOCALBASE} | ||||
@${MKDIR} ${STAGEDIR}${LOCALBASE}/${LDCONFIG_DIR} | @${MKDIR} ${STAGEDIR}${LOCALBASE}/${LDCONFIG_DIR} | ||||
.endif | .endif | ||||
@${ECHO_CMD} ${USE_LDCONFIG} | ${TR} ' ' '\n' \ | @${ECHO_CMD} ${USE_LDCONFIG} | ${TR} ' ' '\n' \ | ||||
> ${STAGEDIR}${LOCALBASE}/${LDCONFIG_DIR}/${UNIQUENAME} | > ${STAGEDIR}${LOCALBASE}/${LDCONFIG_DIR}/${PKGBASE} | ||||
@${ECHO_CMD} ${LOCALBASE}/${LDCONFIG_DIR}/${UNIQUENAME} >> ${TMPPLIST} | @${ECHO_CMD} ${LOCALBASE}/${LDCONFIG_DIR}/${PKGBASE} >> ${TMPPLIST} | ||||
.endif | .endif | ||||
.endif | .endif | ||||
.endif | .endif | ||||
.if defined(USE_LDCONFIG32) | .if defined(USE_LDCONFIG32) | ||||
.if !defined(INSTALL_AS_USER) | .if !defined(INSTALL_AS_USER) | ||||
@${ECHO_MSG} "===> Installing 32-bit ldconfig configuration file" | @${ECHO_MSG} "===> Installing 32-bit ldconfig configuration file" | ||||
.if defined(NO_MTREE) || ${PREFIX} != ${LOCALBASE} | .if defined(NO_MTREE) || ${PREFIX} != ${LOCALBASE} | ||||
@${MKDIR} ${STAGEDIR}${LOCALBASE}/${LDCONFIG32_DIR} | @${MKDIR} ${STAGEDIR}${LOCALBASE}/${LDCONFIG32_DIR} | ||||
.endif | .endif | ||||
@${ECHO_CMD} ${USE_LDCONFIG32} | ${TR} ' ' '\n' \ | @${ECHO_CMD} ${USE_LDCONFIG32} | ${TR} ' ' '\n' \ | ||||
> ${STAGEDIR}${LOCALBASE}/${LDCONFIG32_DIR}/${UNIQUENAME} | > ${STAGEDIR}${LOCALBASE}/${LDCONFIG32_DIR}/${PKGBASE} | ||||
@${ECHO_CMD} ${LOCALBASE}/${LDCONFIG32_DIR}/${UNIQUENAME} >> ${TMPPLIST} | @${ECHO_CMD} ${LOCALBASE}/${LDCONFIG32_DIR}/${PKGBASE} >> ${TMPPLIST} | ||||
.endif | .endif | ||||
.endif | .endif | ||||
.endif | .endif | ||||
.endif | .endif | ||||
.if !target(create-users-groups) | .if !target(create-users-groups) | ||||
.if defined(GROUPS) || defined(USERS) | .if defined(GROUPS) || defined(USERS) | ||||
_UG_OUTPUT= ${WRKDIR}/users-groups.sh | _UG_OUTPUT= ${WRKDIR}/users-groups.sh | ||||
▲ Show 20 Lines • Show All 2,029 Lines • ▼ Show 20 Lines | |||||
# to depend on the *_DEP and execute the *_SEQ. | # to depend on the *_DEP and execute the *_SEQ. | ||||
# If options are required, execute config-conditional and then re-execute the | # If options are required, execute config-conditional and then re-execute the | ||||
# target noting that config is no longer needed. | # target noting that config is no longer needed. | ||||
.if !target(${target}) && defined(_OPTIONS_OK) | .if !target(${target}) && defined(_OPTIONS_OK) | ||||
_PHONY_TARGETS+= ${target} | _PHONY_TARGETS+= ${target} | ||||
${target}: ${${target:tu}_COOKIE} | ${target}: ${${target:tu}_COOKIE} | ||||
.elif !target(${target}) | .elif !target(${target}) | ||||
${target}: config-conditional | ${target}: config-conditional | ||||
@cd ${.CURDIR} && ${MAKE} CONFIG_DONE_${UNIQUENAME:tu}=1 ${${target:tu}_COOKIE} | @cd ${.CURDIR} && ${MAKE} CONFIG_DONE_${PKGBASE:tu}=1 ${${target:tu}_COOKIE} | ||||
.elif target(${target}) && defined(IGNORE) | .elif target(${target}) && defined(IGNORE) | ||||
.endif | .endif | ||||
.if !exists(${${target:tu}_COOKIE}) | .if !exists(${${target:tu}_COOKIE}) | ||||
# Define the real target behavior. Depend on the target's *_DEP. Execute | # Define the real target behavior. Depend on the target's *_DEP. Execute | ||||
# the target's *_SEQ. Also handle su and USE_SUBMAKE needs. | # the target's *_SEQ. Also handle su and USE_SUBMAKE needs. | ||||
.if ${UID} != 0 && defined(_${target:tu}_REAL_SUSEQ) && !defined(INSTALL_AS_USER) | .if ${UID} != 0 && defined(_${target:tu}_REAL_SUSEQ) && !defined(INSTALL_AS_USER) | ||||
▲ Show 20 Lines • Show All 53 Lines • Show Last 20 Lines |