Hi, when I just tried to tweak some details for the recent Debian packages for Gnucash, I discovered that the configure option --docdir apparently has no effect. A short view into configure.ac and the Makefile.am files revealed that the reason is that GNC_DOC_INSTALL_DIR is set to ${pkgdatadir}/doc in configure.ac, and $docdir is set to ${GNC_DOC_INSTALL_DIR} in Makefile.am files. This means an explicitly configured $docdir will always get overwritten by a path that is derived from $pkgdatadir.
I think the reason is that the --docdir parameter was added to Autoconf in 2.60 (see also the [1]release announcement), so with older Autoconf releases the build system needed to define $docdir on its own. 1. http://www.mail-archive.com/autotools-announce@gnu.org/msg00016.html To fix the issue I would like to change the minimal Autoconf requirement from 2.59 to 2.60 and initialize GNC_DOC_INSTALL_DIR to ${docdir} (see attached patch). Does anybody see an issue with this patch? Would it be sensible to cleanup even more at this occasion and replace any usage of GNC_DOC_INSTALL_DIR by $docdir? Cheers, Micha
Index: src/doc/Makefile.am =================================================================== --- src/doc/Makefile.am (Revision 20735) +++ src/doc/Makefile.am (Arbeitskopie) @@ -32,8 +32,6 @@ python-bindings-doxygen.py -docdir = ${GNC_DOC_INSTALL_DIR} - all: doc: doxygen.cfg Index: src/bin/gnucash-bin.c =================================================================== --- src/bin/gnucash-bin.c (Revision 20735) +++ src/bin/gnucash-bin.c (Arbeitskopie) @@ -817,8 +817,6 @@ g_error_free(binreloc_error); } } -#else - g_message("main: binreloc relocation support was disabled at configure time.\n"); #endif /* This should be called before gettext is initialized @@ -853,6 +851,9 @@ gnucash_command_line(&argc, argv); gnc_print_unstable_message(); gnc_log_init(); +#ifndef ENABLE_BINRELOC + DEBUG("main: binreloc relocation support was disabled at configure time."); +#endif gnc_module_system_init(); Index: configure.ac =================================================================== --- configure.ac (Revision 20735) +++ configure.ac (Arbeitskopie) @@ -19,7 +19,7 @@ # Footer - Autoconf footer stuff # Autoconf initialization -AC_PREREQ(2.59) +AC_PREREQ(2.60) AC_INIT([GnuCash], [2.4.99], [gnucash-devel@gnucash.org]) AC_CONFIG_HEADERS(config.h) AC_CONFIG_SRCDIR(src/engine/Transaction.h) @@ -549,7 +549,7 @@ ### Variables ### Set up all the initial variable values... GNC_CONFIGDIR='${sysconfdir}/gnucash' -GNC_DOC_INSTALL_DIR='${pkgdatadir}/doc' +GNC_DOC_INSTALL_DIR='${docdir}' GNC_INCLUDE_DIR='${includedir}/gnucash' GNC_SCM_INSTALL_DIR='${pkgdatadir}/scm' GNC_SHAREDIR='${pkgdatadir}' Index: doc/Makefile.am =================================================================== --- doc/Makefile.am (Revision 20735) +++ doc/Makefile.am (Arbeitskopie) @@ -1,6 +1,5 @@ SUBDIRS = examples -docdir = ${GNC_DOC_INSTALL_DIR} doc_DATA = \ README.francais \ README.german \ Index: doc/examples/Makefile.am =================================================================== --- doc/examples/Makefile.am (Revision 20735) +++ doc/examples/Makefile.am (Arbeitskopie) @@ -1,6 +1,4 @@ -docdir = ${GNC_DOC_INSTALL_DIR}/examples - doc_DATA = \ Money95bank_fr.qif \ Money95invst_fr.qif \ Index: Makefile.am =================================================================== --- Makefile.am (Revision 20735) +++ Makefile.am (Arbeitskopie) @@ -1,8 +1,6 @@ SUBDIRS = . doc lib src intl-scm packaging po accounts checks -docdir = ${GNC_DOC_INSTALL_DIR} - GNC_CTAGS_FILE = @GNC_CTAGS_FILE@ GNC_ETAGS_FILE = @GNC_ETAGS_FILE@
_______________________________________________ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel