svn commit: r51395 - head/en_US.ISO8859-1/books/porters-handbook/slow-porting
Mathieu Arnold
mat at FreeBSD.org
Thu Jan 25 16:21:43 UTC 2018
Author: mat
Date: Thu Jan 25 16:21:42 2018
New Revision: 51395
URL: https://svnweb.freebsd.org/changeset/doc/51395
Log:
Add an example about how to use EXTRA_PATCHES with a directory.
Sponsored by: Absolight
Modified:
head/en_US.ISO8859-1/books/porters-handbook/slow-porting/chapter.xml
Modified: head/en_US.ISO8859-1/books/porters-handbook/slow-porting/chapter.xml
==============================================================================
--- head/en_US.ISO8859-1/books/porters-handbook/slow-porting/chapter.xml Thu Jan 25 14:31:08 2018 (r51394)
+++ head/en_US.ISO8859-1/books/porters-handbook/slow-porting/chapter.xml Thu Jan 25 16:21:42 2018 (r51395)
@@ -492,6 +492,34 @@ BAR_EXTRA_PATCHES_OFF= ${PATCHDIR}/extra-patch-bar.c \
${PATCHDIR}/extra-patch-bar.h</programlisting>
</example>
+ <example xml:id="slow-patch-extra-ex-dirs">
+ <title>Using <varname>EXTRA_PATCHES</varname> With a
+ Directory</title>
+
+ <para>Sometime, there are many patches that are needed for a
+ feature, in this case, it is possible to point
+ <varname>EXTRA_PATCHES</varname> to a directory, and it will
+ automatically apply all files named
+ <filename>patch-<replaceable>*</replaceable></filename> in
+ it.</para>
+
+ <para>Create a subdirectory in
+ <filename>${PATCHDIR}</filename>, and move the patches in
+ it. For example:</para>
+
+ <screen>&prompt.user; <userinput>ls -l <replaceable>files/foo-patches</replaceable></userinput>
+-rw-r--r-- 1 root wheel 350 Jan 16 01:27 patch-Makefile.in
+-rw-r--r-- 1 root wheel 3084 Jan 18 15:37 patch-configure</screen>
+
+ <para>Then add this to the <filename>Makefile</filename>:</para>
+
+ <programlisting>OPTIONS_DEFINE= FOO
+FOO_EXTRA_PATCHES= ${PATCHDIR}/foo-patches</programlisting>
+
+ <para>The framework will then use all the files named
+ <filename>patch-<replaceable>*</replaceable></filename> in
+ that directory.</para>
+ </example>
</sect2>
</sect1>
More information about the svn-doc-all
mailing list