Uhm, okay, most of this article is good stuff.
But what is this… sorry, but there’s no way to call it other than “tripe”… so what is this tripe about patching and
seding Makefiles? If a Makefile defines a
PREFIX variable, and you want to install to a
PREFIX other than the default, you say
make install PREFIX=/do/it/my/way and away it goes.
make is so wonderful. Why do you want to twist it into something awful like a patched and
Apparently due to this same misunderstanding of
make, there is also a grave ommision in the article: all Makefiles should always, always define and use a
DESTDIR variable for their
install target. This is not the same as the prefix. This is prepended to the entire path including the prefix when installing, which allows a packager to install the package into an isolated tree like
/tmp/pkg-foo-0.12. The files would then end up in places like
/tmp/pkg-foo-0.12/usr/share/doc/foo-0.12/README. This makes easy to tar the whole thing up, as opposed to piecing together a mess of files spammed all over the root partition.