lilypond-1.3.139
[lilypond.git] / Documentation / PATCHES.pod
blob723bd87573960b680085bd404dc2b73fd7ee2ad7
1 =head1 NAME
3 PATCHES - track and distribute your code changes
5 =head1 DESCRIPTION
7 This page documents how to distribute your changes to GNU LilyPond
9 =head1 ABSTRACT
11 Distributing a change normally goes like this:
13 =over 5
15 =item *
17 make your fix/add your code 
19 =item *
21 Add changes to NEWS, and add yourself to Documentation/AUTHORS.pod
23 =item *
25 generate a patch, 
27 =item *
29 e-mail your patch to one of the mailing lists
30 gnu-music-discuss@gnu.org or bug-gnu-music@gnu.org
33 =back
35 =head1 GENERATING A PATCH
37 In F<VERSION>, set TOPLEVEL_MY_PATCH_LEVEL:
39     VERSION:
40         ...
41         TOPLEVEL_MY_PATCH_LEVEL = jcn1
43 In F<NEWS>, enter a summary of changes:
45     NEWS:
46         pl 0.1.48.jcn1
47                 - added PATCHES.pod
49 Then, from the top of Lily's source tree, type
51     make-patch
53 which leaves your patch as F<./patch-0.1.48.jcn1>.
55 If you didn't configure Lily using --srcdir, you can do:
57     release
59     tar-ball: ../patches/patch-0.1.48.jcn1.gz
60     patch: ../patches/patch-0.1.48.jcn1.gz
61     updeet: ../test/updeet
63 =head1 PREREQUISITES
65 For creating a patch you need
67 =over 5
69 =item *
71 All items mentioned in F<INSTALL>.  You're not going to send a patch
72 that you haven't even built, right?
74 =item *
76 GNU Diff
78 =item *
80 Python (version 1.4 or newer).  
81 You can of course make a patch by hand, which would go something like:
83     make distclean
84     cd ..
85     diff -urN lilypond-0.1.48 lilypond-0.1.48.jcn1 > patch-0.1.48.jcn1
87 but there are handy python scripts available.  If you're doing development,
88 you'll need Python for other LilyPond scripts anyway.
90 =item *
92 The Lily directory structure, which looks like:
94     lilypond-0.1.48/
95     patches/
96     releases/
97     test/
99 =back
100         
101 =head1 APPLYING PATCHES
103 If you're following LilyPond development regularly, you probably want to
104 download just the patch for each subsequent release.
105 After downloading the patch (into the patches directory, of course), simply 
106 apply it:
108     gzip -dc ../patches/patch-0.1.49.gz | patch -p1 -E
110 and don't forget to make automatically generated files:
112     autoconf 1)
113     configure
115 =head1 SYNCHRONISE
117 If you're not very quick with sending your patch, there's a good chance
118 that an new release of LilyPond comes available.  In such a case (and
119 sometimes for other unkown reasons :-), the maintainer will probably ask
120 you to make a new patch against the latest release.
121 Your best bet is to download the latest release, and apply your patch
122 against this new source tree:
124     cd lilypond-0.1.49
125     gzip -dc ../patches/patch-0.1.48.jcn1.gz | patch -p1 -E
126     autoconf 1)
127     configure
129 Then, make a patch as shown above.
131 1) patches don't include automatically generated files, i.e. F<configure>
132    and files generated by F<configure>.
134 =head1 MAINTAINER
136 Han-Wen Nienhuys <hanwen@cs.uu.nl>
138 Just keep on sending those patches!