Unsermake Howto
A brief guide or tutorial to Unsermake.
Unsermake is a replacement for automake by KDE developer Stephan Kulow.
KDE uses the GNU build system which:
- defines some rules in Makefile.am in each directory
- make -f Makefile.cvs uses automake to convert Makefile.ams into Makefile.ins and a configure script
- ./configure uses autoconf to check the local system for various things and create Makefiles and
- make compiles the whole thing
Unsermake replaces automake and make but keeps everything else, including the strange
Makefile.am syntax the same.
Lubos adds
But not completely the same, at least for the time being. Unsermake cannot currently handle complex automake conditionals. I tried that as well, before simply writting the remove_hack script. In KDE CVS such things are solved by using conditionally compiled directories.
Using unsermake you still need autoconf installed. You don't need automake installed but you do need aclocal which comes with automake (so usually you end up with automake being installed anyway).
Unsermake differences
Unsermake creates one large Makefile rather than one per directory. Makefiles are also made per directory so you can build just a part of a module if you want to (they call the master Makefile). This makes it faster to compile especially on SMP or distributed compiling machines.
New targets:
- make mocs (qt moc files)
- make compile (for teambuilder [and distcc?])
- make install - this will only install items which have not been installed or have been updated
- output is a lot cleaner compiling foo.cpp rather than full GCC output (a bit like Linux 2.6)
Unsermake has changed quite a lot at the start of October 2004 after KDE 3.3. You now set the PATH to include
unsermake and you use it in place of
make.
Using (downloading) Unsermake for KDE 3.4 and later
With KDE 3.4, SVN (subversion) is used instead of CVS for KDE sources management. You need to download "Subversion (SVN)" to download the latest KDE from svn and "Unsermake". Run these commands to get "unsermake" in your folder:
"svn co -N svn://anonsvn.kde.org/home/kde/trunk/kdenonbeta/unsermake"
(make sure you've installed subversion software before running the above command)
Reference: kopete from svn:
http://kopete.kde.org/svnaccess.php
Using Unsermake for KDE 3.3 and before
Unsermake is in KDE's kdenonbeta CVS module.
$ export CVSROOT=:pserver:[email protected]:/home/kde
$ cvs login
$ cvs checkout -l kdenonbeta
$ cvs checkout kdenonbeta/unsermake
Unsermake is written in Python and does not need to be compiled.
Set your PATH to include Unsermake:
export PATH=~/projects/kde/kdenonbeta/unsermake/:$PATH
Then you can compile KDE modules using
unsermake instead of
make
$ unsermake -f Makefile.cvs
You will get a good luck message about using Unsermake
$ ./configure
$ cd myapp
$ unsermake
$ sudo unsermake install
See Also
KDE Build system or Into Hell and Back, Stephan Kulow
http://webcvs.kde.org/cgi-bin/cvsweb.cgi/~checkout~/kdenonbeta/unsermake/doc/unsermake-talk.sxi (Impress slides)
http://webcvs.kde.org/cgi-bin/cvsweb.cgi/~checkout~/kdenonbeta/unsermake/doc/unsermake-talk.txt?content-type=text/plain (plain text)
http://jriddell.org/programs/kde-conference-2003-talk-writeups.html#talk8 (writeup)
Recursive Make Considered Harmful, Peter Miller
http://webcvs.kde.org/cgi-bin/cvsweb.cgi/~checkout~/kdenonbeta/unsermake/doc/auug97.pdf?content-type=application/pdf (PDF)
The name is a pun. You have to speak German to understand it.
Note: unsermake is not present in the fedora core releases, and there are no rpm packages available for fedora (2005-07-16)