Changeset View
Changeset View
Standalone View
Standalone View
head/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml
Show First 20 Lines • Show All 4,419 Lines • ▼ Show 20 Lines | <listitem> | ||||
<para><varname>LIB_DEPENDS</varname></para> | <para><varname>LIB_DEPENDS</varname></para> | ||||
</listitem> | </listitem> | ||||
<listitem> | <listitem> | ||||
<para><varname>RUN_DEPENDS</varname></para> | <para><varname>RUN_DEPENDS</varname></para> | ||||
</listitem> | </listitem> | ||||
</itemizedlist> | </itemizedlist> | ||||
<para>The following variables can be used.</para> | |||||
<sect4> | <sect4> | ||||
<title><varname><replaceable>OPT</replaceable>_<replaceable>ABOVEVARIABLE</replaceable></varname></title> | <title><varname><replaceable>OPT</replaceable>_<replaceable>ABOVEVARIABLE</replaceable></varname></title> | ||||
<para>When option <replaceable>OPT</replaceable> is | <para>When option <replaceable>OPT</replaceable> is | ||||
selected, the value of | selected, the value of | ||||
<varname><replaceable>OPT</replaceable>_<replaceable>ABOVEVARIABLE</replaceable></varname>, | <varname><replaceable>OPT</replaceable>_<replaceable>ABOVEVARIABLE</replaceable></varname>, | ||||
if defined, is appended to | if defined, is appended to | ||||
<literal><replaceable>ABOVEVARIABLE</replaceable></literal>. | <literal><replaceable>ABOVEVARIABLE</replaceable></literal>. | ||||
▲ Show 20 Lines • Show All 133 Lines • ▼ Show 20 Lines | <listitem> | ||||
<para><varname>PLIST_SUB</varname></para> | <para><varname>PLIST_SUB</varname></para> | ||||
</listitem> | </listitem> | ||||
<listitem> | <listitem> | ||||
<para><varname>USES</varname></para> | <para><varname>USES</varname></para> | ||||
</listitem> | </listitem> | ||||
</itemizedlist> | </itemizedlist> | ||||
<para>The following variables can be used.</para> | |||||
<note> | <note> | ||||
<para>Some variables are not in this list, in particular | <para>Some variables are not in this list, in particular | ||||
<varname>PKGNAMEPREFIX</varname> and | <varname>PKGNAMEPREFIX</varname> and | ||||
<varname>PKGNAMESUFFIX</varname>. This is intentional. A | <varname>PKGNAMESUFFIX</varname>. This is intentional. A | ||||
port <emphasis>must not</emphasis> change its name when | port <emphasis>must not</emphasis> change its name when | ||||
its option set changes.</para> | its option set changes.</para> | ||||
</note> | </note> | ||||
▲ Show 20 Lines • Show All 70 Lines • ▼ Show 20 Lines | OPT1_USES_OFF= gmake</programlisting> | ||||
<programlisting>OPTIONS_DEFINE= OPT1 | <programlisting>OPTIONS_DEFINE= OPT1 | ||||
.include <bsd.port.options.mk> | .include <bsd.port.options.mk> | ||||
.if ! ${PORT_OPTIONS:MOPT1} | .if ! ${PORT_OPTIONS:MOPT1} | ||||
USES+= gmake | USES+= gmake | ||||
.endif</programlisting> | .endif</programlisting> | ||||
</sect4> | |||||
</sect3> | |||||
<sect3 xml:id="options-targets"> | |||||
<title>Additional Build Targets</title> | |||||
<para>These <filename>Makefile</filename> targets can accept | |||||
optional extra build targets:</para> | |||||
<itemizedlist> | |||||
<listitem> | |||||
<para><buildtarget>pre-fetch</buildtarget></para> | |||||
</listitem> | |||||
<listitem> | |||||
<para><buildtarget>post-fetch</buildtarget></para> | |||||
</listitem> | |||||
<listitem> | |||||
<para><buildtarget>pre-extract</buildtarget></para> | |||||
</listitem> | |||||
<listitem> | |||||
<para><buildtarget>post-extract</buildtarget></para> | |||||
</listitem> | |||||
<listitem> | |||||
<para><buildtarget>pre-patch</buildtarget></para> | |||||
</listitem> | |||||
<listitem> | |||||
<para><buildtarget>post-patch</buildtarget></para> | |||||
</listitem> | |||||
<listitem> | |||||
<para><buildtarget>pre-configure</buildtarget></para> | |||||
</listitem> | |||||
<listitem> | |||||
<para><buildtarget>post-configure</buildtarget></para> | |||||
</listitem> | |||||
<listitem> | |||||
<para><buildtarget>pre-build</buildtarget></para> | |||||
</listitem> | |||||
<listitem> | |||||
<para><buildtarget>post-build</buildtarget></para> | |||||
</listitem> | |||||
<listitem> | |||||
<para><buildtarget>pre-install</buildtarget></para> | |||||
</listitem> | |||||
<listitem> | |||||
<para><buildtarget>post-install</buildtarget></para> | |||||
</listitem> | |||||
<listitem> | |||||
<para><buildtarget>pre-package</buildtarget></para> | |||||
</listitem> | |||||
<listitem> | |||||
<para><buildtarget>post-package</buildtarget></para> | |||||
</listitem> | |||||
<listitem> | |||||
<para><buildtarget>pre-stage</buildtarget></para> | |||||
</listitem> | |||||
<listitem> | |||||
<para><buildtarget>post-stage</buildtarget></para> | |||||
</listitem> | |||||
</itemizedlist> | |||||
<para>The additional build targets are listed below.</para> | |||||
<sect4 xml:id="options-targets-on"> | |||||
<!-- XXX: Should be <buildtarget> and not <literal> --> | |||||
<title><buildtarget><replaceable>ABOVETARGET</replaceable>-<replaceable>OPT</replaceable>-on</buildtarget></title> | |||||
<para>When option <replaceable>OPT</replaceable> is | |||||
selected, the target | |||||
<buildtarget><replaceable>ABOVETARGET</replaceable>-<replaceable>OPT</replaceable>-on</buildtarget>, | |||||
if defined, is executed after | |||||
<buildtarget><replaceable>ABOVETARGET</replaceable></buildtarget>. | |||||
For example:</para> | |||||
<programlisting>OPTIONS_DEFINE= OPT1 | |||||
post-patch-OPT1-on: | |||||
@${REINPLACE_CMD} -e '/opt1/d' ${WRKSRC}/Makefile</programlisting> | |||||
<para>is equivalent to:</para> | |||||
<programlisting>OPTIONS_DEFINE= OPT1 | |||||
.include <bsd.port.options.mk> | |||||
post-patch: | |||||
.if ${PORT_OPTIONS:MOPT1} | |||||
@${REINPLACE_CMD} -e '/opt1/d' ${WRKSRC}/Makefile | |||||
.endif</programlisting> | |||||
</sect4> | |||||
<sect4 xml:id="options-targets-off"> | |||||
<!-- XXX: Should be <buildtarget> and not <literal> --> | |||||
<title><buildtarget><replaceable>ABOVETARGET</replaceable>-<replaceable>OPT</replaceable>-off</buildtarget></title> | |||||
<para>When option <replaceable>OPT</replaceable> is | |||||
not selected, the target | |||||
<buildtarget><replaceable>ABOVETARGET</replaceable>-<replaceable>OPT</replaceable>-off</buildtarget>, | |||||
if defined, is executed after | |||||
<buildtarget><replaceable>ABOVETARGET</replaceable></buildtarget>. | |||||
For example:</para> | |||||
<programlisting>OPTIONS_DEFINE= OPT1 | |||||
post-patch-OPT1-off: | |||||
@${REINPLACE_CMD} -e '/opt1/d' ${WRKSRC}/Makefile</programlisting> | |||||
<para>is equivalent to:</para> | |||||
<programlisting>OPTIONS_DEFINE= OPT1 | |||||
.include <bsd.port.options.mk> | |||||
post-patch: | |||||
.if !${PORT_OPTIONS:MOPT1} | |||||
@${REINPLACE_CMD} -e '/opt1/d' ${WRKSRC}/Makefile | |||||
.endif</programlisting> | |||||
</sect4> | </sect4> | ||||
</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 447 Lines • Show Last 20 Lines |