Date: Thu, 25 Jan 2018 16:21:43 +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: r51395 - head/en_US.ISO8859-1/books/porters-handbook/slow-porting Message-ID: <201801251621.w0PGLhWX041948@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801251621.w0PGLhWX041948>