Changeset View
Changeset View
Standalone View
Standalone View
head/Mk/bsd.port.mk
Show First 20 Lines • Show All 288 Lines • ▼ Show 20 Lines | |||||
# "install" stage and the name of the dependency will | # "install" stage and the name of the dependency will | ||||
# be put into the package as well. If the third field | # be put into the package as well. If the third field | ||||
# ("target") exists, it will be used instead of | # ("target") exists, it will be used instead of | ||||
# ${DEPENDS_TARGET}. The first field also supports a | # ${DEPENDS_TARGET}. The first field also supports a | ||||
# package name with a version range, in the form package>=1.2 | # package name with a version range, in the form package>=1.2 | ||||
# if a particular version is desired. | # if a particular version is desired. | ||||
# LIB_DEPENDS - A list of "lib:dir[:target]" tuples of other ports this | # LIB_DEPENDS - A list of "lib:dir[:target]" tuples of other ports this | ||||
# package depends on. "lib" is the name of a shared library. | # package depends on. "lib" is the name of a shared library. | ||||
# TEST_DEPENDS - A list of "path:dir[:target]" tuples of other ports this | |||||
# package depends on in the "test" stage. "path" is the | |||||
# name of a file if it starts with a slash (/), an | |||||
# executable otherwise. make will test for the existence | |||||
# (if it is a full pathname) or search for it in your | |||||
# $PATH (if it is an executable) and go into "dir" to do | |||||
# a "make all install" if it's not found. If the third | |||||
# field ("target") exists, it will be used instead of | |||||
# ${DEPENDS_TARGET}. The first field also supports a | |||||
# package name with a version range, in the form package>=1.2 | |||||
# if a particular version is desired. | |||||
# DEPENDS_TARGET | # DEPENDS_TARGET | ||||
# - The default target to execute when a port is calling a | # - The default target to execute when a port is calling a | ||||
# dependency. | # dependency. | ||||
# Default: install | # Default: install | ||||
# | # | ||||
# These variables control options about how a port gets built and/or | # These variables control options about how a port gets built and/or | ||||
# are shorthand notations for common sets of dependencies. | # are shorthand notations for common sets of dependencies. | ||||
# Use these if your port uses some of the common software packages. By | # Use these if your port uses some of the common software packages. By | ||||
▲ Show 20 Lines • Show All 338 Lines • ▼ Show 20 Lines | |||||
# actual-package-depends | # actual-package-depends | ||||
# - Like package-depends-list but with the difference | # - Like package-depends-list but with the difference | ||||
# that the dependencies of the currently installed | # that the dependencies of the currently installed | ||||
# ports are used instead of the dependencies as | # ports are used instead of the dependencies as | ||||
# recorded in the ports collection. | # recorded in the ports collection. | ||||
# run-depends-list | # run-depends-list | ||||
# - Show all directories which are run-dependencies | # - Show all directories which are run-dependencies | ||||
# for this port. | # for this port. | ||||
# test-depends-list | |||||
# - Show all directories which are test-dependencies | |||||
# for this port. | |||||
# | # | ||||
# extract - Unpacks ${DISTFILES} into ${WRKDIR}. | # extract - Unpacks ${DISTFILES} into ${WRKDIR}. | ||||
# patch - Apply any provided patches to the source. | # patch - Apply any provided patches to the source. | ||||
# configure - Runs either GNU configure, one or more local configure | # configure - Runs either GNU configure, one or more local configure | ||||
# scripts or nothing, depending on what's available. | # scripts or nothing, depending on what's available. | ||||
# build - Actually compile the sources. | # build - Actually compile the sources. | ||||
# install - Install the results of a build. | # install - Install the results of a build. | ||||
# reinstall - Install the results of a build, ignoring "already installed" | # reinstall - Install the results of a build, ignoring "already installed" | ||||
# flag. | # flag. | ||||
# deinstall - Remove the installation. | # deinstall - Remove the installation. | ||||
# deinstall-all - Remove all installations with the same PKGORIGIN. | # deinstall-all - Remove all installations with the same PKGORIGIN. | ||||
# test - Run tests for the port. | |||||
# package - Create a package from an _installed_ port. | # package - Create a package from an _installed_ port. | ||||
# package-recursive | # package-recursive | ||||
# - Create a package for a port and _all_ of its dependencies. | # - Create a package for a port and _all_ of its dependencies. | ||||
# describe - Try to generate a one-line description for each port for | # describe - Try to generate a one-line description for each port for | ||||
# use in INDEX files and the like. | # use in INDEX files and the like. | ||||
# check-plist - Checks for files missing from the plist, and files in the plist | # check-plist - Checks for files missing from the plist, and files in the plist | ||||
# that are not installed by the port. | # that are not installed by the port. | ||||
# check-sanity - Perform some basic checks of the port layout. | # check-sanity - Perform some basic checks of the port layout. | ||||
Show All 40 Lines | |||||
# Set these variables if your port doesn't need some of the steps. | # Set these variables if your port doesn't need some of the steps. | ||||
# Note that there are no NO_PATCH or NO_CONFIGURE variables because | # Note that there are no NO_PATCH or NO_CONFIGURE variables because | ||||
# those steps are empty by default. NO_EXTRACT is not allowed anymore | # those steps are empty by default. NO_EXTRACT is not allowed anymore | ||||
# since we need to at least create ${WRKDIR}. Also, NO_CHECKSUM is a user | # since we need to at least create ${WRKDIR}. Also, NO_CHECKSUM is a user | ||||
# variable and is not to be set in a port's Makefile. See above for NO_PACKAGE. | # variable and is not to be set in a port's Makefile. See above for NO_PACKAGE. | ||||
# | # | ||||
# NO_BUILD - Use a dummy (do-nothing) build target. | # NO_BUILD - Use a dummy (do-nothing) build target. | ||||
# NO_INSTALL - Use a dummy (do-nothing) install target. | # NO_INSTALL - Use a dummy (do-nothing) install target. | ||||
# NO_TEST - Use a dummy (do-nothing) test target. | |||||
# | # | ||||
# Here are some variables used in various stages. | # Here are some variables used in various stages. | ||||
# | # | ||||
# For options see bsd.options.mk | # For options see bsd.options.mk | ||||
# | # | ||||
# For fetch: | # For fetch: | ||||
# | # | ||||
# FETCH_BINARY - Path to ftp/http fetch command if not in $PATH. | # FETCH_BINARY - Path to ftp/http fetch command if not in $PATH. | ||||
▲ Show 20 Lines • Show All 112 Lines • ▼ Show 20 Lines | |||||
# WITH_CCACHE_BUILD | # WITH_CCACHE_BUILD | ||||
# - Enable CCACHE support (devel/ccache). User settable. | # - Enable CCACHE support (devel/ccache). User settable. | ||||
# CCACHE_DIR | # CCACHE_DIR | ||||
# - Which directory to use for ccache (default: $HOME/.ccache) | # - Which directory to use for ccache (default: $HOME/.ccache) | ||||
# NO_CCACHE | # NO_CCACHE | ||||
# - Disable CCACHE support for example for certain ports if | # - Disable CCACHE support for example for certain ports if | ||||
# CCACHE is enabled. User settable. | # CCACHE is enabled. User settable. | ||||
# | # | ||||
# For test: | |||||
# | |||||
# TEST_TARGET - Target for sub-make in test stage. If not defined, | |||||
# no default test target is provided. | |||||
# Default: (none) | |||||
# TEST_WRKSRC - Directory to do test in (default: ${WRKSRC}). | |||||
# TEST_ENV - Additional environment vars passed to sub-make in test | |||||
# stage | |||||
# Default: ${MAKE_ENV} | |||||
# TEST_ARGS - Any extra arguments to sub-make in test stage | |||||
# Default: ${MAKE_ARGS} | |||||
# | |||||
# For install: | # For install: | ||||
# | # | ||||
# INSTALL_TARGET | # INSTALL_TARGET | ||||
# - Default target for sub-make in install stage. | # - Default target for sub-make in install stage. | ||||
# Default: install | # Default: install | ||||
# INSTALL_WRKSRC | # INSTALL_WRKSRC | ||||
# - Directory to install from | # - Directory to install from | ||||
# Default: ${WRKSRC} | # Default: ${WRKSRC} | ||||
▲ Show 20 Lines • Show All 564 Lines • ▼ Show 20 Lines | |||||
.if !defined(UID) | .if !defined(UID) | ||||
UID!= ${ID} -u | UID!= ${ID} -u | ||||
.endif | .endif | ||||
DESTDIRNAME?= DESTDIR | DESTDIRNAME?= DESTDIR | ||||
# setup empty variables for USES targets | # setup empty variables for USES targets | ||||
.for target in sanity fetch extract patch configure build install package stage | .for target in sanity fetch extract patch configure build install test package stage | ||||
_USES_${target}?= | _USES_${target}?= | ||||
.endfor | .endfor | ||||
# Loading features | # Loading features | ||||
.for f in ${USES} | .for f in ${USES} | ||||
_f:= ${f:C/\:.*//} | _f:= ${f:C/\:.*//} | ||||
.if !defined(${_f}_ARGS) | .if !defined(${_f}_ARGS) | ||||
${_f}_ARGS:= ${f:C/^[^\:]*(\:|\$)//:S/,/ /g} | ${_f}_ARGS:= ${f:C/^[^\:]*(\:|\$)//:S/,/ /g} | ||||
Show All 38 Lines | |||||
_POSTMKINCLUDED= yes | _POSTMKINCLUDED= yes | ||||
.if defined(BUNDLE_LIBS) | .if defined(BUNDLE_LIBS) | ||||
PKG_NOTES+= no_provide_shlib | PKG_NOTES+= no_provide_shlib | ||||
PKG_NOTE_no_provide_shlib= yes | PKG_NOTE_no_provide_shlib= yes | ||||
.endif | .endif | ||||
TEST_ARGS?= ${MAKE_ARGS} | |||||
TEST_ENV?= ${MAKE_ENV} | |||||
PKG_ENV+= PORTSDIR=${PORTSDIR} | PKG_ENV+= PORTSDIR=${PORTSDIR} | ||||
CONFIGURE_ENV+= XDG_DATA_HOME=${WRKDIR} \ | CONFIGURE_ENV+= XDG_DATA_HOME=${WRKDIR} \ | ||||
XDG_CONFIG_HOME=${WRKDIR} \ | XDG_CONFIG_HOME=${WRKDIR} \ | ||||
HOME=${WRKDIR} | HOME=${WRKDIR} | ||||
MAKE_ENV+= XDG_DATA_HOME=${WRKDIR} \ | MAKE_ENV+= XDG_DATA_HOME=${WRKDIR} \ | ||||
XDG_CONFIG_HOME=${WRKDIR} \ | XDG_CONFIG_HOME=${WRKDIR} \ | ||||
HOME=${WRKDIR} | HOME=${WRKDIR} | ||||
# Respect TMPDIR passed via make.conf or similar and pass it down | # Respect TMPDIR passed via make.conf or similar and pass it down | ||||
▲ Show 20 Lines • Show All 53 Lines • ▼ Show 20 Lines | |||||
.if defined(WRKSRC_SUBDIR) | .if defined(WRKSRC_SUBDIR) | ||||
WRKSRC:= ${WRKSRC}/${WRKSRC_SUBDIR} | WRKSRC:= ${WRKSRC}/${WRKSRC_SUBDIR} | ||||
.endif | .endif | ||||
PATCH_WRKSRC?= ${WRKSRC} | PATCH_WRKSRC?= ${WRKSRC} | ||||
CONFIGURE_WRKSRC?= ${WRKSRC} | CONFIGURE_WRKSRC?= ${WRKSRC} | ||||
BUILD_WRKSRC?= ${WRKSRC} | BUILD_WRKSRC?= ${WRKSRC} | ||||
INSTALL_WRKSRC?=${WRKSRC} | INSTALL_WRKSRC?=${WRKSRC} | ||||
TEST_WRKSRC?= ${WRKSRC} | |||||
PLIST_SUB+= OSREL=${OSREL} PREFIX=%D LOCALBASE=${LOCALBASE} \ | PLIST_SUB+= OSREL=${OSREL} PREFIX=%D LOCALBASE=${LOCALBASE} \ | ||||
RESETPREFIX=${PREFIX} | RESETPREFIX=${PREFIX} | ||||
SUB_LIST+= PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} \ | SUB_LIST+= PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} \ | ||||
DATADIR=${DATADIR} DOCSDIR=${DOCSDIR} EXAMPLESDIR=${EXAMPLESDIR} \ | DATADIR=${DATADIR} DOCSDIR=${DOCSDIR} EXAMPLESDIR=${EXAMPLESDIR} \ | ||||
WWWDIR=${WWWDIR} ETCDIR=${ETCDIR} | WWWDIR=${WWWDIR} ETCDIR=${ETCDIR} | ||||
# This is used for check-stagedir.sh and check_leftover.sh to replace | # This is used for check-stagedir.sh and check_leftover.sh to replace | ||||
# directories/files with PLIST_SUB %%KEYS%%. | # directories/files with PLIST_SUB %%KEYS%%. | ||||
▲ Show 20 Lines • Show All 370 Lines • ▼ Show 20 Lines | |||||
# Macro for doing in-place file editing using regexps | # Macro for doing in-place file editing using regexps | ||||
REINPLACE_ARGS?= -i.bak | REINPLACE_ARGS?= -i.bak | ||||
REINPLACE_CMD?= ${SED} ${REINPLACE_ARGS} | REINPLACE_CMD?= ${SED} ${REINPLACE_ARGS} | ||||
# Names of cookies used to skip already completed stages | # Names of cookies used to skip already completed stages | ||||
EXTRACT_COOKIE?= ${WRKDIR}/.extract_done.${PORTNAME}.${PREFIX:S/\//_/g} | EXTRACT_COOKIE?= ${WRKDIR}/.extract_done.${PORTNAME}.${PREFIX:S/\//_/g} | ||||
CONFIGURE_COOKIE?= ${WRKDIR}/.configure_done.${PORTNAME}.${PREFIX:S/\//_/g} | CONFIGURE_COOKIE?= ${WRKDIR}/.configure_done.${PORTNAME}.${PREFIX:S/\//_/g} | ||||
INSTALL_COOKIE?= ${WRKDIR}/.install_done.${PORTNAME}.${PREFIX:S/\//_/g} | INSTALL_COOKIE?= ${WRKDIR}/.install_done.${PORTNAME}.${PREFIX:S/\//_/g} | ||||
TEST_COOKIE?= ${WRKDIR}/.test_done.${PORTNAME}.${PREFIX:S/\//_/g} | |||||
BUILD_COOKIE?= ${WRKDIR}/.build_done.${PORTNAME}.${PREFIX:S/\//_/g} | BUILD_COOKIE?= ${WRKDIR}/.build_done.${PORTNAME}.${PREFIX:S/\//_/g} | ||||
PATCH_COOKIE?= ${WRKDIR}/.patch_done.${PORTNAME}.${PREFIX:S/\//_/g} | PATCH_COOKIE?= ${WRKDIR}/.patch_done.${PORTNAME}.${PREFIX:S/\//_/g} | ||||
PACKAGE_COOKIE?= ${WRKDIR}/.package_done.${PORTNAME}.${PREFIX:S/\//_/g} | PACKAGE_COOKIE?= ${WRKDIR}/.package_done.${PORTNAME}.${PREFIX:S/\//_/g} | ||||
STAGE_COOKIE?= ${WRKDIR}/.stage_done.${PORTNAME}.${PREFIX:S/\//_/g} | STAGE_COOKIE?= ${WRKDIR}/.stage_done.${PORTNAME}.${PREFIX:S/\//_/g} | ||||
# How to do nothing. Override if you, for some strange reason, would rather | # How to do nothing. Override if you, for some strange reason, would rather | ||||
# do something. | # do something. | ||||
DO_NADA?= ${TRUE} | DO_NADA?= ${TRUE} | ||||
▲ Show 20 Lines • Show All 844 Lines • ▼ Show 20 Lines | |||||
.if defined(IGNORE) | .if defined(IGNORE) | ||||
.if defined(IGNORE_SILENT) | .if defined(IGNORE_SILENT) | ||||
IGNORECMD= ${DO_NADA} | IGNORECMD= ${DO_NADA} | ||||
.else | .else | ||||
IGNORECMD= ${ECHO_MSG} "===> ${PKGNAME} "${IGNORE:Q}.;exit 1 | IGNORECMD= ${ECHO_MSG} "===> ${PKGNAME} "${IGNORE:Q}.;exit 1 | ||||
.endif | .endif | ||||
_TARGETS= check-sanity fetch checksum extract patch configure all build \ | _TARGETS= check-sanity fetch checksum extract patch configure all build \ | ||||
install reinstall package stage restage | install reinstall test package stage restage | ||||
.for target in ${_TARGETS} | .for target in ${_TARGETS} | ||||
.if !target(${target}) | .if !target(${target}) | ||||
${target}: | ${target}: | ||||
@${IGNORECMD} | @${IGNORECMD} | ||||
.if defined(INSTALLS_DEPENDS) | .if defined(INSTALLS_DEPENDS) | ||||
@${FALSE} | @${FALSE} | ||||
.endif | .endif | ||||
▲ Show 20 Lines • Show All 109 Lines • ▼ Show 20 Lines | |||||
.endif | .endif | ||||
# Disable build | # Disable build | ||||
.if defined(NO_BUILD) && !target(build) | .if defined(NO_BUILD) && !target(build) | ||||
build: configure | build: configure | ||||
@${TOUCH} ${TOUCH_FLAGS} ${BUILD_COOKIE} | @${TOUCH} ${TOUCH_FLAGS} ${BUILD_COOKIE} | ||||
.endif | .endif | ||||
# Disable test | |||||
.if defined(NO_TEST) && !target(test) | |||||
test: stage | |||||
@${TOUCH} ${TOUCH_FLAGS} ${TEST_COOKIE} | |||||
.endif | |||||
# Disable package | # Disable package | ||||
.if defined(NO_PACKAGE) && !target(package) | .if defined(NO_PACKAGE) && !target(package) | ||||
package: | package: | ||||
.if defined(IGNORE_SILENT) | .if defined(IGNORE_SILENT) | ||||
@${DO_NADA} | @${DO_NADA} | ||||
.else | .else | ||||
@${ECHO_MSG} "===> ${PKGNAME} may not be packaged: "${NO_PACKAGE:Q}. | @${ECHO_MSG} "===> ${PKGNAME} may not be packaged: "${NO_PACKAGE:Q}. | ||||
.endif | .endif | ||||
▲ Show 20 Lines • Show All 519 Lines • ▼ Show 20 Lines | |||||
# Install | # Install | ||||
.if !target(do-install) && !defined(NO_INSTALL) | .if !target(do-install) && !defined(NO_INSTALL) | ||||
do-install: | do-install: | ||||
@(cd ${INSTALL_WRKSRC} && ${SETENV} ${MAKE_ENV} ${FAKEROOT} ${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET}) | @(cd ${INSTALL_WRKSRC} && ${SETENV} ${MAKE_ENV} ${FAKEROOT} ${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET}) | ||||
.endif | .endif | ||||
# Test | |||||
.if !target(do-test) && defined(TEST_TARGET) | |||||
DO_MAKE_TEST?= ${SETENV} ${TEST_ENV} ${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} ${TEST_ARGS:C,^${DESTDIRNAME}=.*,,g} | |||||
do-test: | |||||
@(cd ${TEST_WRKSRC}; if ! ${DO_MAKE_TEST} ${TEST_TARGET}; then \ | |||||
if [ -n "${TEST_FAIL_MESSAGE}" ] ; then \ | |||||
${ECHO_MSG} "===> Tests failed unexpectedly."; \ | |||||
(${ECHO_CMD} "${TEST_FAIL_MESSAGE}") | ${FMT} 75 79 ; \ | |||||
fi; \ | |||||
${FALSE}; \ | |||||
fi) | |||||
.elif !target(do-test) | |||||
do-test: | |||||
@${DO_NADA} | |||||
.endif | |||||
# Package | # Package | ||||
.if !target(do-package) | .if !target(do-package) | ||||
PKG_CREATE_ARGS= -r ${STAGEDIR} -m ${METADIR} -p ${TMPPLIST} | PKG_CREATE_ARGS= -r ${STAGEDIR} -m ${METADIR} -p ${TMPPLIST} | ||||
.if defined(PKG_CREATE_VERBOSE) | .if defined(PKG_CREATE_VERBOSE) | ||||
PKG_CREATE_ARGS+= -v | PKG_CREATE_ARGS+= -v | ||||
.endif | .endif | ||||
do-package: create-manifest | do-package: create-manifest | ||||
▲ Show 20 Lines • Show All 270 Lines • ▼ Show 20 Lines | |||||
configure-message: | configure-message: | ||||
@${ECHO_MSG} "===> Configuring for ${PKGNAME}" | @${ECHO_MSG} "===> Configuring for ${PKGNAME}" | ||||
build-message: | build-message: | ||||
@${ECHO_MSG} "===> Building for ${PKGNAME}" | @${ECHO_MSG} "===> Building for ${PKGNAME}" | ||||
stage-message: | stage-message: | ||||
@${ECHO_MSG} "===> Staging for ${PKGNAME}" | @${ECHO_MSG} "===> Staging for ${PKGNAME}" | ||||
install-message: | install-message: | ||||
@${ECHO_MSG} "===> Installing for ${PKGNAME}" | @${ECHO_MSG} "===> Installing for ${PKGNAME}" | ||||
test-message: | |||||
@${ECHO_MSG} "===> Testing for ${PKGNAME}" | |||||
package-message: | package-message: | ||||
@${ECHO_MSG} "===> Building package for ${PKGNAME}" | @${ECHO_MSG} "===> Building package for ${PKGNAME}" | ||||
# Empty pre-* and post-* targets | # Empty pre-* and post-* targets | ||||
.for stage in pre post | .for stage in pre post | ||||
.for name in pkg check-sanity fetch extract patch configure build stage install package | .for name in pkg check-sanity fetch extract patch configure build stage install package | ||||
▲ Show 20 Lines • Show All 504 Lines • ▼ Show 20 Lines | |||||
################################################################ | ################################################################ | ||||
# Dependency checking | # Dependency checking | ||||
################################################################ | ################################################################ | ||||
.if !target(depends) | .if !target(depends) | ||||
depends: pkg-depends extract-depends patch-depends lib-depends fetch-depends build-depends run-depends | depends: pkg-depends extract-depends patch-depends lib-depends fetch-depends build-depends run-depends | ||||
.for deptype in PKG EXTRACT PATCH FETCH BUILD LIB RUN | .for deptype in PKG EXTRACT PATCH FETCH BUILD LIB RUN TEST | ||||
${deptype:tl}-depends: | ${deptype:tl}-depends: | ||||
.if defined(${deptype}_DEPENDS) && !defined(NO_DEPENDS) | .if defined(${deptype}_DEPENDS) && !defined(NO_DEPENDS) | ||||
@${SETENV} \ | @${SETENV} \ | ||||
dp_RAWDEPENDS="${${deptype}_DEPENDS}" \ | dp_RAWDEPENDS="${${deptype}_DEPENDS}" \ | ||||
dp_DEPTYPE="${deptype}_DEPENDS" \ | dp_DEPTYPE="${deptype}_DEPENDS" \ | ||||
dp_DEPENDS_TARGET="${DEPENDS_TARGET}" \ | dp_DEPENDS_TARGET="${DEPENDS_TARGET}" \ | ||||
dp_DEPENDS_PRECLEAN="${DEPENDS_PRECLEAN}" \ | dp_DEPENDS_PRECLEAN="${DEPENDS_PRECLEAN}" \ | ||||
dp_DEPENDS_CLEAN="${DEPENDS_CLEAN}" \ | dp_DEPENDS_CLEAN="${DEPENDS_CLEAN}" \ | ||||
Show All 14 Lines | @${SETENV} \ | ||||
${SH} ${SCRIPTSDIR}/do-depends.sh | ${SH} ${SCRIPTSDIR}/do-depends.sh | ||||
.endif | .endif | ||||
.endfor | .endfor | ||||
.endif | .endif | ||||
# Dependency lists: both build and runtime, recursive. Print out directory names. | # Dependency lists: both build and runtime, recursive. Print out directory names. | ||||
_UNIFIED_DEPENDS=${PKG_DEPENDS} ${EXTRACT_DEPENDS} ${PATCH_DEPENDS} ${FETCH_DEPENDS} ${BUILD_DEPENDS} ${LIB_DEPENDS} ${RUN_DEPENDS} | _UNIFIED_DEPENDS=${PKG_DEPENDS} ${EXTRACT_DEPENDS} ${PATCH_DEPENDS} ${FETCH_DEPENDS} ${BUILD_DEPENDS} ${LIB_DEPENDS} ${RUN_DEPENDS} ${TEST_DEPENDS} | ||||
_DEPEND_SPECIALS= ${_UNIFIED_DEPENDS:M*\:*\:*:C,^[^:]*:([^:]*):.*$,\1,} | _DEPEND_SPECIALS= ${_UNIFIED_DEPENDS:M*\:*\:*:C,^[^:]*:([^:]*):.*$,\1,} | ||||
all-depends-list: | all-depends-list: | ||||
@${ALL-DEPENDS-LIST} | @${ALL-DEPENDS-LIST} | ||||
ALL-DEPENDS-LIST= \ | ALL-DEPENDS-LIST= \ | ||||
${SETENV} dp_ALLDEPENDS="${_UNIFIED_DEPENDS}" \ | ${SETENV} dp_ALLDEPENDS="${_UNIFIED_DEPENDS}" \ | ||||
dp_PORTSDIR="${PORTSDIR}" \ | dp_PORTSDIR="${PORTSDIR}" \ | ||||
▲ Show 20 Lines • Show All 150 Lines • ▼ Show 20 Lines | for dir in $$(${ECHO_CMD} "${_LIB_RUN_DEPENDS:C,.*:([^:]*).*,\1,}" | ${SED} -e 'y/ /\n/' | ${SORT} -u); do \ | ||||
esac ; \ | esac ; \ | ||||
if [ -d $$pdir ]; then \ | if [ -d $$pdir ]; then \ | ||||
${ECHO_CMD} $$pdir; \ | ${ECHO_CMD} $$pdir; \ | ||||
else \ | else \ | ||||
${ECHO_MSG} "${PKGNAME}: \"$$pdir\" non-existent -- dependency list incomplete" >&2; \ | ${ECHO_MSG} "${PKGNAME}: \"$$pdir\" non-existent -- dependency list incomplete" >&2; \ | ||||
fi; \ | fi; \ | ||||
done | ${SORT} -u | done | ${SORT} -u | ||||
test-depends-list: | |||||
.if defined(TEST_DEPENDS) | |||||
@${TEST-DEPENDS-LIST} | |||||
.endif | |||||
TEST-DEPENDS-LIST= \ | |||||
${SETENV} dp_ALLDEPENDS="${TEST_DEPENDS}" \ | |||||
dp_PORTSDIR="${PORTSDIR}" \ | |||||
dp_PKGNAME="${PKGNAME}" \ | |||||
dp_SCRIPTSDIR="${SCRIPTSDIR}" \ | |||||
${SH} ${SCRIPTSDIR}/depends-list.sh | |||||
# Package (recursive runtime) dependency list. Print out both directory names | # Package (recursive runtime) dependency list. Print out both directory names | ||||
# and package names. | # and package names. | ||||
package-depends-list: | package-depends-list: | ||||
.if defined(CHILD_DEPENDS) || defined(LIB_DEPENDS) || defined(RUN_DEPENDS) | .if defined(CHILD_DEPENDS) || defined(LIB_DEPENDS) || defined(RUN_DEPENDS) | ||||
@${PACKAGE-DEPENDS-LIST} | @${PACKAGE-DEPENDS-LIST} | ||||
.endif | .endif | ||||
▲ Show 20 Lines • Show All 1,082 Lines • ▼ Show 20 Lines | .endfor | ||||
@${ECHO_MSG} | @${ECHO_MSG} | ||||
@${FALSE} | @${FALSE} | ||||
.endif | .endif | ||||
.endif #DEVELOPER | .endif #DEVELOPER | ||||
# Please note that the order of the following targets is important, and | # Please note that the order of the following targets is important, and | ||||
# should not be modified. | # should not be modified. | ||||
_TARGETS_STAGES= SANITY PKG FETCH EXTRACT PATCH CONFIGURE BUILD INSTALL PACKAGE STAGE | _TARGETS_STAGES= SANITY PKG FETCH EXTRACT PATCH CONFIGURE BUILD INSTALL TEST PACKAGE STAGE | ||||
# Define the SEQ of actions to take when each target is ran, and which targets | # Define the SEQ of actions to take when each target is ran, and which targets | ||||
# it depends on before running its SEQ. | # it depends on before running its SEQ. | ||||
# | # | ||||
# Main target has a priority of 500, pre-target 300, post-target 700, | # Main target has a priority of 500, pre-target 300, post-target 700, | ||||
# target-depends 150. Other targets are spaced in between those | # target-depends 150. Other targets are spaced in between those | ||||
# | # | ||||
# If you change the pre-foo and post-foo values here, go and keep them in sync | # If you change the pre-foo and post-foo values here, go and keep them in sync | ||||
▲ Show 20 Lines • Show All 47 Lines • ▼ Show 20 Lines | _STAGE_SEQ= 050:stage-message 100:stage-dir 150:run-depends \ | ||||
880:install-license 890:install-desktop-entries \ | 880:install-license 890:install-desktop-entries \ | ||||
900:add-plist-info 910:add-plist-docs 920:add-plist-examples \ | 900:add-plist-info 910:add-plist-docs 920:add-plist-examples \ | ||||
930:add-plist-data 940:add-plist-post ${POST_PLIST:C/^/990:/} \ | 930:add-plist-data 940:add-plist-post ${POST_PLIST:C/^/990:/} \ | ||||
${_OPTIONS_install} ${_USES_install} \ | ${_OPTIONS_install} ${_USES_install} \ | ||||
${_OPTIONS_stage} ${_USES_stage} | ${_OPTIONS_stage} ${_USES_stage} | ||||
.if defined(DEVELOPER) | .if defined(DEVELOPER) | ||||
_STAGE_SEQ+= 995:stage-qa | _STAGE_SEQ+= 995:stage-qa | ||||
.endif | .endif | ||||
_TEST_DEP= stage | |||||
_TEST_SEQ= 100:test-message 150:test-depends 300:pre-test 500:do-test \ | |||||
800:post-test \ | |||||
${_OPTIONS_test} ${_USES_test} | |||||
_INSTALL_DEP= stage | _INSTALL_DEP= stage | ||||
_INSTALL_SEQ= 100:install-message 150:run-depends 151:lib-depends \ | _INSTALL_SEQ= 100:install-message 150:run-depends 151:lib-depends \ | ||||
200:check-already-installed | 200:check-already-installed | ||||
_INSTALL_SUSEQ= 300:fake-pkg 500:security-check | _INSTALL_SUSEQ= 300:fake-pkg 500:security-check | ||||
_PACKAGE_DEP= stage | _PACKAGE_DEP= stage | ||||
_PACKAGE_SEQ= 100:package-message 300:pre-package 450:pre-package-script \ | _PACKAGE_SEQ= 100:package-message 300:pre-package 450:pre-package-script \ | ||||
500:do-package 850:post-package-script \ | 500:do-package 850:post-package-script \ | ||||
Show All 34 Lines | |||||
. endfor | . endfor | ||||
.ORDER: ${_${_t}_DEP} ${_${_t}_REAL_SEQ} | .ORDER: ${_${_t}_DEP} ${_${_t}_REAL_SEQ} | ||||
.endfor | .endfor | ||||
# Define all of the main targets which depend on a sequence of other targets. | # Define all of the main targets which depend on a sequence of other targets. | ||||
# See above *_SEQ and *_DEP. The _DEP will run before this defined target is | # See above *_SEQ and *_DEP. The _DEP will run before this defined target is | ||||
# ran. The _SEQ will run as this target once _DEP is satisfied. | # ran. The _SEQ will run as this target once _DEP is satisfied. | ||||
.for target in extract patch configure build stage install package | .for target in extract patch configure build stage install test package | ||||
# Check if config dialog needs to show and execute it if needed. If is it not | # Check if config dialog needs to show and execute it if needed. If is it not | ||||
# needed (_OPTIONS_OK), then just depend on the cookie which is defined later | # needed (_OPTIONS_OK), then just depend on the cookie which is defined later | ||||
# 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} | ||||
▲ Show 20 Lines • Show All 65 Lines • Show Last 20 Lines |