r19118 - gnucash/trunk/src/libqof - Follow-up to r19099: Remove qof's backend loading because there is no backend anymore.
Christian Stimming
cstim at code.gnucash.org
Thu May 6 04:19:17 EDT 2010
Author: cstim
Date: 2010-05-06 04:19:17 -0400 (Thu, 06 May 2010)
New Revision: 19118
Trac: http://svn.gnucash.org/trac/changeset/19118
Removed:
gnucash/trunk/src/libqof/qof/qofla-dir.h.in
Modified:
gnucash/trunk/src/libqof/CMakeLists.txt
gnucash/trunk/src/libqof/qof/Makefile.am
gnucash/trunk/src/libqof/qof/qofsession.c
Log:
Follow-up to r19099: Remove qof's backend loading because there is no backend anymore.
Remove generated file qofla-dir.h. This is actually good progress because
it gets rid of yet another compiled-in path, which are a nuisance and
need to be replaced by runtime path lookup everywhere, if needed.
Modified: gnucash/trunk/src/libqof/CMakeLists.txt
===================================================================
--- gnucash/trunk/src/libqof/CMakeLists.txt 2010-05-06 08:13:38 UTC (rev 19117)
+++ gnucash/trunk/src/libqof/CMakeLists.txt 2010-05-06 08:19:17 UTC (rev 19118)
@@ -9,14 +9,6 @@
INCLUDE_DIRECTORIES (${CMAKE_SOURCE_DIR}/lib/libc) # for strptime.h
INCLUDE_DIRECTORIES (${CMAKE_SOURCE_DIR}/src) # for platform.h
-
-# Workaround to create a very simple gncla-dir.h file
-FILE (WRITE ${CMAKE_CURRENT_BINARY_DIR}/qofla-dir.h "
-#define QOF_LIB_DIR \"${CMAKE_INSTALL_PREFIX}/lib/gnucash\"
-")
-
-INCLUDE_DIRECTORIES (${CMAKE_CURRENT_BINARY_DIR}) # for qofla-dir.h
-
SET (libgnc_qof_SOURCES
qof/gnc-date.c
qof/gnc-numeric.c
Modified: gnucash/trunk/src/libqof/qof/Makefile.am
===================================================================
--- gnucash/trunk/src/libqof/qof/Makefile.am 2010-05-06 08:13:38 UTC (rev 19117)
+++ gnucash/trunk/src/libqof/qof/Makefile.am 2010-05-06 08:19:17 UTC (rev 19118)
@@ -68,9 +68,6 @@
qofbookmerge.h \
qof-gobject.h
-nodist_qofinclude_HEADERS = \
- qofla-dir.h
-
noinst_HEADERS = \
md5.h \
qofclass-p.h \
@@ -85,7 +82,6 @@
qofsession-p.h
EXTRA_DIST = \
- qofla-dir.h.in \
qofmath128.c
if OS_WIN32
@@ -94,15 +90,6 @@
EXTRA_DIST += qof-win32.c
endif
-qofla-dir.h: $(srcdir)/qofla-dir.h.in Makefile
- rm -f $@.tmp
- sed < $< > $@.tmp \
- -e 's#@-libdir-@#${QOF_LIB_DIR}#g'
- mv $@.tmp $@
-
-BUILT_SOURCES = qofla-dir.h
-CLEANFILES = $(BUILT_SOURCES)
-
## For testing the qofmath128 routines
# run "make check" (to build the test program) and then run test-qofmath
check_PROGRAMS = test-qofmath
Deleted: gnucash/trunk/src/libqof/qof/qofla-dir.h.in
===================================================================
--- gnucash/trunk/src/libqof/qof/qofla-dir.h.in 2010-05-06 08:13:38 UTC (rev 19117)
+++ gnucash/trunk/src/libqof/qof/qofla-dir.h.in 2010-05-06 08:19:17 UTC (rev 19118)
@@ -1,27 +0,0 @@
-/***************************************************************************
- * qofla-dir.h.in
- *
- * Mon Dec 20 20:27:48 2004
- * Copyright 2004 Neil Williams
- * linux at codehelp.co.uk
- ****************************************************************************/
-
-/*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
- */
-
-#define QOF_LIB_DIR "@-libdir-@"
-
Modified: gnucash/trunk/src/libqof/qof/qofsession.c
===================================================================
--- gnucash/trunk/src/libqof/qof/qofsession.c 2010-05-06 08:13:38 UTC (rev 19117)
+++ gnucash/trunk/src/libqof/qof/qofsession.c 2010-05-06 08:19:17 UTC (rev 19118)
@@ -51,7 +51,6 @@
#include "qofbook-p.h"
#include "qofsession-p.h"
#include "qofobject-p.h"
-#include "qofla-dir.h" /* for QOF_LIB_DIR */
static GHookList * session_closed_hooks = NULL;
static QofLogModule log_module = QOF_MOD_SESSION;
@@ -1005,18 +1004,6 @@
const char *filename;
};
-/* All available QOF backends need to be described here
-and the last entry must be two NULL's.
-Remember: Use the libdir from the current build environment
-and use JUST the module name without .so - .so is not portable! */
-struct backend_providers backend_list[] =
-{
-#ifdef HAVE_DWI
- { QOF_LIB_DIR, "libqof_backend_dwi"},
-#endif
- { NULL, NULL }
-};
-
static void
qof_session_load_backend(QofSession * session, const char * access_method)
{
@@ -1035,32 +1022,6 @@
prov_type = FALSE;
if (!qof_providers_initialized)
{
- libdir_from_env = g_strdup(g_getenv("QOF_LIB_DIR"));
- for (num = 0; backend_list[num].filename != NULL; num++)
- {
- if (libdir_from_env)
- {
- if (!(qof_load_backend_library(libdir_from_env,
- backend_list[num].filename)
- || qof_load_backend_library(backend_list[num].libdir,
- backend_list[num].filename)))
- {
- PWARN (" failed to load %s from %s or %s",
- backend_list[num].filename, libdir_from_env,
- backend_list[num].libdir);
- }
- }
- else
- {
- if (!qof_load_backend_library(backend_list[num].libdir,
- backend_list[num].filename))
- {
- PWARN (" failed to load %s from %s",
- backend_list[num].filename, backend_list[num].libdir);
- }
- }
- }
- g_free(libdir_from_env);
qof_providers_initialized = TRUE;
}
p = provider_list;
@@ -1392,11 +1353,6 @@
qof_session_destroy_backend(session);
if (!qof_providers_initialized)
{
- for (num = 0; backend_list[num].filename != NULL; num++)
- {
- qof_load_backend_library(backend_list[num].libdir,
- backend_list[num].filename);
- }
qof_providers_initialized = TRUE;
}
p = provider_list;
More information about the gnucash-changes
mailing list