Changeset View
Standalone View
en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml
Show First 20 Lines • Show All 3,533 Lines • ▼ Show 20 Lines | .include "${MASTERDIR}/Makefile"</programlisting> | ||||
</sect1> | </sect1> | ||||
<sect1 xml:id="makefile-manpages"> | <sect1 xml:id="makefile-manpages"> | ||||
<title>Man Pages</title> | <title>Man Pages</title> | ||||
<para>If the port anchors its man tree somewhere other than | <para>If the port anchors its man tree somewhere other than | ||||
<varname>PREFIX</varname>, use | <varname>PREFIX</varname>, use | ||||
<varname>MANDIRS</varname> to specify those directories. Note | <varname>MANDIRS</varname> to specify those directories. Note | ||||
that the files corresponding to manual pages must be be placed in | that the files corresponding to manual pages must be placed in | ||||
<filename>pkg-plist</filename> along with the rest of the files. | <filename>pkg-plist</filename> along with the rest of the files. | ||||
The purpose of <varname>MANDIRS</varname> is to enable automatic | The purpose of <varname>MANDIRS</varname> is to enable automatic | ||||
compression of manual pages, therefore the file names are | compression of manual pages, therefore the file names are | ||||
suffixed with <filename>.gz</filename>.</para> | suffixed with <filename>.gz</filename>.</para> | ||||
</sect1> | </sect1> | ||||
<sect1 xml:id="makefile-info"> | <sect1 xml:id="makefile-info"> | ||||
<title>Info Files</title> | <title>Info Files</title> | ||||
▲ Show 20 Lines • Show All 826 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> | ||||
<note> | |||||
<para>Some variables are not in this list, in particular | |||||
<varname>PKGNAMEPREFIX</varname> and | |||||
<varname>PKGNAMESUFFIX</varname>. This is intentional. A | |||||
wblock: "This is intentional" is probably a better way to say that. The sentence can be split there… | |||||
port <emphasis>must not</emphasis> change its name when | |||||
its option set changes.</para> | |||||
Not Done Inline Actionss/change/changes/ wblock: s/change/changes/ | |||||
</note> | |||||
<warning> | <warning> | ||||
<para>Some of these variables, at least | <para>Some of these variables, at least | ||||
<varname>ALL_TARGET</varname> and | <varname>ALL_TARGET</varname> and | ||||
<varname>INSTALL_TARGET</varname>, have their default | <varname>INSTALL_TARGET</varname>, have their default | ||||
values set <emphasis>after</emphasis> the options are | values set <emphasis>after</emphasis> the options are | ||||
processed.</para> | processed.</para> | ||||
<para>With these lines in the | <para>With these lines in the | ||||
▲ Show 20 Lines • Show All 83 Lines • ▼ Show 20 Lines | <sect1 xml:id="makefile-wrkdir"> | ||||
<programlisting>PORTNAME= foo | <programlisting>PORTNAME= foo | ||||
PORTVERSION= 1.0</programlisting> | PORTVERSION= 1.0</programlisting> | ||||
<para>then the port's distribution files contain a top-level | <para>then the port's distribution files contain a top-level | ||||
directory, <filename>foo-1.0</filename>, and the rest of the | directory, <filename>foo-1.0</filename>, and the rest of the | ||||
files are located under that directory.</para> | files are located under that directory.</para> | ||||
<para>A number of variables can overriden if that is | <para>A number of variables can be overridden if that is | ||||
Not Done Inline Actionss/can/can be/ wblock: s/can/can be/ | |||||
not the case.</para> | not the case.</para> | ||||
<sect2 xml:id="makefile-wrksrc"> | <sect2 xml:id="makefile-wrksrc"> | ||||
<title><varname>WRKSRC</varname></title> | <title><varname>WRKSRC</varname></title> | ||||
<para>The variable lists the name of the directory that is | <para>The variable lists the name of the directory that is | ||||
created when the application's distfiles are extracted. If | created when the application's distfiles are extracted. If | ||||
our previous example extracted into a directory called | our previous example extracted into a directory called | ||||
▲ Show 20 Lines • Show All 93 Lines • ▼ Show 20 Lines | PORTVERSION= 1.0</programlisting> | ||||
Macros</title> | Macros</title> | ||||
<para>Use the macros provided in | <para>Use the macros provided in | ||||
<filename>bsd.port.mk</filename> to ensure correct modes of | <filename>bsd.port.mk</filename> to ensure correct modes of | ||||
files in the port's <buildtarget>*-install</buildtarget> | files in the port's <buildtarget>*-install</buildtarget> | ||||
targets. Set ownership directly in | targets. Set ownership directly in | ||||
<filename>pkg-plist</filename> with the corresponding entries, | <filename>pkg-plist</filename> with the corresponding entries, | ||||
such as | such as | ||||
<literal>@owner <replaceable>owner</replaceable></literal> and | <literal>@(<replaceable>owner</replaceable>,<replaceable>group</replaceable>,)</literal>, | ||||
<literal>@owner <replaceable>owner</replaceable></literal>, and | |||||
<literal>@group <replaceable>group</replaceable></literal>. | <literal>@group <replaceable>group</replaceable></literal>. | ||||
These operators work until being overridden, or until the end | These operators work until overridden, or until the end | ||||
Not Done Inline Actions"being overridden" means the same as just "overridden": These operators work until overridden, or... wblock: "being overridden" means the same as just "overridden":
These operators work until overridden… | |||||
of <filename>pkg-plist</filename>, so do not forget to reset | of <filename>pkg-plist</filename>, so do not forget to reset | ||||
them after they are no longer needed. The default ownership | them after they are no longer needed. The default ownership | ||||
is <literal>root:wheel</literal>.</para> | is <literal>root:wheel</literal>. See <xref | ||||
linkend="plist-keywords-base"/> for more information.</para> | |||||
<itemizedlist> | <itemizedlist> | ||||
<listitem> | <listitem> | ||||
<para><varname>INSTALL_PROGRAM</varname> is a command to | <para><varname>INSTALL_PROGRAM</varname> is a command to | ||||
install binary executables.</para> | install binary executables.</para> | ||||
</listitem> | </listitem> | ||||
<listitem> | <listitem> | ||||
Show All 21 Lines | PORTVERSION= 1.0</programlisting> | ||||
<listitem> | <listitem> | ||||
<para><varname>INSTALL_MAN</varname> is a command to | <para><varname>INSTALL_MAN</varname> is a command to | ||||
install manpages and other documentation (it does not | install manpages and other documentation (it does not | ||||
compress anything).</para> | compress anything).</para> | ||||
</listitem> | </listitem> | ||||
</itemizedlist> | </itemizedlist> | ||||
<para>These are the <command>install</command> | <para>These variables are set to the &man.install.1; command | ||||
command with all the appropriate flags.</para> | with the appropriate flags for each situation.</para> | ||||
Not Done Inline ActionsHmm. Should be "installed". "&man.install.1;ed" might look okay. wblock: Hmm. Should be "installed". "&man.install.1;ed" might look okay. | |||||
Not Done Inline ActionsMmmm, no, I started with "These are <command>install</command> with ..." and thought that using &man.install.1; was better. The sentence is maybe badly written though. The idea is that the previous INSTALL_* macros are the install command with flags, maybe the original was better and should not be touched. Or maybe "the &man.install.1; command" or something. mat: Mmmm, no, I started with "These are <command>install</command> with ..." and thought that using… | |||||
Not Done Inline ActionsHow about: These variables are set to the &man.install.1; command with the appropriate flags for each situation. wblock: How about:
These variables are set to the &man.install.1; command with the appropriate flags… | |||||
<note> | <important> | ||||
<para>Do not use <varname>INSTALL_LIB</varname> to install | <para>Do not use <varname>INSTALL_LIB</varname> to install | ||||
static libraries, because stripping them render them | static libraries, because stripping them renders them | ||||
Not Done Inline Actionss/render/renders/ wblock: s/render/renders/ | |||||
useless. Use <varname>INSTALL_DATA</varname> | useless. Use <varname>INSTALL_DATA</varname> | ||||
instead.</para> | instead.</para> | ||||
</note> | </important> | ||||
</sect2> | </sect2> | ||||
<sect2 xml:id="install-strip"> | <sect2 xml:id="install-strip"> | ||||
<title>Stripping Binaries and Shared Libraries</title> | <title>Stripping Binaries and Shared Libraries</title> | ||||
<para>Installed binaries should be stripped. Do not strip | <para>Installed binaries should be stripped. Do not strip | ||||
binaries manually unless forced to. The | binaries manually unless absolutely required. The | ||||
Not Done Inline Actionss/forced to/absolutely required/ wblock: s/forced to/absolutely required/ | |||||
Not Done Inline ActionsPassive->Active s/will install/installs/ wblock: Passive->Active
s/will install/installs/ | |||||
<varname>INSTALL_PROGRAM</varname> macro will install and | <varname>INSTALL_PROGRAM</varname> macro installs and | ||||
strip a binary at the same time (see the next section). The | strips a binary at the same time. The | ||||
Not Done Inline Actionss/strip/strips/ wblock: s/strip/strips/ | |||||
<varname>INSTALL_LIB</varname> macro does the same thing to | <varname>INSTALL_LIB</varname> macro does the same thing to | ||||
shared libraries.</para> | shared libraries.</para> | ||||
<para>When a file must be stripped, but neither | <para>When a file must be stripped, but neither | ||||
<varname>INSTALL_PROGRAM</varname> nor | <varname>INSTALL_PROGRAM</varname> nor | ||||
<varname>INSTALL_LIB</varname> macros are desirable, | <varname>INSTALL_LIB</varname> macros are desirable, | ||||
<literal>${STRIP_CMD}</literal> will strip the program or | <literal>${STRIP_CMD}</literal> strips the program or | ||||
Not Done Inline Actionss/will strip/strips/ wblock: s/will strip/strips/ | |||||
shared library. This is typically done within the | shared library. This is typically done within the | ||||
<buildtarget>post-install</buildtarget> target. For | <buildtarget>post-install</buildtarget> target. For | ||||
example:</para> | example:</para> | ||||
<programlisting>post-install: | <programlisting>post-install: | ||||
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/xdl</programlisting> | ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/xdl</programlisting> | ||||
<para>When multiple files need to be stripped:</para> | <para>When multiple files need to be stripped:</para> | ||||
▲ Show 20 Lines • Show All 227 Lines • Show Last 20 Lines |
"This is intentional" is probably a better way to say that. The sentence can be split there:
This is intentional. A