Date: Fri, 21 Mar 2014 14:15:52 +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: r44308 - head/en_US.ISO8859-1/books/porters-handbook/makefiles Message-ID: <201403211415.s2LEFqPX040635@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mat (ports committer) Date: Fri Mar 21 14:15:52 2014 New Revision: 44308 URL: http://svnweb.freebsd.org/changeset/doc/44308 Log: Replaces abuses of <varname> by <literal>. Add <replaceable> where applicable. 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 Fri Mar 21 13:44:50 2014 (r44307) +++ head/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml Fri Mar 21 14:15:52 2014 (r44308) @@ -1492,7 +1492,7 @@ PORTEPOCH= 1</programlisting> only if necessary. <varname>DISTNAME</varname> is only used in two places. First, the distribution file list (<varname>DISTFILES</varname>) defaults to - <varname>${DISTNAME}</varname><varname>${EXTRACT_SUFX}</varname>. + <literal>${DISTNAME}</literal><literal>${EXTRACT_SUFX}</literal>. Second, the distribution file is expected to extract into a subdirectory named <varname>WRKSRC</varname>, which defaults to <filename>work/${DISTNAME}</filename>.</para> @@ -1561,7 +1561,7 @@ PORTEPOCH= 1</programlisting> <varname>WRKSRC</varname> is equal to <filename>work/${DISTNAME}</filename> while the original source archive is named something other than - <varname>${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX}</varname>, + <literal>${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX}</literal>, you should probably leave <varname>DISTNAME</varname> alone— you are better off defining <varname>DISTFILES</varname> than having to set both @@ -1642,92 +1642,92 @@ MASTER_SITE_SUBDIR= stardict/WyabdcRealP <tbody> <row> <entry><varname>APACHE_JAKARTA</varname></entry> - <entry><varname>/dist/jakarta/${PORTNAME:S,-,,/,}/source</varname></entry> + <entry><literal>/dist/jakarta/${PORTNAME:S,-,,/,}/source</literal></entry> </row> <row> <entry><varname>BERLIOS</varname></entry> - <entry><varname>/${PORTNAME:L}</varname></entry> + <entry><literal>/${PORTNAME:L}</literal></entry> </row> <row> <entry><varname>CHEESESHOP</varname></entry> - <entry><varname>/packages/source/source/${DISTNAME:C/(.).*/\1/}/${DISTNAME:C/(.*)-[0-9].*/\1/}</varname></entry> + <entry><literal>/packages/source/source/${DISTNAME:C/(.).*/\1/}/${DISTNAME:C/(.*)-[0-9].*/\1/}</literal></entry> </row> <row> <entry><varname>DEBIAN</varname></entry> - <entry><varname>/debian/pool/main/${PORTNAME:C/^((lib)?.).*$/\1/}/${PORTNAME}</varname></entry> + <entry><literal>/debian/pool/main/${PORTNAME:C/^((lib)?.).*$/\1/}/${PORTNAME}</literal></entry> </row> <row> <entry><varname>GCC</varname></entry> - <entry><varname>/pub/gcc/releases/${DISTNAME}</varname></entry> + <entry><literal>/pub/gcc/releases/${DISTNAME}</literal></entry> </row> <row> <entry><varname>GH</varname></entry> - <entry><varname>/${GH_ACCOUNT}/${GH_PROJECT}/legacy.tar.gz/${GH_TAGNAME}?dummy=/</varname></entry> + <entry><literal>/${GH_ACCOUNT}/${GH_PROJECT}/legacy.tar.gz/${GH_TAGNAME}?dummy=/</literal></entry> </row> <row> <entry><varname>GHC</varname></entry> - <entry><varname>/downloads/${GH_ACCOUNT}/${GH_PROJECT}/</varname></entry> + <entry><literal>/downloads/${GH_ACCOUNT}/${GH_PROJECT}/</literal></entry> </row> <row> <entry><varname>GNOME</varname></entry> - <entry><varname>/pub/GNOME/sources/${PORTNAME}/${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/}</varname></entry> + <entry><literal>/pub/GNOME/sources/${PORTNAME}/${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/}</literal></entry> </row> <row> <entry><varname>GNU</varname></entry> - <entry><varname>/gnu/${PORTNAME}</varname></entry> + <entry><literal>/gnu/${PORTNAME}</literal></entry> </row> <row> <entry><varname>HORDE</varname></entry> - <entry><varname>/pub/${PORTNAME}</varname></entry> + <entry><literal>/pub/${PORTNAME}</literal></entry> </row> <row> <entry><varname>LOGILAB</varname></entry> - <entry><varname>/pub/${PORTNAME}</varname></entry> + <entry><literal>/pub/${PORTNAME}</literal></entry> </row> <row> <entry><varname>MATE</varname></entry> - <entry><varname>/releases/${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/}</varname></entry> + <entry><literal>/releases/${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/}</literal></entry> </row> <row> <entry><varname>MOZDEV</varname></entry> - <entry><varname>/pub/mozdev/${PORTNAME:L}</varname></entry> + <entry><literal>/pub/mozdev/${PORTNAME:L}</literal></entry> </row> <row> <entry><varname>CPAN</varname></entry> - <entry><varname>/pub/CPAN/modules/by-module/${PORTNAME:C/-.*//}</varname></entry> + <entry><literal>/pub/CPAN/modules/by-module/${PORTNAME:C/-.*//}</literal></entry> </row> <row> <entry><varname>PYTHON</varname></entry> - <entry><varname>/ftp/python/${PYTHON_PORTVERSION:C/rc[0-9]//}</varname></entry> + <entry><literal>/ftp/python/${PYTHON_PORTVERSION:C/rc[0-9]//}</literal></entry> </row> <row> <entry><varname>RUBYFORGE</varname></entry> - <entry><varname>/${PORTNAME:L}</varname></entry> + <entry><literal>/${PORTNAME:L}</literal></entry> </row> <row> <entry><varname>SAVANNAH</varname></entry> - <entry><varname>/${PORTNAME:L}</varname></entry> + <entry><literal>/${PORTNAME:L}</literal></entry> </row> <row> <entry><varname>SF</varname></entry> - <entry><varname>/project/${PORTNAME:L}/${PORTNAME:L}/${PORTVERSION}</varname></entry> + <entry><literal>/project/${PORTNAME:L}/${PORTNAME:L}/${PORTVERSION}</literal></entry> </row> </tbody> </tgroup> @@ -2350,13 +2350,15 @@ DISTFILES= something.tar.gz:sourceforge< </listitem> <listitem> - <para>How do I use this with <varname>PATCH*</varname> + <para>How do I use this with + <varname>PATCH<replaceable>*</replaceable></varname> variables?</para> <para>All examples were done with - <varname>MASTER*</varname> variables but they work - exactly the same for <varname>PATCH*</varname> ones as - can be seen in <xref + <varname>MASTER<replaceable>*</replaceable></varname> + variables but they work exactly the same for + <varname>PATCH<replaceable>*</replaceable></varname> + ones as can be seen in <xref linkend="ports-master-sites-n-example-detailed-use-patch-sites"/>.</para> <example @@ -3033,9 +3035,9 @@ ALWAYS_KEEP_DISTFILES= yes <title>Minimal Version of a Dependency</title> <para>A minimal version of a dependency can be specified in any - <varname>*_DEPENDS</varname> variable except - <varname>LIB_DEPENDS</varname> using the following - syntax:</para> + <varname><replaceable>*</replaceable>_DEPENDS</varname> + variable except <varname>LIB_DEPENDS</varname> using the + following syntax:</para> <programlisting>p5-Spiffy>=0.26:${PORTSDIR}/devel/p5-Spiffy</programlisting> @@ -3055,7 +3057,8 @@ ALWAYS_KEEP_DISTFILES= yes never defined in a port's <filename>Makefile</filename>. If your port needs a special way to handle a dependency, use the <literal>:target</literal> part of the - <varname>*_DEPENDS</varname> variables instead of redefining + <varname><replaceable>*</replaceable>_DEPENDS</varname> + variables instead of redefining <varname>DEPENDS_TARGET</varname>.</para> <para>When you type <command>make clean</command>, its @@ -3067,7 +3070,7 @@ ALWAYS_KEEP_DISTFILES= yes KDE, GNOME or Mozilla.</para> <para>To depend on another port unconditionally, use the - variable <varname>${NONEXISTENT}</varname> as the first field + variable <literal>${NONEXISTENT}</literal> as the first field of <varname>BUILD_DEPENDS</varname> or <varname>RUN_DEPENDS</varname>. Use this only when you need to get the source of the other port. You can often save @@ -3693,11 +3696,16 @@ PLIST_SUB+= OPT1="@comment " NO_OPT1="" <sect3 xml:id="options-configure_enable"> <title><varname><replaceable>X</replaceable>_CONFIGURE_ENABLE</varname></title> - <para>If <varname>X_CONFIGURE_ENABLE</varname> is set then - <literal>--enable-${X_CONFIGURE_ENABLE}</literal> or - <literal>--disable-${X_CONFIGURE_ENABLE}</literal> will be - added to <varname>CONFIGURE_ARGS</varname> depending on the - value of the option<varname>X</varname>, for example:</para> + <para>If + <varname><replaceable>X</replaceable>_CONFIGURE_ENABLE</varname> + is set then + <literal>--enable-${<replaceable>X</replaceable>_CONFIGURE_ENABLE}</literal> + or + <literal>--disable-${<replaceable>X</replaceable>_CONFIGURE_ENABLE}</literal> + will be added to <varname>CONFIGURE_ARGS</varname> depending + on the value of the + option <literal><replaceable>X</replaceable></literal>, for + example:</para> <programlisting>OPTIONS_DEFINE= OPT1 OPT1_CONFIGURE_ENABLE= test</programlisting> @@ -3718,11 +3726,15 @@ CONFIGURE_ARGS+= --disable-test <sect3 xml:id="options-configure_with"> <title><varname><replaceable>X</replaceable>_CONFIGURE_WITH</varname></title> - <para>If <varname>X_CONFIGURE_WITH</varname> is set then - <literal>--with-${X_CONFIGURE_WITH}</literal> or - <literal>--without-${X_CONFIGURE_WITH}</literal> will be - added to <varname>CONFIGURE_ARGS</varname> depending on the - status of the option <varname>X</varname>, for + <para>If + <varname><replaceable>X</replaceable>_CONFIGURE_WITH</varname> + is set then + <literal>--with-${<replaceable>X</replaceable>_CONFIGURE_WITH}</literal> + or + <literal>--without-${<replaceable>X</replaceable>_CONFIGURE_WITH}</literal> + will be added to <varname>CONFIGURE_ARGS</varname> depending + on the status of the option + <literal><replaceable>X</replaceable></literal>, for example:</para> <programlisting>OPTIONS_DEFINE= OPT1 @@ -3744,9 +3756,11 @@ CONFIGURE_ARGS+= --without-test <sect3 xml:id="options-configure_on"> <title><varname><replaceable>X</replaceable>_CONFIGURE_ON</varname></title> - <para>If <varname>X_CONFIGURE_ON</varname> is set then its - value will be appended to <varname>CONFIGURE_ARGS</varname> - depending on the status of the option <varname>X</varname>, + <para>If + <varname><replaceable>X</replaceable>_CONFIGURE_ON</varname> + is set then its value will be appended to + <varname>CONFIGURE_ARGS</varname> depending on the status of + the option <literal><replaceable>X</replaceable></literal>, for example:</para> <programlisting>OPTIONS_DEFINE= OPT1 @@ -3766,9 +3780,11 @@ CONFIGURE_ARGS+= --add-test <sect3 xml:id="options-configure_off"> <title><varname><replaceable>X</replaceable>_CONFIGURE_OFF</varname></title> - <para>If <varname>X_CONFIGURE_OFF</varname> is set then its - value will be appended to <varname>CONFIGURE_ARGS</varname> - depending on the status of the option <varname>X</varname>, + <para>If + <varname><replaceable>X</replaceable>_CONFIGURE_OFF</varname> + is set then its value will be appended to + <varname>CONFIGURE_ARGS</varname> depending on the status of + the option <literal><replaceable>X</replaceable></literal>, for example:</para> <programlisting>OPTIONS_DEFINE= OPT1 @@ -3788,9 +3804,11 @@ CONFIGURE_ARGS+= --no-test <sect3 xml:id="options-cmake_on"> <title><varname><replaceable>X</replaceable>_CMAKE_ON</varname></title> - <para>If <varname>X_CMAKE_ON</varname> is set then its value - will be appended to <varname>CMAKE_ARGS</varname> depending - on the status of the option <varname>X</varname>, for + <para>If + <varname><replaceable>X</replaceable>_CMAKE_ON</varname> is + set then its value will be appended to + <varname>CMAKE_ARGS</varname> depending on the status of the + option <literal><replaceable>X</replaceable></literal>, for example:</para> <programlisting>OPTIONS_DEFINE= OPT1 @@ -3810,9 +3828,11 @@ CMAKE_ARGS+= -DTEST:BOOL=true <sect3 xml:id="options-cmake_off"> <title><varname><replaceable>X</replaceable>_CMAKE_OFF</varname></title> - <para>If <varname>X_CMAKE_OFF</varname> is set then its value - will be appended to <varname>CMAKE_ARGS</varname> depending - on the status of the option <varname>X</varname>, for + <para>If + <varname><replaceable>X</replaceable>_CMAKE_OFF</varname> is + set then its value will be appended to + <varname>CMAKE_ARGS</varname> depending on the status of the + option <literal><replaceable>X</replaceable></literal>, for example:</para> <programlisting>OPTIONS_DEFINE= OPT1 @@ -3867,10 +3887,13 @@ CMAKE_ARGS+= -DTEST:BOOL=false <sect4> <title><varname><replaceable>X</replaceable>_<replaceable>ABOVEVARIABLE</replaceable></varname></title> - <para>If <varname>X_ABOVEVARIABLE</varname> is defined then - its value will be appended to - <varname>ABOVEVARIABLE</varname> depending on the status - of the option <varname>X</varname>, for example:</para> + <para>If + <varname><replaceable>X</replaceable>_<replaceable>ABOVEVARIABLE</replaceable></varname> + is defined then its value will be appended to + <literal><replaceable>ABOVEVARIABLE</replaceable></literal> + depending on the status of the option + <literal><replaceable>X</replaceable></literal>, for + example:</para> <programlisting>OPTIONS_DEFINE= OPT1 OPT1_LIB_DEPENDS= liba.so:${PORTSDIR}/devel/a</programlisting> @@ -3890,10 +3913,13 @@ LIB_DEPENDS+= liba.so:${PORTSDIR}/devel/ <sect4> <title><varname><replaceable>X</replaceable>_<replaceable>ABOVEVARIABLE</replaceable>_OFF</varname></title> - <para>If <varname>X_ABOVEVARIABLE_OFF</varname> is set then - a dependency of type <literal>ABOVEVARIABLE</literal> will - be added when option <literal>X</literal> is not selected. - For example:</para> + <para>If + <varname><replaceable>X</replaceable>_<replaceable>ABOVEVARIABLE</replaceable>_OFF</varname> + is set then a dependency of type + <literal><replaceable>ABOVEVARIABLE</replaceable></literal> + will be added when option + <literal><replaceable>X</replaceable></literal> is not + selected. For example:</para> <programlisting>OPTIONS_DEFINE= OPT1 OPT1_LIB_DEPENDS_OFF= liba.so:${PORTSDIR}/devel/a</programlisting> @@ -4004,10 +4030,13 @@ LIB_DEPENDS+= liba.so:${PORTSDIR}/devel/ <sect4> <title><varname><replaceable>X</replaceable>_<replaceable>ABOVEVARIABLE</replaceable></varname></title> - <para>If <varname>X_ABOVEVARIABLE</varname> is defined then - its value will be appended to - <varname>ABOVEVARIABLE</varname> depending on the status - of the option <varname>X</varname>, for example:</para> + <para>If + <varname><replaceable>X</replaceable>_<replaceable>ABOVEVARIABLE</replaceable></varname> + is defined then its value will be appended to + <literal><replaceable>ABOVEVARIABLE</replaceable></literal> + depending on the status of the option + <literal><replaceable>X</replaceable></literal>, for + example:</para> <programlisting>OPTIONS_DEFINE= OPT1 OPT1_USES= gmake @@ -4028,9 +4057,12 @@ CFLAGS+= -DTEST <sect4> <title><varname><replaceable>X</replaceable>_<replaceable>ABOVEVARIABLE</replaceable>_OFF</varname></title> - <para>If <varname>X_ABOVEVARIABLE_OFF</varname> is set then - a flag <literal>ABOVEVARIABLE</literal> will be - automatically set when option <literal>X</literal> is not + <para>If + <varname><replaceable>X</replaceable>_<replaceable>ABOVEVARIABLE</replaceable>_OFF</varname> + is set then a flag + <literal><replaceable>ABOVEVARIABLE</replaceable></literal> + will be automatically set when option + <literal><replaceable>X</replaceable></literal> is not selected. For example:</para> <programlisting>OPTIONS_DEFINE= OPT1 @@ -4236,7 +4268,7 @@ PORTVERSION= 1.0</programlisting> <para>If you need to strip a file, but wish to use neither <varname>INSTALL_PROGRAM</varname> nor <varname>INSTALL_LIB</varname> macros, - <varname>${STRIP_CMD}</varname> will strip your program or + <literal>${STRIP_CMD}</literal> will strip your 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?201403211415.s2LEFqPX040635>