Index: en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml =================================================================== --- en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml +++ en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml @@ -4655,6 +4655,134 @@ + + + Generic Target Additions + + For any of these 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 + + + + + + <literal><replaceable>ABOVETARGET</replaceable>-<replaceable>OPT</replaceable>-on</literal> + + 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 + + + + + <literal><replaceable>ABOVETARGET</replaceable>-<replaceable>OPT</replaceable>-off</literal> + + 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 + +