* Merged newxml into HEAD
[linux_from_scratch.git] / BOOK / chapter06 / patch.xml
blob081d36278cb2b8025b0eda0581a9a06ca30484f5
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
3   <!ENTITY % general-entities SYSTEM "../general.ent">
4   %general-entities;
5 ]>
6 <sect1 id="ch-system-patch" xreflabel="Patch">
7 <title>Patch-&patch-version;</title>
8 <?dbhtml filename="patch.html"?>
10 <indexterm zone="ch-system-patch"><primary sortas="a-Patch">Patch</primary></indexterm>
12 <para>The Patch package contains a program for modifying files.</para>
14 <screen>&buildtime; 0.1 SBU
15 &diskspace; 1.9 MB</screen>
17 <para>Patch installation depends on: Bash, Binutils, Coreutils, Diffutils,
18 GCC, Glibc, Grep, Make, Sed.</para>
22 <sect2>
23 <title>Installation of Patch</title>
25 <para>Prepare Patch for compilation (the preprocessor flag
26 <emphasis>-D_GNU_SOURCE</emphasis> is only needed on PowerPCs, on other
27 machines you can leave it out):</para>
29 <screen><userinput>CPPFLAGS=-D_GNU_SOURCE ./configure --prefix=/usr</userinput></screen>
31 <para>Compile the package:</para>
33 <screen><userinput>make</userinput></screen>
35 <para>Now install it:</para>
37 <screen><userinput>make install</userinput></screen>
39 </sect2>
42 <sect2 id="contents-patch"><title>Contents of Patch</title>
44 <para><emphasis>Installed program</emphasis>: patch</para>
46 </sect2>
49 <sect2><title>Short description</title>
51 <indexterm zone="ch-system-patch patch"><primary sortas="b-patch">patch</primary></indexterm>
52 <para id="patch"><command>patch</command> modifies files according to a patch file.
53 A patch file normally is a difference listing created with the diff program.
54 By applying these differences to the original files, patch creates the patched
55 versions. Using patches instead of entirely new tarballs to keep your sources
56 up-to-date can save you a lot of download time.</para>
58 </sect2>
62 </sect1>