Date: Thu, 9 Apr 2015 15:06:13 +0000 (UTC) From: Mathieu Arnold <mat@FreeBSD.org> To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r46509 - head/en_US.ISO8859-1/books/porters-handbook/makefiles Message-ID: <201504091506.t39F6DpA055235@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mat Date: Thu Apr 9 15:06:13 2015 New Revision: 46509 URL: https://svnweb.freebsd.org/changeset/doc/46509 Log: Some minor fixes to the makefiles chapter. Differential Revision: https://reviews.freebsd.org/D2257 Approved by: wblock (mentor) Sponsored by: Absolight Modified: head/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml Modified: head/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml Thu Apr 9 12:07:27 2015 (r46508) +++ head/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml Thu Apr 9 15:06:13 2015 (r46509) @@ -3539,7 +3539,7 @@ MASTERDIR= ${.CURDIR}/../xdvi300 <para>If the port anchors its man tree somewhere other than <varname>PREFIX</varname>, use <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. The purpose of <varname>MANDIRS</varname> is to enable automatic compression of manual pages, therefore the file names are @@ -4382,6 +4382,14 @@ LIB_DEPENDS+= liba.so:${PORTSDIR}/devel/ </listitem> </itemizedlist> + <note> + <para>Some variables are not in this list, in particular + <varname>PKGNAMEPREFIX</varname> and + <varname>PKGNAMESUFFIX</varname>. This is intentional. A + port <emphasis>must not</emphasis> change its name when + its option set changes.</para> + </note> + <warning> <para>Some of these variables, at least <varname>ALL_TARGET</varname> and @@ -4481,7 +4489,7 @@ PORTVERSION= 1.0</programlisting> directory, <filename>foo-1.0</filename>, and the rest of the 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 the case.</para> <sect2 xml:id="makefile-wrksrc"> @@ -4591,12 +4599,14 @@ PORTVERSION= 1.0</programlisting> targets. Set ownership directly in <filename>pkg-plist</filename> with the corresponding entries, 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>. - These operators work until being overridden, or until the end + These operators work until overridden, or until the end of <filename>pkg-plist</filename>, so do not forget to reset 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> <listitem> @@ -4634,31 +4644,31 @@ PORTVERSION= 1.0</programlisting> </listitem> </itemizedlist> - <para>These are the <command>install</command> - command with all the appropriate flags.</para> + <para>These variables are set to the &man.install.1; command + with the appropriate flags for each situation.</para> - <note> + <important> <para>Do not use <varname>INSTALL_LIB</varname> to install - static libraries, because stripping them render them + static libraries, because stripping them renders them useless. Use <varname>INSTALL_DATA</varname> instead.</para> - </note> + </important> </sect2> <sect2 xml:id="install-strip"> <title>Stripping Binaries and Shared Libraries</title> <para>Installed binaries should be stripped. Do not strip - binaries manually unless forced to. The - <varname>INSTALL_PROGRAM</varname> macro will install and - strip a binary at the same time (see the next section). The + binaries manually unless absolutely required. The + <varname>INSTALL_PROGRAM</varname> macro installs and + strips a binary at the same time. The <varname>INSTALL_LIB</varname> macro does the same thing to shared libraries.</para> <para>When a file must be stripped, but neither <varname>INSTALL_PROGRAM</varname> nor <varname>INSTALL_LIB</varname> macros are desirable, - <literal>${STRIP_CMD}</literal> will strip the program or + <literal>${STRIP_CMD}</literal> strips the program or shared library. This is typically done within the <buildtarget>post-install</buildtarget> target. For example:</para>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201504091506.t39F6DpA055235>