Subject: Using BSD-style Makefiles & pkgsrc
To: None <email@example.com>
From: Peter Bex <Peter.Bex@student.kun.nl>
Date: 11/03/2004 15:32:55
Content-Type: text/plain; charset=us-ascii
I'm writing a portable program with BSD-style Makefiles (I believe pmake
is available for Non-BSD Unixen, which can deal with these Makefiles).
When the program's finished, its source can be downloaded from a site as
tarball and installed to /usr/local for example, but it should also work
from pkgsrc, preferably without patches.
How would I go about to make the installation work out-of-the-box on pkgsrc
and non-pkgsrc systems?
For example, I know pkgsrc sets PREFIX and with DESTDIR I can control where
BSD-style Makefiles see the `root' for installation (although it expects
that there is a /usr dir, which isn't under /usr/local usually), so I
currently have something that looks like this in Makefile.inc:
This appears to work outside pkgsrc. I haven't checked that it also works
from pkgsrc yet, but I think it should. It feels like I'm abusing these
variables, though. I haven't yet found another program which does this.
Is this the correct way to do this or is this something I should not want (=
isn't even possible)?
Bozohttpd for example (http://www.eterna.com.au/bozohttpd) doesn't really
do anything to support installing under /usr/local, and it seems to
`just work' from pkgsrc. IMHO installing straight-from-source builds
to /usr isn't a very good idea.
"The process of preparing programs for a digital computer
is especially attractive, not only because it can be economically
and scientifically rewarding, but also because it can be an aesthetic
experience much like composing poetry or music."
-- Donald Knuth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (NetBSD)
-----END PGP SIGNATURE-----