From a537dd69f90f860e69924ebdb59cf5e27f892356 Mon Sep 17 00:00:00 2001 From: Mathieu Arnold Date: Fri, 24 Jul 2015 12:43:05 +0000 Subject: [PATCH] Document the target helpers introduced in rP391051. Reviewed by: wblock Sponsored by: Absolight Differential Revision: https://reviews.freebsd.org/D2957 --- .../porters-handbook/makefiles/chapter.xml | 135 ++++++++++++++++++ 1 file changed, 135 insertions(+) diff --git a/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml b/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml index 2589515ad7..81b2a01392 100644 --- a/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml +++ b/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml @@ -4425,6 +4425,8 @@ QMAKE_ARGS+= -DTEST:BOOL=false + The following variables can be used. + <varname><replaceable>OPT</replaceable>_<replaceable>ABOVEVARIABLE</replaceable></varname> @@ -4574,6 +4576,8 @@ LIB_DEPENDS+= liba.so:${PORTSDIR}/devel/a + The following variables can be used. + Some variables are not in this list, in particular PKGNAMEPREFIX and @@ -4662,6 +4666,137 @@ USES+= gmake + + + Additional Build Targets + + These Makefile targets can accept + optional extra build targets: + + + + pre-fetch + + + + post-fetch + + + + pre-extract + + + + post-extract + + + + pre-patch + + + + post-patch + + + + pre-configure + + + + post-configure + + + + pre-build + + + + post-build + + + + pre-install + + + + post-install + + + + pre-package + + + + post-package + + + + pre-stage + + + + post-stage + + + + The additional build targets are listed below. + + + + <buildtarget><replaceable>ABOVETARGET</replaceable>-<replaceable>OPT</replaceable>-on</buildtarget> + + When option OPT is + selected, the target + ABOVETARGET-OPT-on, + if defined, is executed after + ABOVETARGET. + For example: + + OPTIONS_DEFINE= OPT1 + +post-patch-OPT1-on: + @${REINPLACE_CMD} -e '/opt1/d' ${WRKSRC}/Makefile + + is equivalent to: + + OPTIONS_DEFINE= OPT1 + +.include <bsd.port.options.mk> + +post-patch: +.if ${PORT_OPTIONS:MOPT1} + @${REINPLACE_CMD} -e '/opt1/d' ${WRKSRC}/Makefile +.endif + + + + + <buildtarget><replaceable>ABOVETARGET</replaceable>-<replaceable>OPT</replaceable>-off</buildtarget> + + When option OPT is + not selected, the target + ABOVETARGET-OPT-off, + if defined, is executed after + ABOVETARGET. + For example: + + OPTIONS_DEFINE= OPT1 + +post-patch-OPT1-off: + @${REINPLACE_CMD} -e '/opt1/d' ${WRKSRC}/Makefile + + is equivalent to: + + OPTIONS_DEFINE= OPT1 + +.include <bsd.port.options.mk> + +post-patch: +.if !${PORT_OPTIONS:MOPT1} + @${REINPLACE_CMD} -e '/opt1/d' ${WRKSRC}/Makefile +.endif + +