Hi,

Derek Atkins schrieb:
3. In *addition* to the "make DISTDIR..." solution I would like to
enable Martin's/gentoo's original approach "make prefix=/my/sandbox
install" as well.

Proposed patch:
>         QOF_VERSION="internal"
>         QOF_PREFIX="internal"
> -       QOF_XML_DIR=`eval echo ${datadir}/xml/qsf`
> +       QOF_XML_DIR="\${datadir}/xml/qsf"

OK, I'll test with OSX and go from there.

I'm concerned that:

  make install prefix=/tmp/dir/usr

.. will cause the program to rewrite the configuration file to look in
/tmp/dir/usr/bin when really /tmp/dir is just a temporary location for
the package management system to put the files until it can get
packaged and then installed into /usr/bin..

This concern is totally valid. In the case in question, however, the changed $prefix at installation time does not change the value in the C code, because the rule for qsf-dir.h depends only on qsf-dir.h.in (and is implicitly invoked via BUILT_SOURCES and CONFIG_CLEAN_FILES -- by the way, is CONFIG_CLEAN_FILES actually being used anywhere? The automake and autoconf manuals don't mention that variable).

In other words, the rule for qsf-dir.h triggers at "make all" and it will definitely not trigger again on "make install". So the proposed patch is not affected by that concern. In general this concern stays perfectly valid and should be checked for always.

The real question is:  why is the 'user' installing using 'prefix='
instead of DESTDIR?

I haven't heard of it before, too, but from what Martin Klaffenboeck said it seems to be a common usage in gentoo. The GNU coding standards
http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
don't say anything specific about the interplay of automake and make here; they only recommend

"Running ‘make install’ with a different value of prefix from the one used to build the program should not recompile the program. "

To me this sounds as if gentoo's approach in principle is valid from the Makefile point of view. So if it is possible for us to support that behaviour without breaking anything existing then I don't see any reason not to do so.

> Not that it matters to us, but we should
> make sure that we don't re-write anything during 'make install'

Of course. This needs to be ensured regardless of how the variables are set, so that is a requirement independent of the currently discussed change.

Christian
_______________________________________________
gnucash-devel mailing list
[email protected]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel

Reply via email to