1 Maxima project Git / build system HOWTO
6 Makefile.am is the file to modify, NOT Makefile
7 (Makefile is generated automatically from Makefile.am)
9 "make install" catches Makefile problems
10 that are not detected by "make" alone
12 Adding / removing files often leads to Makefile problems
14 To update your repository, execute
15 git pull # assuming origin/master points to the SF Maxima repo
18 git pull # update your repo
19 git checkout master # work off master
20 git checkout -b scratch-pad # create a working branch
21 <do development, tests, commits, then, once satisfied...>
22 git checkout master # put yourself on master branch
23 git pull # update your repo, again
24 git merge scratch-pad # merge development work into master
25 git push origin master # push to SF Maxima repo
27 BE SURE NOT TO PUSH YOUR SCRATCH-PAD!
29 2 Renaming something in Git
31 -- Create a scratch/development branch as in 1.
34 This moves X to Y and preserves the history.
35 Like any other change, this needs to be committed
38 3 Adding / removing a file in maxima/src
40 -- Create a scratch/development branch as in 1.
42 -- Add new file X, then execute
43 git add X; git commit -m 'Message' -- X
47 Then execute "git commit" as above
49 -- Add / remove file name from maxima/src/Makefile.am
51 -- Add / remove file name from maxima/src/*-depends.mk
53 NOTE: There are several *-depends.mk files. These are
54 theoretically updated automatically but to the best
55 of my knowledge it is necessary to fix them by hand.
57 -- Add / remove file name in maxima/src/maxima.system
60 "sh bootstrap; ./configure --enable-foolisp; make; make install"
61 and "run_testsuite();" all succeed
63 -- Merge your work onto master and push the changes as in 1.
66 4 Adding / removing a file in maxima/share
68 -- Copy new file / remove old file
71 -- Add / remove file name in maxima/share/Makefile.am
74 "sh bootstrap; ./configure --enable-foolisp; make; make install"
75 and "run_testsuite();" all succeed
77 -- Merge your work onto master and push the changes as in 1.
80 5.1 Creating a new share package
82 E.g., new package name = my_package
84 -- Naming conventions:
86 write_long_names_like_this, andNotLikeThisPlease,
87 norlikethiseitherthanks
89 spell_out_names, dnt_try_sv_typng_w_abbrvs_tnx
91 -- Create a new directory my_package
93 -- Put Lisp and/or Maxima files in the directory
95 At least one file must be named my_package.lisp or my_package.mac
96 Otherwise load(my_package) fails
98 -- Create texinfo documentation file my_package.texi
99 (PLEASE CREATE DOCUMENTATION, THANK YOU)
101 my_package.texi goes in maxima/doc/info
102 (same as other texinfo files)
104 Use maxima/share/template.texi as a template for my_package.texi
106 -- Create test file rtest_my_package.mac
107 (PLEASE CREATE A TEST FILE, THANK YOU)
109 Test file contains pairs of expressions:
110 input expression, then expected result
112 batch("my_package/rtest_my_package.mac", test);
116 5.2 Adding a directory in maxima/share
118 -- Create a scratch/development branch as in 1.
120 -- Make the new directory and put the new files in it
122 -- Add the all the files in your new directory and commit this change:
124 git commit -m 'Message' -a
126 -- Put the my_package files on the file list of maxima/share/Makefile.am
128 -- Add my_package to SHARE-SUBDIRS-LIST in maxima/src/init-cl.lisp
130 -- Move my_package.texi to maxima/doc/info
132 Put my_package.texi on the list of files in
133 maxima/doc/info/Makefile.am
135 Put my_package on the list of topics in maxima/doc/info/maxima.texi
136 See instructions in comments at top of maxima/share/template.texi
139 "sh bootstrap; ./configure --enable-foolisp; make; make install"
140 and "run_testsuite();" all succeed
142 -- Commit and push your work as in 1.
145 6 Adding / removing a file in maxima/tests
147 -- Create a scratch/development branch as in 1.
149 -- Copy new file / remove old file
150 and execute "git add" / "git rm"
152 -- Add / remove file name in maxima/tests/Makefile.am
154 -- Add / remove file name in maxima/tests/testsuite.lisp
157 "sh bootstrap; ./configure --enable-foolisp; make; make install"
158 and "run_testsuite();" all succeed
160 -- Commit and push your work as in 1.
163 7 Updating the website
165 See the Git repository "website", particularly "README.md" there.
170 All you need is the rsync tool and some disk space.
172 Issue the following command:
174 rsync -av 'rsync://maxima.git.sourceforge.net/gitroot/maxima/*' .
177 8.2 Backups of the ML subscribers list
179 You need to be a list admin to do that. Other then that you only
180 need a mail client to send mailman commands to
181 maxima-request@math.utexas.edu
183 The command to get the subscribers list is "who" followed by the
184 list admin password. Sending an empty mail with "who XXX" in the
185 subject line should be enough.
187 I have the following cron.weekly script to do this automatically:
191 | su myuser -c "echo end | mail -s \"who password\" maxima-request@math.utexas.edu"
196 Backups of the following stuff would be nice too:
207 Releases are prepared (nominally) three times a year, on April 1,
208 August 1, and December 1. Releases simply package whatever seems
211 It is the responsibility of developers (not the release
212 administrator) to copy bug fixes from the release branch to master
213 or vice versa (it doesn't matter whether bug fixes are introduced
214 on one branch or the other).
216 I don't recommend major changes on a release branch, but there is
217 really nothing to stop it. As always I'll appeal to good judgement.
219 If I've forgotten some step, please add it to this document.
221 9.2 Release numbering
223 The first release on the 5.mm release branch is 5.mm.0, the second
224 is 5.mm.1, third 5.mm.2, etc. The highest number on the branch is
225 the "best" or, at least, the most committed-to version. There is no
226 release candidate numbering.
228 The version major number has been 5 for many years. If you feel like
229 changing it to, say, 6, well, there's nothing to stop you.
233 The changelog for 5.mm is named ChangeLog-5.mm.md (the suffix .md
234 indicating that it is in so-called "markdown" format). To obtain the
235 raw material for the changelog:
237 $ git log branch-5.${mm-1}-base..HEAD
239 Use the git-log output as the basis for ChangeLog-5.mm.md. Use your
240 best judgement as to what to include; the git-log output is
241 typically much, much larger than the changelog. Look at previous
242 changelogs to see the markdown format and organization.
244 Commit ChangeLog-5.mm.md to master. Don't forget to add it to
245 the top level "Makefile.am" so that it will be included in the
248 9.4 Git commands for releases
250 Release versions live on a branch named branch-5_mm, and are tagged
251 5.mm.0, 5.mm.1, 5.mm.2, etc. The Git tag must be the same as the
252 version number declared to autoconf.
254 $ git checkout master
255 $ git tag -a branch-5_mm-base
256 $ git push --tags origin master
257 $ git checkout -b branch-5_mm
258 $ <edit configure.ac to set version number to 5.mm.0>
259 $ git add configure.ac && git commit
262 <at this point, verify that you can build packages BEFORE you push>
264 $ git push --tags origin branch-5_mm-base
265 $ git checkout master
266 $ <edit configure.ac to set version number to 5.${mm-1}post>
267 $ git add configure.ac && git commit
268 $ git push origin master
270 Repeat 5.mm.0 stuff (edit configure.ac and tag) for 5.mm.1, 2, 3, ....
272 To copy bug fixes from one branch to another:
274 $ git cherry-pick -x <commit hash>
276 9.5 Building a release
278 $ git checkout branch-5_mm
283 At this point you now have maxima-5.mm.nn.tar.gz.
285 Binaries for Linux are created by RPM. It can be argued that Debian
286 packages would be more widely useful. Feel free to create Debian
287 packages instead of RPMs. If, in addition, you can create MacOS
288 binaries, so much the better.
290 I'll assume you know how to build stuff with RPM. Copy the tar.gz
291 to <path to rpm build tree>/SOURCES/. Then:
293 $ rpmbuild -ba maxima.spec
297 $ sftp mysfusername,maxima@frs.sourceforge.net
298 > cd /home/frs/project/m/ma/maxima
300 > mkdir 5.mm.nn-Linux
303 > put maxima-*5.mm.nn*.rpm
305 > mkdir 5.mm.nn-source
307 > lcd /path/to/tar.gz
308 > put maxima-5.mm.nn.tar.gz
313 Post an announcement about every 5.mm.nn release to the Maxima
314 mailing list. When it seems stable enough (i.e. no immediate plans
315 to create another release) feel free to announce it in other forums,
318 Since wxMaxima does do a simultaneous release with maxima and
319 windows installers containing wxMaxima and maxima are usually
320 published within hours of the new maxima release the wxMaxima
321 developers beg to be informed in advance about the planned release
322 date. Filing a ticket at http://andrejv.github.com/wxmaxima/
323 or sending the project maintainer an email should be sufficient