lilypond-1.3.24
[lilypond.git] / Documentation / topdocs / PATCHES.texi
blobdfc61b3e5eded3f1806deebf0b86460c2dc7fcaa
1 \input texinfo @c -*-texinfo-*-
2 @setfilename PATCHES.info
3 @settitle Toplevel
5 @node Top, , ,  (dir)
6 @top
8 @unnumberedsec name
9     
11 PATCHES - track and distribute your code changes
13 @unnumberedsec description
14     
16 This page documents how to distribute your changes to GNU lilypond
18 @unnumberedsec abstract
19     
20 We would like to have unified context diffs with full pathnames.  A
21 script automating supplied with Lily.
23  Distributing a change normally
24 goes like this:
26 @itemize @bullet
27 @item make your fix/add your code 
28 @item Add changes to NEWS, and add yourself to Documentation/topdocs/AUTHORS.yo
29 @item generate a patch, 
30 @item e-mail your patch to one of the mailing lists
31     gnu-music-discuss@@gnu.org or bug-gnu-music@@gnu.org
32 @end itemize
34 @unnumberedsec Generating a patch
35     
37 In @file{VERSION}, set MY_PATCH_LEVEL:
39 @example 
41     VERSION:
42         ...
43         MY_PATCH_LEVEL=jcn1
45 @end example 
47 In @file{CHANGES}, enter a summary of changes:
49 @example 
50         pl 0.1.73.jcn1
51                 - added PATCHES.texi
52 @end example 
54 Then, from the top of Lily's source tree, type
56 @example 
58     make dist
59     make diff
61 @end example 
63 which rolls the tarball @file{../releases/lilypond-0.1.73.tar.gz}
64 and leaves your patch as @file{./lilypond-0.1.73.jcn1.diff}.
65 @footnote{'Make diff' generates a patch between two tarballs.  For 
66 more info type 'make diff help=='.}  We assume that there is a tarball 
67 @file{lilypond-0.1.73.tar.gz} in the directory @file{../releases}.
69 If you didn't configure Lily using --srcdir, you can do:
71 @example 
73     make release
75     tar-ball: ../patches/lilypond-0.1.73.jcn1.gz
76     patch: ../patches/lilypond-0.1.73.jcn1.gz
77 @end example 
79 @unnumberedsec Prerequisites
80     
82 For creating a patch you need
84 @itemize @bullet
85 @item All items mentioned in @file{INSTALL}.  You're not going to send a patch
86     that you haven't even built, right?
87 @item GNU diff
88 @example 
89     make distclean
90     cd ..
91     diff -urN lilypond-0.1.73 lilypond-0.1.73.jcn1 > lilypond-0.1.73.jcn1
92 @end example 
94 but there are handy python scripts available.  If you're doing development,
95 you'll need Python for other LilyPond scripts anyway.
97 @item The Lily directory structure, which looks like:
99     @example 
101     doos/                        # gnu/windows32 build and binary releases
102     harmonia -> harmonia-x.y.z 
103     harmonia-x.y.z/
104     lilypond -> lilypond-x.y.z   # symlink to development directory
105     lilypond-x.y.z/              # current development
106     patches/                     # patches between different releases
107     RedHat/BUILD                 # RedHat build and binary releases
108     RedHat/RPMS
109     RedHat/SPECS
110     releases/                    # .tar.gz releases
111     test/                        # tarballs and diffs from current version
114 @end example 
116 with prefix @file{$HOME/usr/src}
117 and (for building rpms only) in @file{$HOME/.rpmrc}:
118 @example 
120     topdir: /home/fred/usr/src/RedHat
122 @end example 
124 @end itemize
125         
126 @unnumberedsec Applying patches
127     
129 If you're following LilyPond development regularly, you probably want to
130 download just the patch for each subsequent release.
131 After downloading the patch (into the patches directory, of course), simply 
132 apply it:
134 @example 
136     gzip -dc ../patches/lilypond-0.1.74.diff.gz | patch -p1 -E
138 @end example 
140 and don't forget to make automatically generated files:
142 @example 
144     autoconf footnote(patches don't include automatically generated files, 
145     i.e. file(configure) and files generated by file(configure).)
147     configure
149 @end example 
151 @unnumberedsec Synchronise
152     
154 If you're not very quick with sending your patch, there's a good
155 chance that an new release of LilyPond comes available.  In such a
156 case, the maintainer will probably ask you to make a new patch against
157 the latest release.  Your best bet is to download the latest release,
158 and apply your patch against this new source tree:
160 @example 
162     cd lilypond-0.1.74
163     gzip -dc ../patches/lilypond-0.1.73.jcn1.diff.gz | patch -p1 -E
164     autoconf
165     configure
167 @end example 
169 Then, make a patch as shown above.
171 @unnumberedsec See also
172     
174 @file{stepmake/INSTALL.txt}
176 @unnumberedsec maintainer
177     
179 @email{hanwen@@cs.uu.nl, Han-Wen Nienhuys}
181 Just keep on sending those patches!
184 @bye