[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Multi-OS Makefiles
- To: misc_(_at_)_openbsd_(_dot_)_org
- Subject: Re: Multi-OS Makefiles
- From: Matthias Kilian <kili_(_at_)_outback_(_dot_)_escape_(_dot_)_de>
- Date: Fri, 6 Aug 2004 22:11:35 +0200
- Mail-followup-to: misc_(_at_)_openbsd_(_dot_)_org
On Sat, Aug 07, 2004 at 04:17:13AM +1000, Darren Reed wrote:
> > - use tools like autoconf, cpp ... ?
> This is almost the defacto-standard way to do it, with lots of
> associated benefits like putting you in a position to handle
> lots of various os "isms"
Well, it's really hard to understand the auto-tools (autoconf, automake,
libtool), and if it comes to crosscompilation/crosslinking, you may get
some serious problems.
Still running my good old home-brewn linux box, I know that auto-hell is
fine *if* it works. If it fails for some software package, it's better
to leave auto-hell alone and write a plain Makefile by hand. Be it GNU
make, be it BSD make (both are available on linux and on BSD systems).
Beyond the (IMHO unnecessary) complexity of auto-tools, there's an
additional shortcoming, namely the time it takes to build some piece
of software. Whenever I do a "make install" in some auto-hellized port,
I see autoconf-probing messages for several minutes, then some cc calls
from make for a few seconds. That's ridiculous.
My suggestion: keep it simple, stupid. Write a nice, small Makefile
(or GNUMakefile), with good comments and let the user customize the
Makefile. In addition, try to use standard APIs in your code.
If someone doubts, just fetch KDE via cvs, and measure the time the
auto-stuff takes in comparision to the *real* compile-time.
Visit your host, monkey.org