mirror of
https://github.com/Gnucash/gnucash.git
synced 2026-09-03 20:53:02 -05:00
Refactor the file backend into a shared library and a loadable module.
This should let us build on both Win32 AND MacOS, and means we don't need to compile the file-backend sources multiple times. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14296 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
@@ -7,6 +7,20 @@
|
||||
|
||||
* po/nb.po: updated Norwegian Bokmål translation by Sigve Indregard
|
||||
|
||||
* src/backend/Makefile.am:
|
||||
* src/backend/gnc-backend-api.h:
|
||||
deleted gnc-backend-api.h, which isn't needed by anything
|
||||
* src/backend/file/gnc-backend-file.[ch]:
|
||||
make "gnc_new_backend()" into a private function. It's
|
||||
never called from anywhere, so it's not needed in the API.
|
||||
* src/backend/file/Makefile.am:
|
||||
Build a shared library (libgnc-backend-file-utils) and a
|
||||
loadable module (libgnc-backend-file). This should let us
|
||||
build on MacOS AND windows.
|
||||
* src/business/business-core/file/Makefile.am:
|
||||
* src/gnome/Makefile.am:
|
||||
link against libgnc-backend-file-utils
|
||||
|
||||
2006-06-01 Andreas Köhler <andi5.py@gmx.net>
|
||||
|
||||
* src/gnome-utils/dialog-preferences.c: Do not try to find
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
|
||||
SUBDIRS = file ${SQL_DIR}
|
||||
DIST_SUBDIRS = file postgres
|
||||
|
||||
noinst_HEADERS = gnc-backend-api.h
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
SUBDIRS = . test
|
||||
|
||||
#Now a shared GModule, not a package library.
|
||||
lib_LTLIBRARIES = libgnc-backend-file.la
|
||||
# Now a shared library AND a GModule
|
||||
lib_LTLIBRARIES = libgnc-backend-file-utils.la libgnc-backend-file.la
|
||||
|
||||
AM_CFLAGS = \
|
||||
-I.. -I../.. \
|
||||
@@ -15,9 +15,8 @@ AM_CFLAGS = \
|
||||
${GLIB_CFLAGS} \
|
||||
${GCONF_CFLAGS}
|
||||
|
||||
libgnc_backend_file_la_SOURCES = \
|
||||
libgnc_backend_file_utils_la_SOURCES = \
|
||||
gnc-account-xml-v2.c \
|
||||
gnc-backend-file.c \
|
||||
gnc-book-xml-v2.c \
|
||||
gnc-budget-xml-v2.c \
|
||||
gnc-commodity-xml-v2.c \
|
||||
@@ -40,6 +39,9 @@ libgnc_backend_file_la_SOURCES = \
|
||||
sixtp-utils.c \
|
||||
sixtp.c
|
||||
|
||||
libgnc_backend_file_la_SOURCES = \
|
||||
gnc-backend-file.c
|
||||
|
||||
noinst_HEADERS = \
|
||||
gnc-backend-file.h \
|
||||
gnc-xml.h \
|
||||
@@ -57,9 +59,16 @@ noinst_HEADERS = \
|
||||
sixtp-stack.h \
|
||||
sixtp-utils.h
|
||||
|
||||
libgnc_backend_file_utils_la_LIBADD = \
|
||||
${GLIB_LIBS} ${GCONF_LIBS} ${LIBXML2_LIBS} \
|
||||
${top_builddir}/src/engine/libgncmod-engine.la \
|
||||
${top_builddir}/src/core-utils/libcore-utils.la \
|
||||
${QOF_LIBS}
|
||||
|
||||
libgnc_backend_file_la_LDFLAGS = -module -avoid-version
|
||||
libgnc_backend_file_la_LIBADD = \
|
||||
${GLIB_LIBS} ${GCONF_LIBS} ${LIBXML2_LIBS} \
|
||||
${top_builddir}/src/engine/libgncmod-engine.la \
|
||||
${top_builddir}/src/core-utils/libcore-utils.la \
|
||||
libgnc-backend-file-utils.la \
|
||||
${QOF_LIBS}
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
#include <dirent.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "qof.h"
|
||||
#include "TransLog.h"
|
||||
#include "gnc-engine.h"
|
||||
|
||||
@@ -53,7 +54,6 @@
|
||||
#include "io-gncxml.h"
|
||||
#include "io-gncbin.h"
|
||||
#include "io-gncxml-v2.h"
|
||||
#include "gnc-backend-api.h"
|
||||
#include "gnc-backend-file.h"
|
||||
#include "gnc-gconf-utils.h"
|
||||
|
||||
@@ -945,7 +945,7 @@ compression_changed_cb(GConfEntry *entry, gpointer user_data)
|
||||
be->file_compression = gnc_gconf_get_bool("general", "file_compression", NULL);
|
||||
}
|
||||
|
||||
QofBackend*
|
||||
static QofBackend*
|
||||
gnc_backend_new(void)
|
||||
{
|
||||
FileBackend *gnc_be;
|
||||
|
||||
@@ -53,7 +53,8 @@ struct FileBackend_struct
|
||||
|
||||
typedef struct FileBackend_struct FileBackend;
|
||||
|
||||
QofBackend * libgncmod_backend_file_LTX_gnc_backend_new(void);
|
||||
// This is now a static inside the module
|
||||
//QofBackend * libgncmod_backend_file_LTX_gnc_backend_new(void);
|
||||
|
||||
G_MODULE_EXPORT const gchar *
|
||||
g_module_check_init(GModule *module);
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
/********************************************************************\
|
||||
* gnc-backend-api.h -- public functions needed by gnucash backends *
|
||||
* Copyright (C) 2001 Linux Developers Group, Inc. *
|
||||
* *
|
||||
* 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, contact: *
|
||||
* *
|
||||
* Free Software Foundation Voice: +1-617-542-5942 *
|
||||
* 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
|
||||
* Boston, MA 02110-1301, USA gnu@gnu.org *
|
||||
* *
|
||||
\********************************************************************/
|
||||
|
||||
#ifndef GNC_BACKEND_API_H
|
||||
#define GNC_BACKEND_API_H
|
||||
|
||||
#include "qof.h"
|
||||
|
||||
QofBackend * gnc_backend_new (void);
|
||||
|
||||
#endif
|
||||
@@ -43,15 +43,9 @@ noinst_HEADERS = \
|
||||
|
||||
libgncmod_business_backend_file_la_LDFLAGS = -module
|
||||
|
||||
# When building on windows, the following variable must also contain
|
||||
# ${top_builddir}/src/backend/file/libgnc-backend-file.la, which won't
|
||||
# build on MacOSX because libgnc-backend-file.so is a module and not a
|
||||
# library. This problem has to be solved on an architectural basis by
|
||||
# probably moving the relevant portion of libgnc-backend-file.so into
|
||||
# a new shared library which will be used by both the gnc-backend-file
|
||||
# module and this module here (and libgncgnome.so, too)
|
||||
libgncmod_business_backend_file_la_LIBADD = \
|
||||
${top_builddir}/src/business/business-core/libgncmod-business-core.la \
|
||||
${top_builddir}/src/backend/file/libgnc-backend-file-utils.la \
|
||||
${top_builddir}/src/engine/libgncmod-engine.la \
|
||||
${top_builddir}/src/gnc-module/libgncmodule.la \
|
||||
${LIBXML2_LIBS} \
|
||||
|
||||
+2
-24
@@ -14,6 +14,7 @@ libgncgnome_la_LIBADD = \
|
||||
${top_builddir}/src/report/report-system/libgncmod-report-system.la \
|
||||
${top_builddir}/src/gnome-search/libgncmod-gnome-search.la \
|
||||
${top_builddir}/src/gnome-utils/libgncmod-gnome-utils.la \
|
||||
${top_builddir}/src/backend/file/libgnc-backend-file-utils.la \
|
||||
${top_builddir}/src/app-utils/libgncmod-app-utils.la \
|
||||
${top_builddir}/src/engine/libgw-engine.la \
|
||||
${top_builddir}/src/engine/libgncmod-engine.la \
|
||||
@@ -61,30 +62,7 @@ libgncgnome_la_SOURCES = \
|
||||
lot-viewer.c \
|
||||
reconcile-list.c \
|
||||
top-level.c \
|
||||
window-reconcile.c \
|
||||
${top_srcdir}/src/backend/file/sixtp-dom-parsers.c \
|
||||
${top_srcdir}/src/backend/file/sixtp-dom-generators.c \
|
||||
${top_srcdir}/src/backend/file/sixtp-utils.c \
|
||||
${top_srcdir}/src/backend/file/sixtp.c \
|
||||
${top_srcdir}/src/backend/file/sixtp-stack.c \
|
||||
${top_srcdir}/src/backend/file/sixtp-to-dom-parser.c \
|
||||
${top_srcdir}/src/backend/file/io-example-account.c \
|
||||
${top_srcdir}/src/backend/file/io-gncbin-r.c \
|
||||
${top_srcdir}/src/backend/file/io-gncxml-gen.c \
|
||||
${top_srcdir}/src/backend/file/io-gncxml-v1.c \
|
||||
${top_srcdir}/src/backend/file/io-gncxml-v2.c \
|
||||
${top_srcdir}/src/backend/file/io-utils.c \
|
||||
${top_srcdir}/src/backend/file/gnc-account-xml-v2.c \
|
||||
${top_srcdir}/src/backend/file/gnc-budget-xml-v2.c \
|
||||
${top_srcdir}/src/backend/file/gnc-lot-xml-v2.c \
|
||||
${top_srcdir}/src/backend/file/gnc-recurrence-xml-v2.c \
|
||||
${top_srcdir}/src/backend/file/gnc-schedxaction-xml-v2.c \
|
||||
${top_srcdir}/src/backend/file/gnc-freqspec-xml-v2.c \
|
||||
${top_srcdir}/src/backend/file/gnc-transaction-xml-v2.c \
|
||||
${top_srcdir}/src/backend/file/gnc-commodity-xml-v2.c \
|
||||
${top_srcdir}/src/backend/file/gnc-book-xml-v2.c \
|
||||
${top_srcdir}/src/backend/file/gnc-pricedb-xml-v2.c
|
||||
|
||||
window-reconcile.c
|
||||
|
||||
gnomeappdir = ${datadir}/applications
|
||||
|
||||
|
||||
Reference in New Issue
Block a user