Changeset View
Changeset View
Standalone View
Standalone View
head/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
Show First 20 Lines • Show All 7,575 Lines • ▼ Show 20 Lines | <para>When option <replaceable>OPT</replaceable> is | ||||
if defined, is executed after | if defined, is executed after | ||||
<buildtarget><replaceable>TARGET</replaceable></buildtarget>. | <buildtarget><replaceable>TARGET</replaceable></buildtarget>. | ||||
<buildtarget><replaceable>TARGET</replaceable>-<replaceable>OPT</replaceable>-off</buildtarget> | <buildtarget><replaceable>TARGET</replaceable>-<replaceable>OPT</replaceable>-off</buildtarget> | ||||
works the same way, but when <literal>OPT</literal> is | works the same way, but when <literal>OPT</literal> is | ||||
<emphasis>not</emphasis> selected. For example:</para> | <emphasis>not</emphasis> selected. For example:</para> | ||||
<programlisting>OPTIONS_DEFINE= OPT1 | <programlisting>OPTIONS_DEFINE= OPT1 | ||||
post-patch: | |||||
@${REINPLACE_CMD} -e 's/echo/true/' ${WRKSRC}/Makefile | |||||
post-patch-OPT1-on: | post-patch-OPT1-on: | ||||
@${REINPLACE_CMD} -e '/opt1/d' ${WRKSRC}/Makefile | @${REINPLACE_CMD} -e '/opt1/s|/usr/bin/|${EXAMPLESDIR}/|' ${WRKSRC}/Makefile | ||||
post-patch-OPT1-off: | post-patch-OPT1-off: | ||||
@${REINPLACE_CMD} -e '/opt1/s|/usr/bin/|${LOCALBASE}/bin/|' ${WRKSRC}/Makefile</programlisting> | @${REINPLACE_CMD} -e '/opt1/s|/usr/bin/|${PREFIX}/bin/|' ${WRKSRC}/Makefile</programlisting> | ||||
<para>is equivalent to:</para> | <para>is equivalent to:</para> | ||||
<programlisting>OPTIONS_DEFINE= OPT1 | <programlisting>OPTIONS_DEFINE= OPT1 | ||||
.include <bsd.port.options.mk> | .include <bsd.port.options.mk> | ||||
post-patch: | post-patch: | ||||
@${REINPLACE_CMD} -e 's/echo/true/' ${WRKSRC}/Makefile | |||||
.if ${PORT_OPTIONS:MOPT1} | .if ${PORT_OPTIONS:MOPT1} | ||||
@${REINPLACE_CMD} -e '/opt1/d' ${WRKSRC}/Makefile | @${REINPLACE_CMD} -e '/opt1/s|/usr/bin/|${EXAMPLESDIR}/|' ${WRKSRC}/Makefile | ||||
.else | .else | ||||
@${REINPLACE_CMD} -e '/opt1/s|/usr/bin/|${LOCALBASE}/bin/|' ${WRKSRC}/Makefile | @${REINPLACE_CMD} -e '/opt1/s|/usr/bin/|${PREFIX}/bin/|' ${WRKSRC}/Makefile | ||||
.endif</programlisting> | .endif</programlisting> | ||||
</sect3> | </sect3> | ||||
</sect2> | </sect2> | ||||
</sect1> | </sect1> | ||||
<sect1 xml:id="makefile-wrkdir"> | <sect1 xml:id="makefile-wrkdir"> | ||||
<title>Specifying the Working Directory</title> | <title>Specifying the Working Directory</title> | ||||
▲ Show 20 Lines • Show All 581 Lines • Show Last 20 Lines |