BSD equivalents of autoconf, automake, etc.

Conrad J. Sabatier conrads at cox.net
Thu Nov 18 08:47:17 PST 2004


On Thu, 18 Nov 2004 18:32:21 +0200, Giorgos Keramidas
<keramida at ceid.upatras.gr> wrote:

> On 2004-11-18 10:18, "Conrad J. Sabatier" <conrads at cox.net> wrote:
> > On Thu, 18 Nov 2004 16:05:31 +0000, Jonathon McKitrick
> > <jcm at FreeBSD-uk.eu.org> wrote:
> > > I'm starting to dabble in these self-contained self-building
> > > scripts and tools and so on, like automake, autoconf, libtool,
> > > and so on.
> 
> I wouldn't go anywhere near these huge, hideous monsters of a shell
> script, unless someone was paying me very good money for doing so :P

I quite agree.  It's unfortunate that most of the IDEs for *nix (at
least the ones that I've tried) want to try to force you into using
these tools.  One can waste an incredible amount of time wrestling with
these things that are *supposed* to make life easier (yeah, right!).

> > > Are these the preferred way of doing things on FreeBSD, or is
> > > there a better or more BSD-way of doing them?
> 
> Nope.  There is actually a better way.  Even plain Makefiles that use
> the infrastructure in /usr/share/mk are A LOT easier to write than
> portable autoconf stuff (if there really *is* any such thing).
> 
> The minimal Makefile for building a program in FreeBSD looks something
> like this:
> 
> 	PROG=	foo
> 
> 	.include <bsd.prog.mk>
> 
> That's it!  All you have to do then is to write `foo.c' and `foo.1' --
> the source and manpage of the program, respectively.  If you don't
> have a manpage or will never need one, a simple option like this:
> 
> 	NOMAN=	I have no manpage for this, because it sucks.
> 
> will inhibit the use of a manpage while building.
> 
> I can't even begin to describe all the 'make magic' that is hidden in
> /usr/share/mk/*.mk, but you can find out most of it by reading the
> comments in these make(1) include files.

Really.  FreeBSD's make system is a true work of art.  :-)

-- 
Conrad J. Sabatier <conrads at cox.net> -- "In Unix veritas"


More information about the freebsd-questions mailing list