On 8/26/19, Sébastien Hinderer <sebastien.hinde...@inria.fr> wrote:
> Similarly, I kind of remember that if, say, make install is invoked with
> a different value of PREFIX that value must be taken into acocunt and
> that it is required that PREFIX can have different values during make
> and make isntall. I am wondering whether there is a document which
> specifies clearly for which variable this is expected to work that way
> and couldn't find anything relevant on the web site of the FSF.

The GNU Coding Standards[1] cover how this stuff is supposed to work
in GNU packages (and Autoconf+Automake are designed to produce build
systems which follow these conventions).

The standards say the following about prefix:

 (1) prefix can be set by the user with configure --prefix=/wherever
     OR with make prefix=/wherever; both options should work.

 (2) If you run 'make install' with a different setting for prefix
     compared to what was used at build time, the program should not
     be recompiled.

(1) basically means you must defer all evaluations of prefix that affect
installed files to makefile rules, as opposed to substituting directly
from configure.  This is sometimes annoying to do and some maintainers
(quite reasonably, IMO) don't bother to make this work, users should
just set prefix when configuring which is less error-prone.

(2) looks like it is to enable changing prefix at install time as an
alternative to DESTDIR, most likely for hysterical raisins (I expect
most uses of this "feature" predates widespread use of DESTDIR).
Obviously most programs can't be expected to run correctly from such
an installation without first being moved into the correct locations.

[1] https://www.gnu.org/prep/standards/standards.html

Cheers,
  Nick

_______________________________________________
Autoconf mailing list
Autoconf@gnu.org
https://lists.gnu.org/mailman/listinfo/autoconf

Reply via email to