[Shotwell] Using GNU Autotools
valentin.david at gmail.com
Tue Sep 7 05:42:48 PDT 2010
I take the freedom to send you a patch to make use of the GNU
Autotools (i.e. Automake, Autoconf and Libtool) for the project
The integration of Vala into Automake is still fishy, and would not
work properly for your project. Actually your project was an
interesting example on the limitations of Vala integration into
Automake. So in the patch here, the support is made by hand. However I
will try to file bugs to the Automake project so that you will be able
to use easily Vala with the future versions of Automake.
The integration of gettext is also weird in Automake. But at least it
works. However seeing their mailing list it will probably easier to
use it in the future. I noticed that some languages had errors that
gettext would report. I fixed jp.po. I also disabled bad entries in
pl.po. This last one should be carefully checked. I am not really used
with using gettext, and I had no ideas how to fix those entries.
Automake proposes a nice way add a test-suite. Specially since 1.11
(with colors and in parallel). I recommend you start to use it. (I
think it answers your #1068). If you have an example of test case you
want to add, I can show you how.
The patch would certainly work with Autoconf 2.65. But I set the
requirement to 2.67. I advise you to use recent versions of the
Autotools. After all it distributes all it needs in the tarball, so
anybody who wants to compile from the source tarball does not need to
have the autotools. Except if they desire to change the makefiles or
the configuration script. So no point to lower the requirements on
them for portability.
To make a distribution tarball, it is advised to use "make -j
distcheck" and fix any problem until you get a nice message like that:
shotwell-0.7.1+trunk archives ready for distribution:
Then you know that the package is sane. For example someone might want
to compile in a separate directory from the source directory. And this
works smoothly with Automake. Also you are sure that all your clean
rules are right. And all your tests succeeded.
To test the patch:
$ svn co -r2197 svn://svn.yorba.org/shotwell/trunk shotwell
$ cd shotwell
$ wget -O - http://www.valentindavid.com/files/shotwell-autotools.patch
| patch -p0
$ chmod +x bootstrap # the patch does not do it, but a svn commit would save it
$ make -j
$ make -j distcheck
By default it uses silent rules (I think it is nice like that), so
that you do not see very complex command lines. If you wish to see
what is called use:
I did not try it on mingw, but I tried to make the rules and
configuration so that it works as the old Makefile. The debian scripts
should probably be updated. Feel free to ask me to help fixing the
rest if you desire to apply the patch.
I can do the same for gexiv2 if you wish.
valentin.david at gmail.com
More information about the Shotwell