mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Merge reshuffle-modules (r15315) back into the trunk.
Modules are loaded directly with the g_symbol_* API now while dropping the dependency on libltdl. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15317 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
d64a823f02
commit
2e69bba2db
@ -146,11 +146,6 @@ if test x$am_cv_scanf_lld = "xno"; then
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_CHECK_HEADERS(ltdl.h)
|
||||
if test "x$ac_cv_header_ltdl_h" = xno; then
|
||||
AC_MSG_ERROR([Cannot find ltdl.h -- libtool-devel (or libtool-ltdl-devel) not installed?])
|
||||
fi
|
||||
|
||||
# test whether we are building directly from SVN/SVK
|
||||
${srcdir}/util/gnc-svnversion ${srcdir} >/dev/null 2>&1
|
||||
if test $? = 0 ; then
|
||||
@ -2216,7 +2211,7 @@ AC_CONFIG_FILES(po/Makefile.in
|
||||
src/register/register-gnome/test/Makefile
|
||||
src/report/Makefile
|
||||
src/report/report-gnome/Makefile
|
||||
dnl # src/report/report-gnome/test/Makefile
|
||||
src/report/report-gnome/test/Makefile
|
||||
src/report/report-system/Makefile
|
||||
src/report/report-system/test/Makefile
|
||||
src/report/standard-reports/Makefile
|
||||
|
@ -15,7 +15,6 @@ everything you need to build gnucash.
|
||||
libgnomeui-devel
|
||||
libgsf-devel
|
||||
libjpeg-devel
|
||||
libtool-ltdl-devel
|
||||
openssl-devel
|
||||
|
||||
If you are compiling with the --enable-ofx or --enable-hbci flags,
|
||||
|
@ -50,7 +50,6 @@ BuildRequires: gtkhtml3-devel >= %{gtkhtml3_version}
|
||||
BuildRequires: bzip2-devel, expat-devel, guile-devel
|
||||
BuildRequires: libglade2-devel, libgsf-devel
|
||||
BuildRequires: libjpeg-devel, openssl-devel
|
||||
BuildRequires: libtool-ltdl-devel
|
||||
|
||||
%description
|
||||
GnuCash is a personal finance manager. A check-book like
|
||||
|
@ -1,5 +1,4 @@
|
||||
SUBDIRS = . test
|
||||
PWD := $(shell pwd)
|
||||
|
||||
pkglib_LTLIBRARIES = libgncmod-app-utils.la
|
||||
|
||||
|
@ -1,13 +1,12 @@
|
||||
/*********************************************************************
|
||||
* gncmod-app-utils.c
|
||||
* module definition/initialization for the report infrastructure
|
||||
*
|
||||
* Copyright (c) 2001 Linux Developers Group, Inc.
|
||||
* module definition/initialization for the report infrastructure
|
||||
*
|
||||
* Copyright (c) 2001 Linux Developers Group, Inc.
|
||||
*********************************************************************/
|
||||
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include <glib.h>
|
||||
#include <gmodule.h>
|
||||
#include <libguile.h>
|
||||
|
||||
#include "gnc-module.h"
|
||||
@ -18,32 +17,26 @@
|
||||
#include "gnc-exp-parser.h"
|
||||
|
||||
/* version of the gnc module system interface we require */
|
||||
int libgncmod_app_utils_LTX_gnc_module_system_interface = 0;
|
||||
int gnc_module_system_interface = 0;
|
||||
|
||||
/* module versioning uses libtool semantics. */
|
||||
int libgncmod_app_utils_LTX_gnc_module_current = 0;
|
||||
int libgncmod_app_utils_LTX_gnc_module_revision = 0;
|
||||
int libgncmod_app_utils_LTX_gnc_module_age = 0;
|
||||
|
||||
/* forward references */
|
||||
char *libgncmod_app_utils_LTX_gnc_module_path(void);
|
||||
char *libgncmod_app_utils_LTX_gnc_module_description(void);
|
||||
int libgncmod_app_utils_LTX_gnc_module_init(int refcount);
|
||||
int libgncmod_app_utils_LTX_gnc_module_end(int refcount);
|
||||
int gnc_module_current = 0;
|
||||
int gnc_module_revision = 0;
|
||||
int gnc_module_age = 0;
|
||||
|
||||
|
||||
char *
|
||||
libgncmod_app_utils_LTX_gnc_module_path(void) {
|
||||
gnc_module_path(void) {
|
||||
return g_strdup("gnucash/app-utils");
|
||||
}
|
||||
|
||||
char *
|
||||
libgncmod_app_utils_LTX_gnc_module_description(void) {
|
||||
char *
|
||||
gnc_module_description(void) {
|
||||
return g_strdup("Utilities for building gnc applications");
|
||||
}
|
||||
|
||||
static void
|
||||
lmod(char * mn)
|
||||
lmod(char * mn)
|
||||
{
|
||||
char * form = g_strdup_printf("(use-modules %s)\n", mn);
|
||||
scm_c_eval_string(form);
|
||||
@ -61,7 +54,7 @@ app_utils_shutdown(void)
|
||||
extern SCM scm_init_sw_app_utils_module(void);
|
||||
|
||||
int
|
||||
libgncmod_app_utils_LTX_gnc_module_init(int refcount)
|
||||
gnc_module_init(int refcount)
|
||||
{
|
||||
/* load the engine (we depend on it) */
|
||||
if(!gnc_module_load("gnucash/engine", 0)) {
|
||||
@ -89,7 +82,7 @@ libgncmod_app_utils_LTX_gnc_module_init(int refcount)
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_app_utils_LTX_gnc_module_end(int refcount)
|
||||
gnc_module_end(int refcount)
|
||||
{
|
||||
if (refcount == 0)
|
||||
gnc_component_manager_shutdown ();
|
||||
|
@ -14,21 +14,20 @@ test_print_parse_amount_SOURCES = \
|
||||
test-print-parse-amount.c
|
||||
|
||||
GNC_TEST_DEPS := @GNC_TEST_SRFI_LOAD_CMD@ \
|
||||
--gnc-module-dir ${top_builddir}/src/core-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/gnc-module \
|
||||
--gnc-module-dir ${top_builddir}/src/engine \
|
||||
--gnc-module-dir ${top_builddir}/src/calculation \
|
||||
--gnc-module-dir ${top_builddir}/src/app-utils \
|
||||
--gnc-module-dir ${top_srcdir}/src/engine \
|
||||
--gnc-module-dir ${top_srcdir}/src/app-utils \
|
||||
--guile-load-dir ${top_srcdir}/src/scm \
|
||||
--guile-load-dir ${top_builddir}/src/scm \
|
||||
--guile-load-dir ${top_builddir}/src/gnome-utils \
|
||||
--guile-load-dir ${top_builddir}/src/core-utils \
|
||||
--guile-load-dir ${top_builddir}/src/gnome \
|
||||
--library-dir ${top_builddir}/src/gnome-utils \
|
||||
--guile-load-dir ${top_builddir}/src/gnc-module \
|
||||
--guile-load-dir ${top_builddir}/src/engine \
|
||||
--guile-load-dir ${top_builddir}/src/scm \
|
||||
--guile-load-dir ${top_builddir}/src/app-utils \
|
||||
--library-dir ${top_builddir}/lib/libqof/qof \
|
||||
--library-dir ${top_builddir}/src/gnome
|
||||
--library-dir ${top_builddir}/src/core-utils \
|
||||
--library-dir ${top_builddir}/src/gnc-module \
|
||||
--library-dir ${top_builddir}/src/engine \
|
||||
--library-dir ${top_builddir}/src/calculation \
|
||||
--library-dir ${top_builddir}/src/app-utils
|
||||
|
||||
TESTS_ENVIRONMENT := \
|
||||
$(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
|
||||
|
@ -1,4 +1,4 @@
|
||||
#! /bin/bash
|
||||
#! /bin/sh
|
||||
exec guile -s "$0"
|
||||
!#
|
||||
|
||||
|
@ -1,49 +1,43 @@
|
||||
/*********************************************************************
|
||||
* gncmod-file-backend.c
|
||||
* module definition/initialization for the file backend module
|
||||
*
|
||||
* Copyright (c) 2001 Linux Developers Group, Inc.
|
||||
*
|
||||
* Copyright (c) 2001 Linux Developers Group, Inc.
|
||||
*********************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <glib.h>
|
||||
#include <glib-gobject.h>
|
||||
#include <gmodule.h>
|
||||
/* #include <glib-gobject.h> */
|
||||
|
||||
#include "gnc-module.h"
|
||||
#include "gnc-module-api.h"
|
||||
|
||||
/* version of the gnc module system interface we require */
|
||||
int libgncmod_backend_file_LTX_gnc_module_system_interface = 0;
|
||||
int gnc_module_system_interface = 0;
|
||||
|
||||
/* module versioning uses libtool semantics. */
|
||||
int libgncmod_backend_file_LTX_gnc_module_current = 0;
|
||||
int libgncmod_backend_file_LTX_gnc_module_revision = 0;
|
||||
int libgncmod_backend_file_LTX_gnc_module_age = 0;
|
||||
int gnc_module_current = 0;
|
||||
int gnc_module_revision = 0;
|
||||
int gnc_module_age = 0;
|
||||
|
||||
static GNCModule engine;
|
||||
|
||||
/* forward references */
|
||||
char *libgncmod_backend_file_LTX_gnc_module_path(void);
|
||||
char *libgncmod_backend_file_LTX_gnc_module_description(void);
|
||||
int libgncmod_backend_file_LTX_gnc_module_init(int refcount);
|
||||
int libgncmod_backend_file_LTX_gnc_module_end(int refcount);
|
||||
|
||||
|
||||
char *
|
||||
libgncmod_backend_file_LTX_gnc_module_path(void)
|
||||
gnc_module_path(void)
|
||||
{
|
||||
return g_strdup("gnucash/backend/file");
|
||||
}
|
||||
|
||||
char *
|
||||
libgncmod_backend_file_LTX_gnc_module_description(void)
|
||||
char *
|
||||
gnc_module_description(void)
|
||||
{
|
||||
return g_strdup("The binary and XML (v1 and v2) backends for GnuCash");
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_backend_file_LTX_gnc_module_init(int refcount)
|
||||
{
|
||||
gnc_module_init(int refcount)
|
||||
{
|
||||
engine = gnc_module_load("gnucash/engine", 0);
|
||||
if(!engine) return FALSE;
|
||||
|
||||
@ -55,7 +49,7 @@ libgncmod_backend_file_LTX_gnc_module_init(int refcount)
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_backend_file_LTX_gnc_module_end(int refcount)
|
||||
gnc_module_end(int refcount)
|
||||
{
|
||||
int unload = TRUE;
|
||||
|
||||
|
@ -177,13 +177,13 @@ TESTS = \
|
||||
test-xml2-is-file
|
||||
|
||||
GNC_TEST_DEPS := \
|
||||
--gnc-module-dir ${top_builddir}/src/core-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/gnc-module \
|
||||
--gnc-module-dir ${top_builddir}/src/engine \
|
||||
--gnc-module-dir ${top_srcdir}/src/gnc-module \
|
||||
--library-dir ${top_builddir}/src/backend/file \
|
||||
--guile-load-dir ${top_builddir}/src/engine \
|
||||
--library-dir ${top_builddir}/lib/libqof/qof \
|
||||
--gnc-module-dir ${top_srcdir}/src/engine
|
||||
--library-dir ${top_builddir}/src/core-utils \
|
||||
--library-dir ${top_builddir}/src/gnc-module \
|
||||
--library-dir ${top_builddir}/src/engine \
|
||||
--library-dir ${top_builddir}/src/backend/file
|
||||
|
||||
TESTS_ENVIRONMENT := \
|
||||
GNC_ACCOUNT_PATH=${top_srcdir}/accounts/C \
|
||||
|
@ -25,8 +25,7 @@ LDADD = ${top_builddir}/src/test-core/libgncmod-test.la \
|
||||
${top_builddir}/src/engine/libgncmod-engine.la \
|
||||
${top_builddir}/src/engine/libgncmod-engine.la \
|
||||
${top_builddir}/src/engine/test-core/libgncmod-test-engine.la \
|
||||
-lltdl \
|
||||
-lpq
|
||||
-lpq
|
||||
|
||||
test_db_SOURCES = \
|
||||
${top_srcdir}/src/backend/postgres/PostgresBackend.c \
|
||||
|
@ -17,13 +17,11 @@ EXTRA_LIBS="${EXTRA_LIBS}:@-GNC_LIB_INSTALLDIR-@"
|
||||
EXTRA_LIBS="${EXTRA_LIBS}:@-GNC_MODULE_DIR-@"
|
||||
|
||||
LD_LIBRARY_PATH="${EXTRA_LIBS}:${LD_LIBRARY_PATH}"
|
||||
LTDL_LIBRARY_PATH="${EXTRA_LIBS}:${LTDL_LIBRARY_PATH}"
|
||||
TOP_SRC_DIR="@-TOP_SRC_DIR-@"
|
||||
|
||||
export GNC_MODULE_PATH
|
||||
export GUILE_LOAD_PATH
|
||||
export LD_LIBRARY_PATH
|
||||
export LTDL_LIBRARY_PATH
|
||||
|
||||
#
|
||||
# Other potentially useful options, particularly for valgrind-2.x:
|
||||
|
@ -17,11 +17,9 @@ EXTRA_LIBS="${EXTRA_LIBS}@-PATH_SEPARATOR-@@-GNC_LIB_INSTALLDIR-@"
|
||||
EXTRA_LIBS="${EXTRA_LIBS}@-PATH_SEPARATOR-@@-GNC_MODULE_DIR-@"
|
||||
|
||||
LD_LIBRARY_PATH="${EXTRA_LIBS}@-PATH_SEPARATOR-@${LD_LIBRARY_PATH}"
|
||||
LTDL_LIBRARY_PATH="${EXTRA_LIBS}@-PATH_SEPARATOR-@${LTDL_LIBRARY_PATH}"
|
||||
|
||||
export GNC_MODULE_PATH
|
||||
export GUILE_LOAD_PATH
|
||||
export LD_LIBRARY_PATH
|
||||
export LTDL_LIBRARY_PATH
|
||||
|
||||
exec gnucash-bin "$@"
|
||||
|
@ -30,45 +30,52 @@ then
|
||||
fi
|
||||
|
||||
eval `@-GNC_SRCDIR-@/src/gnc-test-env @-GNC_TEST_SRFI_LOAD_CMD-@ \
|
||||
--library-dir ${top_builddir}/src/gnome \
|
||||
--guile-load-dir ${top_builddir}/src/scm \
|
||||
--guile-load-dir ${top_builddir}/lib/guile-www \
|
||||
--guile-load-dir ${top_builddir}/src/gnome \
|
||||
--gnc-module-dir ${top_builddir}/src/core-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/gnc-module \
|
||||
--gnc-module-dir ${top_builddir}/src/tax/us \
|
||||
--gnc-module-dir ${top_builddir}/src/calculation \
|
||||
--gnc-module-dir ${top_builddir}/src/app-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/gnome-search \
|
||||
--gnc-module-dir ${top_builddir}/src/network-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/app-file \
|
||||
--gnc-module-dir ${top_builddir}/src/engine \
|
||||
--gnc-module-dir ${top_builddir}/src/report/stylesheets \
|
||||
--gnc-module-dir ${top_builddir}/src/report/report-gnome \
|
||||
--gnc-module-dir ${top_builddir}/src/backend/file \
|
||||
--gnc-module-dir ${top_builddir}/src/network-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/calculation \
|
||||
--gnc-module-dir ${top_builddir}/src/tax/us \
|
||||
--gnc-module-dir ${top_builddir}/src/app-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/gnome-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/gnome-search \
|
||||
--gnc-module-dir ${top_builddir}/src/report/report-system \
|
||||
--gnc-module-dir ${top_builddir}/src/report/utility-reports \
|
||||
--gnc-module-dir ${top_builddir}/src/report/standard-reports \
|
||||
--gnc-module-dir ${top_builddir}/src/report/utility-reports \
|
||||
--gnc-module-dir ${top_builddir}/src/report/locale-specific/us \
|
||||
--gnc-module-dir ${top_builddir}/src/report/report-gnome \
|
||||
--gnc-module-dir ${top_builddir}/src/backend/rpc \
|
||||
--gnc-module-dir ${top_builddir}/src/backend/file \
|
||||
--gnc-module-dir ${top_builddir}/src/backend/postgres \
|
||||
--gnc-module-dir ${top_builddir}/src/business/business-core \
|
||||
--gnc-module-dir ${top_builddir}/src/business/business-core/file \
|
||||
--gnc-module-dir ${top_builddir}/src/business/dialog-tax-table \
|
||||
--gnc-module-dir ${top_builddir}/src/business/business-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/business/business-ledger \
|
||||
--gnc-module-dir ${top_builddir}/src/business/business-gnome \
|
||||
--guile-load-dir ${top_builddir}/src/business/business-reports \
|
||||
--gnc-module-dir ${top_builddir}/src/report/stylesheets \
|
||||
--gnc-module-dir ${top_builddir}/src/register/register-core \
|
||||
--gnc-module-dir ${top_builddir}/src/register/register-gnome \
|
||||
--gnc-module-dir ${top_builddir}/src/register/ledger-core \
|
||||
--gnc-module-dir ${top_builddir}/src/import-export \
|
||||
--gnc-module-dir ${top_builddir}/src/import-export/qif-io-core \
|
||||
--gnc-module-dir ${top_builddir}/src/import-export/qif-import \
|
||||
--gnc-module-dir ${top_builddir}/src/import-export/binary-import \
|
||||
--gnc-module-dir ${top_builddir}/src/import-export/ofx \
|
||||
--gnc-module-dir ${top_builddir}/src/import-export/hbci \
|
||||
--gnc-module-dir ${top_builddir}/src/gnome-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/register/ledger-core \
|
||||
--gnc-module-dir ${top_builddir}/src/register/register-gnome \
|
||||
--gnc-module-dir ${top_builddir}/src/register/register-core \
|
||||
--gnc-module-dir ${top_builddir}/src/import-export/log-replay \
|
||||
--gnc-module-dir ${top_builddir}/src/business/business-core \
|
||||
--gnc-module-dir ${top_builddir}/src/business/business-core/file \
|
||||
--gnc-module-dir ${top_builddir}/src/business/business-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/business/dialog-tax-table \
|
||||
--gnc-module-dir ${top_builddir}/src/business/business-ledger \
|
||||
--gnc-module-dir ${top_builddir}/src/business/business-gnome \
|
||||
--guile-load-dir ${top_builddir}/src/core-utils \
|
||||
--guile-load-dir ${top_builddir}/src/gnc-module \
|
||||
--guile-load-dir ${top_builddir}/src/engine \
|
||||
--guile-load-dir ${top_builddir}/src/scm \
|
||||
--guile-load-dir ${top_builddir}/src/tax/us \
|
||||
--guile-load-dir ${top_builddir}/src/app-utils \
|
||||
--guile-load-dir ${top_builddir}/src/gnome-utils \
|
||||
--guile-load-dir ${top_builddir}/src/report/report-system \
|
||||
--guile-load-dir ${top_builddir}/src/report/standard-reports \
|
||||
--guile-load-dir ${top_builddir}/src/report/utility-reports \
|
||||
--guile-load-dir ${top_builddir}/src/report/locale-specific/us \
|
||||
--guile-load-dir ${top_builddir}/src/report/report-gnome \
|
||||
--guile-load-dir ${top_builddir}/src/report/stylesheets \
|
||||
--guile-load-dir ${top_builddir}/src/import-export/qif-import \
|
||||
--guile-load-dir ${top_builddir}/src/business/business-core \
|
||||
--guile-load-dir ${top_builddir}/src/business/business-utils \
|
||||
--guile-load-dir ${top_builddir}/src/business/dialog-tax-table \
|
||||
--guile-load-dir ${top_builddir}/src/business/business-gnome \
|
||||
--guile-load-dir ${top_builddir}/src/business/business-reports \
|
||||
`
|
||||
exec "$@"
|
||||
|
@ -16,11 +16,9 @@ EXTRA_LIBS="${EXTRA_LIBS}:@-GNC_LIB_INSTALLDIR-@"
|
||||
EXTRA_LIBS="${EXTRA_LIBS}:@-GNC_MODULE_DIR-@"
|
||||
|
||||
LD_LIBRARY_PATH="${EXTRA_LIBS}:${LD_LIBRARY_PATH}"
|
||||
LTDL_LIBRARY_PATH="${EXTRA_LIBS}:${LTDL_LIBRARY_PATH}"
|
||||
|
||||
export GNC_MODULE_PATH
|
||||
export GUILE_LOAD_PATH
|
||||
export LD_LIBRARY_PATH
|
||||
export LTDL_LIBRARY_PATH
|
||||
|
||||
exec "$@"
|
||||
|
@ -2,6 +2,6 @@
|
||||
TESTS = test-version
|
||||
|
||||
TESTS_ENVIRONMENT := \
|
||||
PATH="..:${PATH}" LD_LIBRARY_PATH="${top_builddir}/lib/libqof/qof/.libs:${LD_LIBRARY_PATH}"
|
||||
PATH="..:${PATH}"
|
||||
|
||||
EXTRA_DIST = test-version
|
||||
|
@ -1,5 +1,4 @@
|
||||
SUBDIRS = . test file
|
||||
PWD := $(shell pwd)
|
||||
|
||||
pkglib_LTLIBRARIES = libgncmod-business-core.la
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*********************************************************************
|
||||
* businessmod-core.c
|
||||
* module definition/initialization for the core Business module
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001 Derek Atkins <warlord@MIT.EDU>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@ -24,8 +24,7 @@
|
||||
*********************************************************************/
|
||||
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include <glib.h>
|
||||
#include <gmodule.h>
|
||||
#include <libguile.h>
|
||||
|
||||
#include "gnc-module.h"
|
||||
@ -46,40 +45,35 @@
|
||||
extern SCM scm_init_sw_business_core_module (void);
|
||||
|
||||
/* version of the gnc module system interface we require */
|
||||
int libgncmod_business_core_LTX_gnc_module_system_interface = 0;
|
||||
int gnc_module_system_interface = 0;
|
||||
|
||||
/* module versioning uses libtool semantics. */
|
||||
int libgncmod_business_core_LTX_gnc_module_current = 0;
|
||||
int libgncmod_business_core_LTX_gnc_module_revision = 0;
|
||||
int libgncmod_business_core_LTX_gnc_module_age = 0;
|
||||
int gnc_module_current = 0;
|
||||
int gnc_module_revision = 0;
|
||||
int gnc_module_age = 0;
|
||||
|
||||
/* forward references */
|
||||
char *libgncmod_business_core_LTX_gnc_module_path(void);
|
||||
char *libgncmod_business_core_LTX_gnc_module_description(void);
|
||||
int libgncmod_business_core_LTX_gnc_module_init(int refcount);
|
||||
int libgncmod_business_core_LTX_gnc_module_end(int refcount);
|
||||
|
||||
char *
|
||||
libgncmod_business_core_LTX_gnc_module_path(void)
|
||||
gnc_module_path(void)
|
||||
{
|
||||
return g_strdup("gnucash/business-core");
|
||||
}
|
||||
|
||||
char *
|
||||
libgncmod_business_core_LTX_gnc_module_description(void)
|
||||
char *
|
||||
gnc_module_description(void)
|
||||
{
|
||||
return g_strdup("The GnuCash business core");
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_business_core_LTX_gnc_module_init(int refcount)
|
||||
gnc_module_init(int refcount)
|
||||
{
|
||||
/* load the engine (we depend on it) */
|
||||
if(!gnc_module_load("gnucash/engine", 0)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if(refcount == 0)
|
||||
if(refcount == 0)
|
||||
{
|
||||
/* initialize known types */
|
||||
gncInvoiceRegister ();
|
||||
@ -94,7 +88,7 @@ libgncmod_business_core_LTX_gnc_module_init(int refcount)
|
||||
gncTaxTableRegister ();
|
||||
gncVendorRegister ();
|
||||
}
|
||||
|
||||
|
||||
scm_init_sw_business_core_module();
|
||||
scm_c_eval_string("(use-modules (sw_business_core))");
|
||||
scm_c_eval_string("(use-modules (gnucash business-core))");
|
||||
@ -103,6 +97,6 @@ libgncmod_business_core_LTX_gnc_module_init(int refcount)
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_business_core_LTX_gnc_module_end(int refcount) {
|
||||
gnc_module_end(int refcount) {
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*********************************************************************
|
||||
* gncmod-business-backend-file.c
|
||||
* module definition/initialization for the file backend module
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2002 Derek Atkins <warlord@MIT.EDU>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@ -24,8 +24,7 @@
|
||||
*********************************************************************/
|
||||
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include <glib.h>
|
||||
#include <gmodule.h>
|
||||
|
||||
#include "gnc-module.h"
|
||||
#include "gnc-module-api.h"
|
||||
@ -45,38 +44,32 @@
|
||||
#include "gnc-vendor-xml-v2.h"
|
||||
|
||||
/* version of the gnc module system interface we require */
|
||||
int libgncmod_business_backend_file_LTX_gnc_module_system_interface = 0;
|
||||
int gnc_module_system_interface = 0;
|
||||
|
||||
/* module versioning uses libtool semantics. */
|
||||
int libgncmod_business_backend_file_LTX_gnc_module_current = 0;
|
||||
int libgncmod_business_backend_file_LTX_gnc_module_revision = 0;
|
||||
int libgncmod_business_backend_file_LTX_gnc_module_age = 0;
|
||||
int gnc_module_current = 0;
|
||||
int gnc_module_revision = 0;
|
||||
int gnc_module_age = 0;
|
||||
|
||||
static GNCModule bus_core;
|
||||
static GNCModule file;
|
||||
|
||||
/* forward references */
|
||||
char *libgncmod_business_backend_file_LTX_gnc_module_path(void);
|
||||
char *libgncmod_business_backend_file_LTX_gnc_module_description(void);
|
||||
int libgncmod_business_backend_file_LTX_gnc_module_init(int refcount);
|
||||
int libgncmod_business_backend_file_LTX_gnc_module_end(int refcount);
|
||||
|
||||
|
||||
char *
|
||||
libgncmod_business_backend_file_LTX_gnc_module_path(void)
|
||||
gnc_module_path(void)
|
||||
{
|
||||
return g_strdup("gnucash/business-core-file");
|
||||
}
|
||||
|
||||
char *
|
||||
libgncmod_business_backend_file_LTX_gnc_module_description(void)
|
||||
char *
|
||||
gnc_module_description(void)
|
||||
{
|
||||
return g_strdup("The XML (v2) parsers for GnuCash business objects");
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_business_backend_file_LTX_gnc_module_init(int refcount)
|
||||
{
|
||||
gnc_module_init(int refcount)
|
||||
{
|
||||
if(!gnc_engine_is_initialized()) { return FALSE; }
|
||||
|
||||
bus_core = gnc_module_load("gnucash/business-core", 0);
|
||||
@ -101,7 +94,7 @@ libgncmod_business_backend_file_LTX_gnc_module_init(int refcount)
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_business_backend_file_LTX_gnc_module_end(int refcount)
|
||||
gnc_module_end(int refcount)
|
||||
{
|
||||
int unload = TRUE;
|
||||
|
||||
|
@ -15,8 +15,7 @@ LDADD = \
|
||||
${top_builddir}/src/engine/libgncmod-engine.la \
|
||||
../libgncmod-business-core.la \
|
||||
${GLIB_LIBS} \
|
||||
${QOF_LIBS} \
|
||||
-lltdl
|
||||
${QOF_LIBS}
|
||||
|
||||
TESTS = \
|
||||
test-load-module \
|
||||
@ -28,13 +27,16 @@ TESTS = \
|
||||
test-vendor
|
||||
|
||||
GNC_TEST_DEPS := \
|
||||
--gnc-module-dir ${top_builddir}/src/core-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/gnc-module \
|
||||
--gnc-module-dir ${top_builddir}/src/engine \
|
||||
--gnc-module-dir ${top_builddir}/src/business/business-core \
|
||||
--gnc-module-dir ${top_srcdir}/src/gnc-module \
|
||||
--guile-load-dir ${top_builddir}/src/gnc-module \
|
||||
--guile-load-dir ${top_builddir}/src/engine \
|
||||
--guile-load-dir ${top_builddir}/src/business/business-core \
|
||||
--library-dir ${top_builddir}/lib/libqof/qof \
|
||||
--gnc-module-dir ${top_srcdir}/src/engine
|
||||
--library-dir ${top_builddir}/src/core-utils \
|
||||
--library-dir ${top_builddir}/src/gnc-module \
|
||||
--library-dir ${top_builddir}/src/engine \
|
||||
--library-dir ${top_builddir}/src/business/business-core
|
||||
|
||||
TESTS_ENVIRONMENT := \
|
||||
$(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
|
||||
|
@ -1,5 +1,4 @@
|
||||
SUBDIRS = . glade schemas ui
|
||||
PWD := $(shell pwd)
|
||||
|
||||
pkglib_LTLIBRARIES = libgncmod-business-gnome.la
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*********************************************************************
|
||||
* businessmod-core.c
|
||||
* module definition/initialization for the Business GNOME UI module
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001 Derek Atkins <warlord@MIT.EDU>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@ -27,9 +27,9 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <gmodule.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include <glib/gi18n.h>
|
||||
#include <stdio.h>
|
||||
#include <libguile.h>
|
||||
|
||||
#include "gnc-hooks.h"
|
||||
@ -50,34 +50,28 @@
|
||||
#include "dialog-preferences.h"
|
||||
|
||||
/* version of the gnc module system interface we require */
|
||||
int libgncmod_business_gnome_LTX_gnc_module_system_interface = 0;
|
||||
int gnc_module_system_interface = 0;
|
||||
|
||||
/* module versioning uses libtool semantics. */
|
||||
int libgncmod_business_gnome_LTX_gnc_module_current = 0;
|
||||
int libgncmod_business_gnome_LTX_gnc_module_revision = 0;
|
||||
int libgncmod_business_gnome_LTX_gnc_module_age = 0;
|
||||
|
||||
/* forward references */
|
||||
char *libgncmod_business_gnome_LTX_gnc_module_path(void);
|
||||
char *libgncmod_business_gnome_LTX_gnc_module_description(void);
|
||||
int libgncmod_business_gnome_LTX_gnc_module_init(int refcount);
|
||||
int libgncmod_business_gnome_LTX_gnc_module_end(int refcount);
|
||||
int gnc_module_current = 0;
|
||||
int gnc_module_revision = 0;
|
||||
int gnc_module_age = 0;
|
||||
|
||||
|
||||
char *
|
||||
libgncmod_business_gnome_LTX_gnc_module_path(void)
|
||||
gnc_module_path(void)
|
||||
{
|
||||
return g_strdup("gnucash/business-gnome");
|
||||
}
|
||||
|
||||
char *
|
||||
libgncmod_business_gnome_LTX_gnc_module_description(void)
|
||||
char *
|
||||
gnc_module_description(void)
|
||||
{
|
||||
return g_strdup("The GnuCash business module GNOME UI");
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_business_gnome_LTX_gnc_module_init(int refcount)
|
||||
gnc_module_init(int refcount)
|
||||
{
|
||||
/* load business-core: we depend on it -- and it depends on the engine */
|
||||
if (!gnc_module_load ("gnucash/business-core", 0)) {
|
||||
@ -143,7 +137,6 @@ libgncmod_business_gnome_LTX_gnc_module_init(int refcount)
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_business_gnome_LTX_gnc_module_end(int refcount) {
|
||||
gnc_module_end(int refcount) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*********************************************************************
|
||||
* gncmod-business-utils.c
|
||||
* module definition/initialization for the Business Utilitizes module
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2003 Derek Atkins <warlord@MIT.EDU>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@ -23,41 +23,35 @@
|
||||
*********************************************************************/
|
||||
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include <gmodule.h>
|
||||
#include <libguile.h>
|
||||
#include <glib.h>
|
||||
|
||||
#include "gnc-module.h"
|
||||
#include "gnc-module-api.h"
|
||||
|
||||
/* version of the gnc module system interface we require */
|
||||
int libgncmod_business_utils_LTX_gnc_module_system_interface = 0;
|
||||
int gnc_module_system_interface = 0;
|
||||
|
||||
/* module versioning uses libtool semantics. */
|
||||
int libgncmod_business_utils_LTX_gnc_module_current = 0;
|
||||
int libgncmod_business_utils_LTX_gnc_module_revision = 0;
|
||||
int libgncmod_business_utils_LTX_gnc_module_age = 0;
|
||||
int gnc_module_current = 0;
|
||||
int gnc_module_revision = 0;
|
||||
int gnc_module_age = 0;
|
||||
|
||||
/* forward references */
|
||||
char *libgncmod_business_utils_LTX_gnc_module_path(void);
|
||||
char *libgncmod_business_utils_LTX_gnc_module_description(void);
|
||||
int libgncmod_business_utils_LTX_gnc_module_init(int refcount);
|
||||
int libgncmod_business_utils_LTX_gnc_module_end(int refcount);
|
||||
|
||||
char *
|
||||
libgncmod_business_utils_LTX_gnc_module_path(void)
|
||||
gnc_module_path(void)
|
||||
{
|
||||
return g_strdup("gnucash/business-utils");
|
||||
}
|
||||
|
||||
char *
|
||||
libgncmod_business_utils_LTX_gnc_module_description(void)
|
||||
char *
|
||||
gnc_module_description(void)
|
||||
{
|
||||
return g_strdup("The GnuCash business utilities module");
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_business_utils_LTX_gnc_module_init(int refcount)
|
||||
gnc_module_init(int refcount)
|
||||
{
|
||||
/* load the business-core (we depend on it) */
|
||||
if (!gnc_module_load("gnucash/business-core", 0)) {
|
||||
@ -69,17 +63,17 @@ libgncmod_business_utils_LTX_gnc_module_init(int refcount)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if(refcount == 0)
|
||||
if(refcount == 0)
|
||||
{
|
||||
/* initialize known types */
|
||||
}
|
||||
|
||||
|
||||
scm_c_eval_string("(use-modules (gnucash business-utils))");
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_business_utils_LTX_gnc_module_end(int refcount) {
|
||||
gnc_module_end(int refcount) {
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -1,5 +1,3 @@
|
||||
PWD := $(shell pwd)
|
||||
|
||||
pkglib_LTLIBRARIES = libgncmod-dialog-tax-table.la
|
||||
|
||||
AM_CFLAGS = \
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*********************************************************************
|
||||
* gncmod-dialog-tax-table.c
|
||||
* module definition/initialization for the Business Tax Table Dialog module
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2002 Derek Atkins <warlord@MIT.EDU>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@ -23,43 +23,36 @@
|
||||
*********************************************************************/
|
||||
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include <gmodule.h>
|
||||
#include <libguile.h>
|
||||
#include <glib.h>
|
||||
|
||||
#include "gnc-module.h"
|
||||
#include "gnc-module-api.h"
|
||||
|
||||
extern SCM scm_init_sw_dialog_tax_table_module(void);
|
||||
/* version of the gnc module system interface we require */
|
||||
int libgncmod_dialog_tax_table_LTX_gnc_module_system_interface = 0;
|
||||
int gnc_module_system_interface = 0;
|
||||
|
||||
/* module versioning uses libtool semantics. */
|
||||
int libgncmod_dialog_tax_table_LTX_gnc_module_current = 0;
|
||||
int libgncmod_dialog_tax_table_LTX_gnc_module_revision = 0;
|
||||
int libgncmod_dialog_tax_table_LTX_gnc_module_age = 0;
|
||||
|
||||
/* forward references */
|
||||
char *libgncmod_dialog_tax_table_LTX_gnc_module_path(void);
|
||||
char *libgncmod_dialog_tax_table_LTX_gnc_module_description(void);
|
||||
int libgncmod_dialog_tax_table_LTX_gnc_module_init(int refcount);
|
||||
int libgncmod_dialog_tax_table_LTX_gnc_module_end(int refcount);
|
||||
int gnc_module_current = 0;
|
||||
int gnc_module_revision = 0;
|
||||
int gnc_module_age = 0;
|
||||
|
||||
|
||||
char *
|
||||
libgncmod_dialog_tax_table_LTX_gnc_module_path(void)
|
||||
gnc_module_path(void)
|
||||
{
|
||||
return g_strdup("gnucash/dialog-tax-table");
|
||||
}
|
||||
|
||||
char *
|
||||
libgncmod_dialog_tax_table_LTX_gnc_module_description(void)
|
||||
char *
|
||||
gnc_module_description(void)
|
||||
{
|
||||
return g_strdup("The GnuCash tax-table GNOME UI module");
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_dialog_tax_table_LTX_gnc_module_init(int refcount)
|
||||
gnc_module_init(int refcount)
|
||||
{
|
||||
/* load business-core: we depend on it -- and it depends on the engine */
|
||||
if (!gnc_module_load ("gnucash/business-core", 0)) {
|
||||
@ -80,7 +73,6 @@ libgncmod_dialog_tax_table_LTX_gnc_module_init(int refcount)
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_dialog_tax_table_LTX_gnc_module_end(int refcount) {
|
||||
gnc_module_end(int refcount) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -1,47 +1,41 @@
|
||||
/*********************************************************************
|
||||
* gncmod-calculation.c
|
||||
* module definition/initialization for the calculation module
|
||||
*
|
||||
* Copyright (c) 2001 Linux Developers Group, Inc.
|
||||
* module definition/initialization for the calculation module
|
||||
*
|
||||
* Copyright (c) 2001 Linux Developers Group, Inc.
|
||||
*********************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <glib.h>
|
||||
#include <gmodule.h>
|
||||
|
||||
#include "gnc-module.h"
|
||||
#include "gnc-module-api.h"
|
||||
|
||||
/* version of the gnc module system interface we require */
|
||||
int libgncmod_calculation_LTX_gnc_module_system_interface = 0;
|
||||
int gnc_module_system_interface = 0;
|
||||
|
||||
/* module versioning uses libtool semantics. */
|
||||
int libgncmod_calculation_LTX_gnc_module_current = 0;
|
||||
int libgncmod_calculation_LTX_gnc_module_revision = 0;
|
||||
int libgncmod_calculation_LTX_gnc_module_age = 0;
|
||||
|
||||
/* forward references */
|
||||
char *libgncmod_calculation_LTX_gnc_module_path(void);
|
||||
char *libgncmod_calculation_LTX_gnc_module_description(void);
|
||||
int libgncmod_calculation_LTX_gnc_module_init(int refcount);
|
||||
int libgncmod_calculation_LTX_gnc_module_end(int refcount);
|
||||
int gnc_module_current = 0;
|
||||
int gnc_module_revision = 0;
|
||||
int gnc_module_age = 0;
|
||||
|
||||
|
||||
char *
|
||||
libgncmod_calculation_LTX_gnc_module_path(void) {
|
||||
gnc_module_path(void) {
|
||||
return g_strdup("gnucash/calculation");
|
||||
}
|
||||
|
||||
char *
|
||||
libgncmod_calculation_LTX_gnc_module_description(void) {
|
||||
char *
|
||||
gnc_module_description(void) {
|
||||
return g_strdup("GnuCash calculation module");
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_calculation_LTX_gnc_module_init(int refcount) {
|
||||
gnc_module_init(int refcount) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_calculation_LTX_gnc_module_end(int refcount) {
|
||||
gnc_module_end(int refcount) {
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -1,5 +1,4 @@
|
||||
SUBDIRS = . test-core test
|
||||
PWD := $(shell pwd)
|
||||
|
||||
pkglib_LTLIBRARIES = libgncmod-engine.la
|
||||
|
||||
|
@ -1,41 +1,34 @@
|
||||
/*********************************************************************
|
||||
* gnc-mod-engine.c
|
||||
* module definition/initialization for the Engine module
|
||||
*
|
||||
* Copyright (c) 2001 Linux Developers Group, Inc.
|
||||
*
|
||||
* Copyright (c) 2001 Linux Developers Group, Inc.
|
||||
*********************************************************************/
|
||||
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include <glib.h>
|
||||
#include <gmodule.h>
|
||||
#include <libguile.h>
|
||||
|
||||
#include "gnc-engine.h"
|
||||
#include "gnc-module-api.h"
|
||||
|
||||
/* version of the gnc module system interface we require */
|
||||
int libgncmod_engine_LTX_gnc_module_system_interface = 0;
|
||||
int gnc_module_system_interface = 0;
|
||||
|
||||
/* module versioning uses libtool semantics. */
|
||||
int libgncmod_engine_LTX_gnc_module_current = 0;
|
||||
int libgncmod_engine_LTX_gnc_module_revision = 0;
|
||||
int libgncmod_engine_LTX_gnc_module_age = 0;
|
||||
|
||||
/* forward references */
|
||||
char *libgncmod_engine_LTX_gnc_module_path(void);
|
||||
char *libgncmod_engine_LTX_gnc_module_description(void);
|
||||
int libgncmod_engine_LTX_gnc_module_init(int refcount);
|
||||
int libgncmod_engine_LTX_gnc_module_end(int refcount);
|
||||
int gnc_module_current = 0;
|
||||
int gnc_module_revision = 0;
|
||||
int gnc_module_age = 0;
|
||||
|
||||
|
||||
char *
|
||||
libgncmod_engine_LTX_gnc_module_path(void)
|
||||
gnc_module_path(void)
|
||||
{
|
||||
return g_strdup("gnucash/engine");
|
||||
}
|
||||
|
||||
char *
|
||||
libgncmod_engine_LTX_gnc_module_description(void)
|
||||
char *
|
||||
gnc_module_description(void)
|
||||
{
|
||||
return g_strdup("The GnuCash accounting engine");
|
||||
}
|
||||
@ -43,14 +36,14 @@ libgncmod_engine_LTX_gnc_module_description(void)
|
||||
extern SCM scm_init_sw_engine_module(void);
|
||||
|
||||
int
|
||||
libgncmod_engine_LTX_gnc_module_init(int refcount)
|
||||
gnc_module_init(int refcount)
|
||||
{
|
||||
if(refcount == 0)
|
||||
if(refcount == 0)
|
||||
{
|
||||
/* initialize the engine on the first load */
|
||||
gnc_engine_init(0, NULL);
|
||||
}
|
||||
|
||||
|
||||
scm_init_sw_engine_module();
|
||||
scm_c_eval_string("(use-modules (sw_engine))");
|
||||
scm_c_eval_string("(use-modules (gnucash engine))");
|
||||
@ -59,7 +52,6 @@ libgncmod_engine_LTX_gnc_module_init(int refcount)
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_engine_LTX_gnc_module_end(int refcount) {
|
||||
gnc_module_end(int refcount) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -4,8 +4,7 @@ LDADD = \
|
||||
${top_builddir}/src/gnc-module/libgncmodule.la \
|
||||
../libgncmod-engine.la \
|
||||
${GLIB_LIBS} \
|
||||
${QOF_LIBS} \
|
||||
-lltdl
|
||||
${QOF_LIBS}
|
||||
|
||||
libgncmod_test_engine_la_SOURCES = gncmod-test-engine.c test-engine-stuff.c
|
||||
libgncmod_test_engine_la_LDFLAGS = -module
|
||||
|
@ -1,47 +1,41 @@
|
||||
/*********************************************************************
|
||||
* gncmod-test-engine.c
|
||||
* module definition/initialization for the engine test infrastructure
|
||||
*
|
||||
* Copyright (c) 2001 Linux Developers Group, Inc.
|
||||
* module definition/initialization for the engine test infrastructure
|
||||
*
|
||||
* Copyright (c) 2001 Linux Developers Group, Inc.
|
||||
*********************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <glib.h>
|
||||
#include <gmodule.h>
|
||||
|
||||
#include "gnc-module.h"
|
||||
#include "gnc-module-api.h"
|
||||
|
||||
/* version of the gnc module system interface we require */
|
||||
int libgncmod_test_engine_LTX_gnc_module_system_interface = 0;
|
||||
int gnc_module_system_interface = 0;
|
||||
|
||||
/* module versioning uses libtool semantics. */
|
||||
int libgncmod_test_engine_LTX_gnc_module_current = 0;
|
||||
int libgncmod_test_engine_LTX_gnc_module_revision = 0;
|
||||
int libgncmod_test_engine_LTX_gnc_module_age = 0;
|
||||
|
||||
/* forward references */
|
||||
char *libgncmod_test_engine_LTX_gnc_module_path(void);
|
||||
char *libgncmod_test_engine_LTX_gnc_module_description(void);
|
||||
int libgncmod_test_engine_LTX_gnc_module_init(int refcount);
|
||||
int libgncmod_test_engine_LTX_gnc_module_end(int refcount);
|
||||
int gnc_module_current = 0;
|
||||
int gnc_module_revision = 0;
|
||||
int gnc_module_age = 0;
|
||||
|
||||
|
||||
char *
|
||||
libgncmod_test_engine_LTX_gnc_module_path(void) {
|
||||
gnc_module_path(void) {
|
||||
return g_strdup("gnucash/engine/test");
|
||||
}
|
||||
|
||||
char *
|
||||
libgncmod_test_engine_LTX_gnc_module_description(void) {
|
||||
char *
|
||||
gnc_module_description(void) {
|
||||
return g_strdup("GnuCash Engine test infrastructure.");
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_test_engine_LTX_gnc_module_init(int refcount) {
|
||||
gnc_module_init(int refcount) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_test_engine_LTX_gnc_module_end(int refcount) {
|
||||
gnc_module_end(int refcount) {
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ AM_CFLAGS = \
|
||||
-I${top_srcdir}/src/engine/test-core \
|
||||
${GUILE_INCS} \
|
||||
${QOF_CFLAGS} \
|
||||
${GLIB_CFLAGS}
|
||||
${GLIB_CFLAGS}
|
||||
|
||||
LDADD = \
|
||||
${top_builddir}/src/gnc-module/libgncmodule.la \
|
||||
@ -17,12 +17,11 @@ LDADD = \
|
||||
../test-core/libgncmod-test-engine.la \
|
||||
${top_builddir}/src/core-utils/libcore-utils.la \
|
||||
${GLIB_LIBS} \
|
||||
${QOF_LIBS} \
|
||||
-lltdl
|
||||
${QOF_LIBS}
|
||||
|
||||
# these tests are ordered kind more or less in the order
|
||||
# that they should be executed, with more basic tests coming first.
|
||||
#
|
||||
#
|
||||
TESTS = \
|
||||
test-link \
|
||||
test-load-engine \
|
||||
@ -45,17 +44,16 @@ TESTS = \
|
||||
test-freq-spec \
|
||||
test-recurrence \
|
||||
test-scm-query \
|
||||
test-book-merge
|
||||
test-book-merge
|
||||
|
||||
GNC_TEST_DEPS := \
|
||||
--gnc-module-dir ${top_builddir}/src/gnc-module \
|
||||
--gnc-module-dir ${top_builddir}/src/engine \
|
||||
--gnc-module-dir ${top_srcdir}/src/gnc-module \
|
||||
--gnc-module-dir ${top_srcdir}/src/engine \
|
||||
--library-dir ${top_builddir}/src/core-utils \
|
||||
--guile-load-dir ${top_builddir}/src/gnc-module \
|
||||
--guile-load-dir ${top_builddir}/src/engine \
|
||||
--library-dir ${top_builddir}/lib/libqof/qof \
|
||||
--library-dir ${top_builddir}/src/backend/file \
|
||||
--guile-load-dir ${top_srcdir}/src/engine/test
|
||||
--library-dir ${top_builddir}/src/core-utils \
|
||||
--library-dir ${top_builddir}/src/gnc-module \
|
||||
--library-dir ${top_builddir}/src/engine
|
||||
|
||||
TESTS_ENVIRONMENT := \
|
||||
SRCDIR=${srcdir} \
|
||||
|
@ -14,8 +14,7 @@ libgncmodule_la_LIBADD = \
|
||||
../core-utils/libcore-utils.la \
|
||||
${top_builddir}/lib/libc/libc-missing.la \
|
||||
${GUILE_LIBS} \
|
||||
${GLIB_LIBS} \
|
||||
-lltdl
|
||||
${GLIB_LIBS}
|
||||
|
||||
gncmoddir = ${GNC_SHAREDIR}/guile-modules/gnucash
|
||||
gncmod_DATA = gnc-module.scm
|
||||
|
@ -8,22 +8,13 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <glib.h>
|
||||
#ifdef G_OS_WIN32
|
||||
# undef DLL_EXPORT /* Will cause warnings in ltdl.h if defined */
|
||||
# define LIBLTDL_DLL_IMPORT
|
||||
#endif
|
||||
#include <ltdl.h>
|
||||
#include <gmodule.h>
|
||||
#include <guile/gh.h>
|
||||
#include <sys/types.h>
|
||||
#include <dirent.h>
|
||||
|
||||
#include "gnc-module.h"
|
||||
|
||||
#ifndef lt_ptr
|
||||
# define lt_ptr lt_ptr_t
|
||||
#endif
|
||||
|
||||
static GHashTable * loaded_modules = NULL;
|
||||
static GList * module_info = NULL;
|
||||
|
||||
@ -36,12 +27,12 @@ typedef struct {
|
||||
int module_revision;
|
||||
} GNCModuleInfo;
|
||||
|
||||
typedef struct
|
||||
typedef struct
|
||||
{
|
||||
lt_dlhandle handle;
|
||||
GModule * gmodule;
|
||||
gchar * filename;
|
||||
int load_count;
|
||||
GNCModuleInfo * info;
|
||||
GNCModuleInfo * info;
|
||||
int (* init_func)(int refcount);
|
||||
} GNCLoadedModule;
|
||||
|
||||
@ -166,29 +157,21 @@ gnc_module_system_setup_load_path(void)
|
||||
|
||||
/*************************************************************
|
||||
* gnc_module_system_init
|
||||
* initialize the module system
|
||||
* initialize the module system
|
||||
*************************************************************/
|
||||
|
||||
void
|
||||
gnc_module_system_init(void)
|
||||
gnc_module_system_init(void)
|
||||
{
|
||||
if(loaded_modules == NULL)
|
||||
{
|
||||
loaded_modules = g_hash_table_new(g_direct_hash, g_direct_equal);
|
||||
|
||||
if(lt_dlinit() == 0)
|
||||
{
|
||||
gnc_module_system_setup_load_path();
|
||||
|
||||
/* now crawl the GNC_MODULE_PATH to find likely libraries */
|
||||
gnc_module_system_refresh();
|
||||
}
|
||||
else
|
||||
{
|
||||
/* FIXME: there's no way to report this error to the caller. */
|
||||
g_warning ("gnc module system couldn't initialize libltdl");
|
||||
}
|
||||
}
|
||||
if (loaded_modules)
|
||||
return;
|
||||
|
||||
loaded_modules = g_hash_table_new(g_direct_hash, g_direct_equal);
|
||||
|
||||
gnc_module_system_setup_load_path();
|
||||
|
||||
/* now crawl the GNC_MODULE_PATH to find likely libraries */
|
||||
gnc_module_system_refresh();
|
||||
}
|
||||
|
||||
|
||||
@ -218,17 +201,19 @@ gnc_module_system_refresh(void)
|
||||
DIR *d = opendir(current->data);
|
||||
struct dirent * dent = NULL;
|
||||
char * fullpath = NULL;
|
||||
int namelen;
|
||||
GNCModuleInfo * info;
|
||||
|
||||
if (!d) continue;
|
||||
|
||||
while ((dent = readdir(d)) != NULL)
|
||||
{
|
||||
namelen = strlen(dent->d_name);
|
||||
|
||||
/* is the file a .la shared lib? */
|
||||
if((namelen > 3) && (!strncmp(dent->d_name + namelen - 3, ".la", 3)))
|
||||
/* is the file a loadable module? */
|
||||
|
||||
/* Gotcha: On MacOS, G_MODULE_SUFFIX is defined as "so", but if we do
|
||||
* not build clean libtool modules with "-module", we get dynamic
|
||||
* libraries ending on .dylib */
|
||||
if (g_str_has_suffix(dent->d_name, "." G_MODULE_SUFFIX) ||
|
||||
g_str_has_suffix(dent->d_name, ".dylib"))
|
||||
{
|
||||
/* get the full path name, then dlopen the library and see
|
||||
* if it has the appropriate symbols to be a gnc_module */
|
||||
@ -279,68 +264,62 @@ gnc_module_system_modinfo(void)
|
||||
*************************************************************/
|
||||
|
||||
static GNCModuleInfo *
|
||||
gnc_module_get_info(const char * fullpath)
|
||||
gnc_module_get_info(const char * fullpath)
|
||||
{
|
||||
lt_dlhandle handle;
|
||||
lt_ptr modsysver;
|
||||
GModule *gmodule;
|
||||
gpointer modsysver;
|
||||
GNCModuleInfo *info = NULL;
|
||||
gpointer initfunc, pathfunc, descripfunc, iface, revision, age;
|
||||
gchar * (* f_path)(void);
|
||||
gchar * (* f_descrip)(void);
|
||||
|
||||
//printf("(init) dlopening %s\n", fullpath);
|
||||
handle = lt_dlopen(fullpath);
|
||||
if (handle == NULL) {
|
||||
g_warning ("Failed to dlopen() '%s': %s\n", fullpath, lt_dlerror());
|
||||
/* g_debug("(init) dlopening '%s'\n", fullpath); */
|
||||
gmodule = g_module_open(fullpath, G_MODULE_BIND_MASK);
|
||||
if (gmodule == NULL) {
|
||||
g_warning("Failed to dlopen() '%s': %s\n", fullpath, g_module_error());
|
||||
return NULL;
|
||||
}
|
||||
|
||||
modsysver = lt_dlsym(handle, "gnc_module_system_interface");
|
||||
|
||||
/* the modsysver tells us what the expected symbols and their
|
||||
* types are */
|
||||
if (!modsysver) {
|
||||
//printf("(init) closing %s\n", fullpath);
|
||||
//lt_dlclose(handle);
|
||||
return NULL;
|
||||
if (!g_module_symbol(gmodule, "gnc_module_system_interface", &modsysver)) {
|
||||
/* g_debug("Module '%s' does not contain 'gnc_module_system_interface'\n", */
|
||||
/* fullpath); */
|
||||
goto get_info_close;
|
||||
}
|
||||
|
||||
if (*(int *)modsysver != 0) {
|
||||
/* unsupported module system interface version */
|
||||
/* printf("\n** WARNING ** : module '%s' requires newer module system\n",
|
||||
fullpath); */
|
||||
//lt_dlclose(handle);
|
||||
return NULL;
|
||||
g_warning("Module '%s' requires newer module system\n", fullpath);
|
||||
goto get_info_close;
|
||||
}
|
||||
|
||||
{
|
||||
lt_ptr initfunc = lt_dlsym(handle, "gnc_module_init");
|
||||
lt_ptr pathfunc = lt_dlsym(handle, "gnc_module_path");
|
||||
lt_ptr descripfunc = lt_dlsym(handle, "gnc_module_description");
|
||||
lt_ptr iface = lt_dlsym(handle, "gnc_module_current");
|
||||
lt_ptr revision = lt_dlsym(handle, "gnc_module_revision");
|
||||
lt_ptr age = lt_dlsym(handle, "gnc_module_age");
|
||||
|
||||
if (!(initfunc && pathfunc && descripfunc && iface &&
|
||||
revision && age)) {
|
||||
g_warning ("module '%s' does not match module signature\n",
|
||||
fullpath);
|
||||
//lt_dlclose(handle);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
{
|
||||
/* we have found a gnc_module. */
|
||||
GNCModuleInfo * info = g_new0(GNCModuleInfo, 1);
|
||||
char * (* f_path)(void) = pathfunc;
|
||||
char * (* f_descrip)(void) = descripfunc;
|
||||
info->module_path = f_path();
|
||||
info->module_description = f_descrip();
|
||||
info->module_filepath = g_strdup(fullpath);
|
||||
info->module_interface = *(int *)iface;
|
||||
info->module_age = *(int *)age;
|
||||
info->module_revision = *(int *)revision;
|
||||
//printf("(init) closing %s\n", fullpath);
|
||||
//lt_dlclose(handle);
|
||||
return info;
|
||||
}
|
||||
if (!g_module_symbol(gmodule, "gnc_module_init", &initfunc) ||
|
||||
!g_module_symbol(gmodule, "gnc_module_path", &pathfunc) ||
|
||||
!g_module_symbol(gmodule, "gnc_module_description", &descripfunc) ||
|
||||
!g_module_symbol(gmodule, "gnc_module_current", &iface) ||
|
||||
!g_module_symbol(gmodule, "gnc_module_revision", &revision) ||
|
||||
!g_module_symbol(gmodule, "gnc_module_age", &age)) {
|
||||
g_warning("Module '%s' does not match module signature\n", fullpath);
|
||||
goto get_info_close;
|
||||
}
|
||||
|
||||
/* we have found a gnc_module. */
|
||||
info = g_new0(GNCModuleInfo, 1);
|
||||
f_path = pathfunc;
|
||||
f_descrip = descripfunc;
|
||||
info->module_path = f_path();
|
||||
info->module_description = f_descrip();
|
||||
info->module_filepath = g_strdup(fullpath);
|
||||
info->module_interface = *(int *)iface;
|
||||
info->module_age = *(int *)age;
|
||||
info->module_revision = *(int *)revision;
|
||||
|
||||
|
||||
get_info_close:
|
||||
/* g_debug("(init) closing '%s'\n", fullpath); */
|
||||
g_module_close(gmodule);
|
||||
|
||||
return info;
|
||||
}
|
||||
|
||||
|
||||
@ -396,32 +375,32 @@ list_loaded (gpointer k, gpointer v, gpointer data)
|
||||
*l = g_list_prepend(*l, v);
|
||||
}
|
||||
|
||||
static GNCLoadedModule *
|
||||
gnc_module_check_loaded(const char * module_name, gint iface)
|
||||
static GNCLoadedModule *
|
||||
gnc_module_check_loaded(const char * module_name, gint iface)
|
||||
{
|
||||
GNCModuleInfo * modinfo = gnc_module_locate(module_name, iface);
|
||||
GList * modules = NULL;
|
||||
GList * p = NULL;
|
||||
GNCLoadedModule * rv = NULL;
|
||||
|
||||
if(modinfo == NULL)
|
||||
if (modinfo == NULL)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if(!loaded_modules)
|
||||
|
||||
if (!loaded_modules)
|
||||
{
|
||||
gnc_module_system_init();
|
||||
}
|
||||
|
||||
|
||||
/* turn the loaded-modules table into a list */
|
||||
g_hash_table_foreach(loaded_modules, list_loaded, &modules);
|
||||
|
||||
/* walk the list to see if the file we want is already open */
|
||||
for(p=modules; p; p=p->next)
|
||||
for (p=modules; p; p=p->next)
|
||||
{
|
||||
GNCLoadedModule * lm = p->data;
|
||||
if(!strcmp(lm->filename, modinfo->module_filepath))
|
||||
if (!strcmp(lm->filename, modinfo->module_filepath))
|
||||
{
|
||||
rv = lm;
|
||||
break;
|
||||
@ -434,33 +413,33 @@ gnc_module_check_loaded(const char * module_name, gint iface)
|
||||
|
||||
/*************************************************************
|
||||
* gnc_module_load
|
||||
* Ensure that the module named by "module_name" is loaded.
|
||||
* Ensure that the module named by "module_name" is loaded.
|
||||
*************************************************************/
|
||||
|
||||
static GNCModule
|
||||
static GNCModule
|
||||
gnc_module_load_common(char * module_name, gint iface, gboolean optional)
|
||||
{
|
||||
|
||||
GNCLoadedModule * info;
|
||||
|
||||
if(!loaded_modules)
|
||||
|
||||
if(!loaded_modules)
|
||||
{
|
||||
gnc_module_system_init();
|
||||
}
|
||||
|
||||
|
||||
info = gnc_module_check_loaded(module_name, iface);
|
||||
|
||||
|
||||
/* if the module's already loaded, just increment its use count.
|
||||
* otherwise, load it and check for the initializer
|
||||
* "gnc_module_init". if we find that, assume it's a gnucash module
|
||||
* and run the function. */
|
||||
|
||||
if(info)
|
||||
if (info)
|
||||
{
|
||||
/* module already loaded ... call the init thunk */
|
||||
if(info->init_func)
|
||||
if (info->init_func)
|
||||
{
|
||||
if(info->init_func(info->load_count))
|
||||
if (info->init_func(info->load_count))
|
||||
{
|
||||
info->load_count++;
|
||||
return info;
|
||||
@ -476,44 +455,47 @@ gnc_module_load_common(char * module_name, gint iface, gboolean optional)
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
GNCModuleInfo * modinfo = gnc_module_locate(module_name, iface);
|
||||
lt_dlhandle handle = NULL;
|
||||
|
||||
//if(modinfo)
|
||||
//printf("(load) dlopening %s\n", modinfo->module_filepath);
|
||||
GModule * gmodule;
|
||||
|
||||
if(modinfo && ((handle = lt_dlopen(modinfo->module_filepath)) != NULL))
|
||||
/* if (modinfo) */
|
||||
/* g_debug("(init) loading '%s' from '%s'\n", module_name, */
|
||||
/* modinfo->module_filepath); */
|
||||
|
||||
if (modinfo &&
|
||||
((gmodule = g_module_open(modinfo->module_filepath, 0))
|
||||
!= NULL))
|
||||
{
|
||||
lt_ptr initfunc = lt_dlsym(handle, "gnc_module_init");
|
||||
|
||||
if(initfunc)
|
||||
gpointer initfunc;
|
||||
|
||||
if (g_module_symbol(gmodule, "gnc_module_init", &initfunc))
|
||||
{
|
||||
/* stick it in the hash table */
|
||||
/* stick it in the hash table */
|
||||
info = g_new0(GNCLoadedModule, 1);
|
||||
info->handle = handle;
|
||||
info->gmodule = gmodule;
|
||||
info->filename = g_strdup(modinfo->module_filepath);
|
||||
info->load_count = 1;
|
||||
info->init_func = initfunc;
|
||||
g_hash_table_insert(loaded_modules, info, info);
|
||||
|
||||
|
||||
/* now call its init function. this should load any dependent
|
||||
* modules, too. If it doesn't return TRUE unload the module. */
|
||||
if(!info->init_func(0))
|
||||
if (!info->init_func(0))
|
||||
{
|
||||
/* init failed. unload the module. */
|
||||
g_warning ("Initialization failed for module %s\n", module_name);
|
||||
g_hash_table_remove(loaded_modules, info);
|
||||
g_free(info->filename);
|
||||
g_free(info);
|
||||
//lt_dlclose(handle);
|
||||
/* g_module_close(module); */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return info;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
g_warning ("Module %s (%s) is not a gnc-module.\n", module_name,
|
||||
modinfo->module_filepath);
|
||||
@ -524,7 +506,7 @@ gnc_module_load_common(char * module_name, gint iface, gboolean optional)
|
||||
else if (!optional)
|
||||
{
|
||||
g_warning ("Failed to open module %s", module_name);
|
||||
if(modinfo) printf(": %s\n", lt_dlerror());
|
||||
if(modinfo) printf(": %s\n", g_module_error());
|
||||
else g_warning (": could not locate %s interface v.%d\n",
|
||||
module_name, iface);
|
||||
return NULL;
|
||||
@ -551,40 +533,40 @@ gnc_module_load_optional(char * module_name, gint iface)
|
||||
* unload a module (only actually unload it if the use count goes to 0)
|
||||
*************************************************************/
|
||||
|
||||
int
|
||||
gnc_module_unload(GNCModule module)
|
||||
int
|
||||
gnc_module_unload(GNCModule module)
|
||||
{
|
||||
GNCLoadedModule * info;
|
||||
|
||||
if(!loaded_modules)
|
||||
|
||||
if(!loaded_modules)
|
||||
{
|
||||
gnc_module_system_init();
|
||||
}
|
||||
|
||||
if((info = g_hash_table_lookup(loaded_modules, module)) != NULL)
|
||||
|
||||
if ((info = g_hash_table_lookup(loaded_modules, module)) != NULL)
|
||||
{
|
||||
lt_ptr unload_thunk = lt_dlsym(info->handle, "gnc_module_end");
|
||||
int unload_val = TRUE;
|
||||
gpointer unload_thunk;
|
||||
int unload_val = TRUE;
|
||||
|
||||
info->load_count--;
|
||||
if(unload_thunk)
|
||||
if (g_module_symbol(info->gmodule, "gnc_module_end", &unload_thunk))
|
||||
{
|
||||
int (* thunk)(int) = unload_thunk;
|
||||
unload_val = thunk(info->load_count);
|
||||
}
|
||||
|
||||
|
||||
/* actually unload the module if necessary */
|
||||
if(info->load_count == 0)
|
||||
if (info->load_count == 0)
|
||||
{
|
||||
/* now close the module and free the struct */
|
||||
//printf("(unload) closing %s\n", info->filename);
|
||||
//lt_dlclose(info->handle);
|
||||
/* now close the module and free the struct */
|
||||
/* g_debug("(unload) closing %s\n", info->filename); */
|
||||
/* g_module_close(info->gmodule); */
|
||||
g_hash_table_remove(loaded_modules, module);
|
||||
g_free(info);
|
||||
}
|
||||
return unload_val;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
g_warning ("Failed to unload module %p (it is not loaded)\n", module);
|
||||
return 0;
|
||||
|
@ -1,8 +1,6 @@
|
||||
SUBDIRS = mod-foo mod-bar mod-baz misc-mods
|
||||
|
||||
LDADD = ../libgncmodule.la \
|
||||
${top_builddir}/src/core-utils/libcore-utils.la \
|
||||
${GLIB_LIBS} -lltdl ${GUILE_LIBS}
|
||||
LDADD = ../libgncmodule.la ${GLIB_LIBS} ${GUILE_LIBS}
|
||||
|
||||
AM_CFLAGS = \
|
||||
-I${top_srcdir}/src \
|
||||
@ -25,17 +23,20 @@ TESTS = \
|
||||
test-scm-init
|
||||
|
||||
GNC_TEST_DEPS := \
|
||||
--gnc-module-dir ${top_builddir}/src/core-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/gnc-module \
|
||||
--gnc-module-dir ${top_builddir}/src/gnc-module/test/mod-foo \
|
||||
--gnc-module-dir ${top_builddir}/src/gnc-module/test/mod-bar \
|
||||
--gnc-module-dir ${top_builddir}/src/gnc-module/test/mod-baz \
|
||||
--gnc-module-dir ${top_builddir}/src/gnc-module/test/misc-mods \
|
||||
--gnc-module-dir ${top_srcdir}/src/gnc-module \
|
||||
--gnc-module-dir ${top_srcdir}/src/gnc-module/test/mod-foo \
|
||||
--gnc-module-dir ${top_srcdir}/src/gnc-module/test/mod-bar \
|
||||
--gnc-module-dir ${top_srcdir}/src/gnc-module/test/mod-baz \
|
||||
--gnc-module-dir ${top_srcdir}/src/gnc-module/test/misc-mods
|
||||
--guile-load-dir ${top_builddir}/src/gnc-module \
|
||||
--guile-load-dir ${top_srcdir}/src/gnc-module/test/mod-foo \
|
||||
--guile-load-dir ${top_srcdir}/src/gnc-module/test/mod-baz \
|
||||
--guile-load-dir ${top_srcdir}/src/gnc-module/test/mod-bar \
|
||||
--library-dir ${top_builddir}/src/core-utils \
|
||||
--library-dir ${top_builddir}/src/gnc-module \
|
||||
--library-dir ${top_builddir}/src/gnc-module/test/mod-foo \
|
||||
--library-dir ${top_builddir}/src/gnc-module/test/mod-bar \
|
||||
--library-dir ${top_builddir}/src/gnc-module/test/mod-baz
|
||||
|
||||
TESTS_ENVIRONMENT := \
|
||||
$(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
|
||||
@ -47,7 +48,7 @@ check_PROGRAMS = \
|
||||
test-agedver \
|
||||
test-dynload
|
||||
|
||||
test_dynload_LDFLAGS = -lltdl ${GUILE_LIBS}
|
||||
test_dynload_LDFLAGS = ${GUILE_LIBS}
|
||||
|
||||
EXTRA_DIST = \
|
||||
test-gwrapped-c \
|
||||
|
@ -1,31 +1,28 @@
|
||||
/* agedver.c : testing module age? */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <glib.h>
|
||||
#include <gmodule.h>
|
||||
|
||||
#include "gnc-module.h"
|
||||
#include "gnc-module-api.h"
|
||||
|
||||
int libagedver_LTX_gnc_module_system_interface = 0;
|
||||
int gnc_module_system_interface = 0;
|
||||
|
||||
int gnc_module_current = 12;
|
||||
int gnc_module_age = 9;
|
||||
int gnc_module_revision = 0;
|
||||
|
||||
int libagedver_LTX_gnc_module_current = 12;
|
||||
int libagedver_LTX_gnc_module_age = 9;
|
||||
int libagedver_LTX_gnc_module_revision = 0;
|
||||
char* libagedver_LTX_gnc_module_path(void);
|
||||
char* libagedver_LTX_gnc_module_description(void);
|
||||
int libagedver_LTX_gnc_module_init(int refcount);
|
||||
char *
|
||||
libagedver_LTX_gnc_module_path(void) {
|
||||
gnc_module_path(void) {
|
||||
return g_strdup("gnucash/agedver");
|
||||
}
|
||||
|
||||
char *
|
||||
libagedver_LTX_gnc_module_description(void) {
|
||||
gnc_module_description(void) {
|
||||
return g_strdup("this is a frequently extended module");
|
||||
}
|
||||
|
||||
int
|
||||
libagedver_LTX_gnc_module_init(int refcount) {
|
||||
int
|
||||
gnc_module_init(int refcount) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -4,33 +4,28 @@
|
||||
* version 0 so it will load all the way before failing. */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <glib.h>
|
||||
#include <gmodule.h>
|
||||
|
||||
#include "gnc-module-api.h"
|
||||
|
||||
int libfuturemodsys_LTX_gnc_module_system_interface = 123456;
|
||||
int gnc_module_system_interface = 123456;
|
||||
|
||||
int libfuturemodsys_LTX_gnc_module_current = 0;
|
||||
int libfuturemodsys_LTX_gnc_module_age = 0;
|
||||
int libfuturemodsys_LTX_gnc_module_revision = 0;
|
||||
|
||||
char* libfuturemodsys_LTX_gnc_module_path(void);
|
||||
char* libfuturemodsys_LTX_gnc_module_description(void);
|
||||
int libfuturemodsys_LTX_gnc_module_init(int refcount);
|
||||
int gnc_module_current = 0;
|
||||
int gnc_module_age = 0;
|
||||
int gnc_module_revision = 0;
|
||||
|
||||
|
||||
char *
|
||||
libfuturemodsys_LTX_gnc_module_path(void) {
|
||||
gnc_module_path(void) {
|
||||
return g_strdup("gnucash/futuremodsys");
|
||||
}
|
||||
|
||||
char *
|
||||
libfuturemodsys_LTX_gnc_module_description(void) {
|
||||
gnc_module_description(void) {
|
||||
return g_strdup("this is a broken future module");
|
||||
}
|
||||
|
||||
int
|
||||
libfuturemodsys_LTX_gnc_module_init(int refcount) {
|
||||
int
|
||||
gnc_module_init(int refcount) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -2,40 +2,36 @@
|
||||
* version of another module. the initialization should fail. */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <glib.h>
|
||||
#include <gmodule.h>
|
||||
|
||||
#include "gnc-module.h"
|
||||
#include "gnc-module-api.h"
|
||||
|
||||
int libincompatdep_LTX_gnc_module_system_interface = 0;
|
||||
int gnc_module_system_interface = 0;
|
||||
|
||||
int libincompatdep_LTX_gnc_module_current = 0;
|
||||
int libincompatdep_LTX_gnc_module_age = 0;
|
||||
int libincompatdep_LTX_gnc_module_revision = 0;
|
||||
int gnc_module_current = 0;
|
||||
int gnc_module_age = 0;
|
||||
int gnc_module_revision = 0;
|
||||
|
||||
char *libincompatdep_LTX_gnc_module_path(void);
|
||||
char *libincompatdep_LTX_gnc_module_description(void);
|
||||
int libincompatdep_LTX_gnc_module_init(int refcount);
|
||||
|
||||
char *
|
||||
libincompatdep_LTX_gnc_module_path(void) {
|
||||
gnc_module_path(void) {
|
||||
return g_strdup("gnucash/incompatdep");
|
||||
}
|
||||
|
||||
char *
|
||||
libincompatdep_LTX_gnc_module_description(void) {
|
||||
gnc_module_description(void) {
|
||||
return g_strdup("this is a broken module");
|
||||
}
|
||||
|
||||
int
|
||||
libincompatdep_LTX_gnc_module_init(int refcount) {
|
||||
if (gnc_module_load("gnucash/foo", 25))
|
||||
int
|
||||
gnc_module_init(int refcount) {
|
||||
if (gnc_module_load("gnucash/foo", 25))
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3,43 +3,36 @@
|
||||
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include <glib.h>
|
||||
#include <gmodule.h>
|
||||
#include <libguile.h>
|
||||
|
||||
#include "gnc-module-api.h"
|
||||
#include "swig-bar.c"
|
||||
|
||||
int libgncmodbar_LTX_gnc_module_system_interface = 0;
|
||||
int gnc_module_system_interface = 0;
|
||||
|
||||
int libgncmodbar_LTX_gnc_module_current = 0;
|
||||
int libgncmodbar_LTX_gnc_module_age = 0;
|
||||
int libgncmodbar_LTX_gnc_module_revision = 0;
|
||||
|
||||
/* forward references */
|
||||
char *libgncmodbar_LTX_gnc_module_path(void);
|
||||
char *libgncmodbar_LTX_gnc_module_description(void);
|
||||
int libgncmodbar_LTX_gnc_module_init(int refcount);
|
||||
int gnc_module_current = 0;
|
||||
int gnc_module_age = 0;
|
||||
int gnc_module_revision = 0;
|
||||
|
||||
char *
|
||||
libgncmodbar_LTX_gnc_module_path(void) {
|
||||
gnc_module_path(void) {
|
||||
return g_strdup("gnucash/bar");
|
||||
}
|
||||
|
||||
char *
|
||||
libgncmodbar_LTX_gnc_module_description(void) {
|
||||
gnc_module_description(void) {
|
||||
return g_strdup("this is a bar module");
|
||||
}
|
||||
|
||||
int
|
||||
libgncmodbar_LTX_gnc_module_init(int refcount) {
|
||||
gnc_module_init(int refcount) {
|
||||
/* publish the wrapped Scheme bindings for libbar */
|
||||
scm_init_sw_bar_module();
|
||||
scm_c_eval_string("(use-modules (sw_bar))");
|
||||
|
||||
|
||||
/* use the Scheme "bar" module */
|
||||
scm_c_eval_string("(use-modules (gnucash bar))");
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
@ -3,41 +3,37 @@
|
||||
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include <gmodule.h>
|
||||
#include <libguile.h>
|
||||
|
||||
#include "gnc-module.h"
|
||||
#include "gnc-module-api.h"
|
||||
#include "swig-baz.c"
|
||||
|
||||
int libgncmodbaz_LTX_gnc_module_system_interface = 0;
|
||||
int gnc_module_system_interface = 0;
|
||||
|
||||
int libgncmodbaz_LTX_gnc_module_current = 0;
|
||||
int libgncmodbaz_LTX_gnc_module_age = 0;
|
||||
int libgncmodbaz_LTX_gnc_module_revision = 0;
|
||||
int gnc_module_current = 0;
|
||||
int gnc_module_age = 0;
|
||||
int gnc_module_revision = 0;
|
||||
|
||||
/* forward references */
|
||||
char *libgncmodbaz_LTX_gnc_module_path(void);
|
||||
char *libgncmodbaz_LTX_gnc_module_description(void);
|
||||
int libgncmodbaz_LTX_gnc_module_init(int refcount);
|
||||
|
||||
char *
|
||||
libgncmodbaz_LTX_gnc_module_path(void) {
|
||||
char *
|
||||
gnc_module_path(void) {
|
||||
return g_strdup("gnucash/baz");
|
||||
}
|
||||
|
||||
char *
|
||||
libgncmodbaz_LTX_gnc_module_description(void) {
|
||||
char *
|
||||
gnc_module_description(void) {
|
||||
return g_strdup("this is the baz module");
|
||||
}
|
||||
|
||||
int
|
||||
libgncmodbaz_LTX_gnc_module_init(int refcount) {
|
||||
gnc_module_init(int refcount) {
|
||||
/* load libfoo */
|
||||
if(gnc_module_load("gnucash/foo", 0)) {
|
||||
/* publish the wrapped Scheme bindings for libbaz */
|
||||
scm_init_sw_baz_module();
|
||||
scm_c_eval_string("(use-modules (sw_baz))");
|
||||
|
||||
|
||||
/* use the Scheme "baz" module */
|
||||
scm_c_eval_string("(use-modules (gnucash baz))");
|
||||
|
||||
@ -47,4 +43,3 @@ libgncmodbaz_LTX_gnc_module_init(int refcount) {
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3,41 +3,37 @@
|
||||
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include <glib.h>
|
||||
#include <gmodule.h>
|
||||
#include <libguile.h>
|
||||
|
||||
#include "gnc-module-api.h"
|
||||
#include "swig-foo.c"
|
||||
|
||||
int libgncmodfoo_LTX_gnc_module_system_interface = 0;
|
||||
|
||||
int libgncmodfoo_LTX_gnc_module_current = 0;
|
||||
int libgncmodfoo_LTX_gnc_module_age = 0;
|
||||
int libgncmodfoo_LTX_gnc_module_revision = 0;
|
||||
int gnc_module_system_interface = 0;
|
||||
|
||||
/* forward references */
|
||||
char *libgncmodfoo_LTX_gnc_module_path(void);
|
||||
char *libgncmodfoo_LTX_gnc_module_description(void);
|
||||
int libgncmodfoo_LTX_gnc_module_init(int refcount);
|
||||
int gnc_module_current = 0;
|
||||
int gnc_module_age = 0;
|
||||
int gnc_module_revision = 0;
|
||||
|
||||
char *
|
||||
libgncmodfoo_LTX_gnc_module_path(void) {
|
||||
gnc_module_path(void) {
|
||||
return g_strdup("gnucash/foo");
|
||||
}
|
||||
|
||||
char *
|
||||
libgncmodfoo_LTX_gnc_module_description(void) {
|
||||
gnc_module_description(void) {
|
||||
return g_strdup("this is a foo module");
|
||||
}
|
||||
|
||||
int
|
||||
libgncmodfoo_LTX_gnc_module_init(int refcount) {
|
||||
int
|
||||
gnc_module_init(int refcount) {
|
||||
/* publish the wrapped Scheme bindings for libfoo */
|
||||
scm_init_sw_foo_module();
|
||||
scm_c_eval_string("(use-modules (sw_foo))");
|
||||
|
||||
|
||||
/* use the Scheme "foo" module */
|
||||
scm_c_eval_string("(use-modules (gnucash foo))");
|
||||
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -1,35 +1,30 @@
|
||||
/*********************************************************************
|
||||
* test-dynload.c
|
||||
* test the ability to dlopen the gnc_module library and initialize
|
||||
* it via dlsym
|
||||
* it via dlsym
|
||||
*********************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#ifdef G_OS_WIN32
|
||||
# undef DLL_EXPORT /* Will cause warnings in ltdl.h if defined */
|
||||
# define LIBLTDL_DLL_IMPORT
|
||||
#endif
|
||||
#include <ltdl.h>
|
||||
#include <gmodule.h>
|
||||
#include <libguile.h>
|
||||
|
||||
#include "gnc-module.h"
|
||||
|
||||
#ifndef lt_ptr
|
||||
# define lt_ptr lt_ptr_t
|
||||
#endif
|
||||
|
||||
static void
|
||||
guile_main(void *closure, int argc, char ** argv)
|
||||
{
|
||||
lt_dlhandle handle;
|
||||
|
||||
lt_dlinit();
|
||||
GModule *gmodule;
|
||||
|
||||
printf(" test-dynload.c: testing dynamic linking of libgncmodule ...");
|
||||
handle = lt_dlopen("libgncmodule.la");
|
||||
if(handle) {
|
||||
lt_ptr ptr = lt_dlsym(handle, "gnc_module_system_init");
|
||||
if(ptr) {
|
||||
gmodule = g_module_open("libgncmodule", 0);
|
||||
|
||||
/* Maybe MacOS? */
|
||||
if (!gmodule)
|
||||
gmodule = g_module_open("libgncmodule.dylib", 0);
|
||||
|
||||
if (gmodule) {
|
||||
gpointer ptr;
|
||||
if (g_module_symbol(gmodule, "gnc_module_system_init", &ptr)) {
|
||||
void (* fn)(void) = ptr;
|
||||
fn();
|
||||
printf(" OK\n");
|
||||
@ -42,7 +37,7 @@ guile_main(void *closure, int argc, char ** argv)
|
||||
}
|
||||
else {
|
||||
printf(" failed to open library.\n");
|
||||
printf("%s\n", lt_dlerror());
|
||||
printf("%s\n", g_module_error());
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
|
@ -14,7 +14,10 @@ exec guile -s $0 "$@"
|
||||
;; Are we on MS Windows here? If yes, make this a #t.
|
||||
;; (utsname:sysname (uname)) wasn't available in my guile-1.6.7 on
|
||||
;; mingw, so I don't know an automated way to do this so far.
|
||||
(define is-windows? #f)
|
||||
(define is-windows?
|
||||
(let ((ostype (getenv "OSTYPE")))
|
||||
(and ostype
|
||||
(string=? ostype "msys"))))
|
||||
|
||||
(define args (cdr (command-line)))
|
||||
(define display-exports? #t)
|
||||
@ -45,13 +48,12 @@ exec guile -s $0 "$@"
|
||||
(loop (cddr rest)))
|
||||
(else (usage-death))))
|
||||
(set! gnc-module-dirs (reverse gnc-module-dirs))
|
||||
(set! guile-load-dirs (reverse guile-load-dirs))
|
||||
(set! library-dirs (reverse library-dirs)))
|
||||
(set! guile-load-dirs (reverse guile-load-dirs)))
|
||||
|
||||
;; The character set of everything except a directory separator as
|
||||
;; necessary for string-tokenize below
|
||||
(define char-set-path
|
||||
(char-set-adjoin
|
||||
(char-set-adjoin
|
||||
(char-set-delete char-set:graphic #\/)
|
||||
#\ ))
|
||||
|
||||
@ -84,49 +86,48 @@ exec guile -s $0 "$@"
|
||||
|
||||
(process-args! args)
|
||||
|
||||
(display "GNC_MODULE_PATH=${GNC_MODULE_PATH}:")
|
||||
(display "GNC_MODULE_PATH=\"${GNC_MODULE_PATH}")
|
||||
(display (adapt-dirsep
|
||||
(string-join gnc-module-dirs
|
||||
":")))
|
||||
(apply string-append
|
||||
(map
|
||||
(lambda (dir)
|
||||
(string-append path-sep-str dir "/.libs"))
|
||||
gnc-module-dirs))))
|
||||
(display "\"")
|
||||
|
||||
(display " GUILE_LOAD_PATH=\"${GUILE_LOAD_PATH}")
|
||||
(display path-sep-str)
|
||||
(display (adapt-dirsep
|
||||
(string-join (append gnc-module-dirs guile-load-dirs)
|
||||
(string-join (append '("") guile-load-dirs)
|
||||
path-sep-str)))
|
||||
(display "\"")
|
||||
|
||||
(display " LD_LIBRARY_PATH=${LD_LIBRARY_PATH}")
|
||||
(display " LD_LIBRARY_PATH=\"${LD_LIBRARY_PATH}")
|
||||
(display (adapt-dirsep
|
||||
(apply string-append
|
||||
(map
|
||||
(lambda (dir)
|
||||
(string-append ":" dir ":" dir "/.libs"))
|
||||
(append gnc-module-dirs library-dirs)))))
|
||||
(string-append path-sep-str dir "/.libs"))
|
||||
library-dirs))))
|
||||
(display "\"")
|
||||
|
||||
(display " DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}")
|
||||
(display " DYLD_LIBRARY_PATH=\"${DYLD_LIBRARY_PATH}")
|
||||
(display (adapt-dirsep
|
||||
(apply string-append
|
||||
(map
|
||||
(lambda (dir)
|
||||
(string-append ":" dir ":" dir "/.libs"))
|
||||
(append gnc-module-dirs library-dirs)))))
|
||||
|
||||
(display " LTDL_LIBRARY_PATH=${LTDL_LIBRARY_PATH}")
|
||||
(display (apply string-append
|
||||
(map
|
||||
(lambda (dir)
|
||||
(string-append ":" dir ":" dir "/.libs"))
|
||||
(append gnc-module-dirs library-dirs))))
|
||||
(string-append path-sep-str dir "/.libs"))
|
||||
library-dirs))))
|
||||
(display "\"")
|
||||
|
||||
(if is-windows?
|
||||
(begin
|
||||
(display " PATH=${PATH}")
|
||||
(display " PATH=\"${PATH}")
|
||||
(display (apply string-append
|
||||
(map
|
||||
(lambda (dir)
|
||||
(string-append ":" dir ":" dir "/.libs"))
|
||||
(append gnc-module-dirs library-dirs))))))
|
||||
(string-append ":" dir "/.libs"))
|
||||
library-dirs)))
|
||||
(display "\"")))
|
||||
|
||||
(if display-exports?
|
||||
(begin
|
||||
@ -135,7 +136,8 @@ exec guile -s $0 "$@"
|
||||
(display " export GUILE_LOAD_PATH;")
|
||||
(display " export LD_LIBRARY_PATH;")
|
||||
(display " export DYLD_LIBRARY_PATH;")
|
||||
(display " export LTDL_LIBRARY_PATH;")))
|
||||
(if is-windows?
|
||||
(display " export PATH;"))))
|
||||
|
||||
;; Local Variables:
|
||||
;; mode: scheme
|
||||
|
@ -1,5 +1,3 @@
|
||||
PWD := $(shell pwd)
|
||||
|
||||
pkglib_LTLIBRARIES = libgncmod-gnome-search.la
|
||||
|
||||
AM_CFLAGS = \
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*********************************************************************
|
||||
* gncmod-gnome-search
|
||||
* GNC Module initialization for the Gnome Search UI
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2002 Derek Atkins <warlord@MIT.EDU>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@ -27,7 +27,7 @@
|
||||
#endif
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <stdio.h>
|
||||
#include <gmodule.h>
|
||||
#include <libguile.h>
|
||||
|
||||
#include "gnc-module.h"
|
||||
@ -36,34 +36,28 @@
|
||||
#include "search-core-type.h"
|
||||
|
||||
/* version of the gnc module system interface we require */
|
||||
int libgncmod_gnome_search_LTX_gnc_module_system_interface = 0;
|
||||
int gnc_module_system_interface = 0;
|
||||
|
||||
/* module versioning uses libtool semantics. */
|
||||
int libgncmod_gnome_search_LTX_gnc_module_current = 0;
|
||||
int libgncmod_gnome_search_LTX_gnc_module_revision = 0;
|
||||
int libgncmod_gnome_search_LTX_gnc_module_age = 0;
|
||||
|
||||
/* forward references */
|
||||
char *libgncmod_gnome_search_LTX_gnc_module_path(void);
|
||||
char *libgncmod_gnome_search_LTX_gnc_module_description(void);
|
||||
int libgncmod_gnome_search_LTX_gnc_module_init(int refcount);
|
||||
int libgncmod_gnome_search_LTX_gnc_module_end(int refcount);
|
||||
int gnc_module_current = 0;
|
||||
int gnc_module_revision = 0;
|
||||
int gnc_module_age = 0;
|
||||
|
||||
|
||||
char *
|
||||
libgncmod_gnome_search_LTX_gnc_module_path(void)
|
||||
gnc_module_path(void)
|
||||
{
|
||||
return g_strdup("gnucash/gnome-search");
|
||||
}
|
||||
|
||||
char *
|
||||
libgncmod_gnome_search_LTX_gnc_module_description(void)
|
||||
char *
|
||||
gnc_module_description(void)
|
||||
{
|
||||
return g_strdup("The GnuCash Gnome Search UI");
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_gnome_search_LTX_gnc_module_init(int refcount)
|
||||
gnc_module_init(int refcount)
|
||||
{
|
||||
/* load the engine (we depend on it) */
|
||||
if(!gnc_module_load("gnucash/engine", 0)) {
|
||||
@ -74,17 +68,17 @@ libgncmod_gnome_search_LTX_gnc_module_init(int refcount)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if(refcount == 0)
|
||||
if(refcount == 0)
|
||||
{
|
||||
/* initialize known types */
|
||||
gnc_search_core_initialize ();
|
||||
}
|
||||
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_gnome_search_LTX_gnc_module_end(int refcount) {
|
||||
gnc_module_end(int refcount) {
|
||||
/* XXX Unload the other modules */
|
||||
|
||||
if (refcount == 0) {
|
||||
|
@ -1,5 +1,4 @@
|
||||
SUBDIRS = glade schemas . test ui
|
||||
PWD := $(shell pwd)
|
||||
|
||||
pkglib_LTLIBRARIES = libgncmod-gnome-utils.la
|
||||
|
||||
|
@ -1,14 +1,13 @@
|
||||
/*********************************************************************
|
||||
* gncmod-gnome-utils.c
|
||||
* module definition/initialization for the gnome utilities
|
||||
*
|
||||
* Copyright (c) 2001 Linux Developers Group, Inc.
|
||||
* module definition/initialization for the gnome utilities
|
||||
*
|
||||
* Copyright (c) 2001 Linux Developers Group, Inc.
|
||||
*********************************************************************/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <glib.h>
|
||||
#include <gmodule.h>
|
||||
#include <libguile.h>
|
||||
|
||||
#include "gnc-module.h"
|
||||
@ -25,32 +24,26 @@
|
||||
#include "gnc-druid-provider-multifile-gnome.h"
|
||||
|
||||
/* version of the gnc module system interface we require */
|
||||
int libgncmod_gnome_utils_LTX_gnc_module_system_interface = 0;
|
||||
int gnc_module_system_interface = 0;
|
||||
|
||||
/* module versioning uses libtool semantics. */
|
||||
int libgncmod_gnome_utils_LTX_gnc_module_current = 0;
|
||||
int libgncmod_gnome_utils_LTX_gnc_module_revision = 0;
|
||||
int libgncmod_gnome_utils_LTX_gnc_module_age = 0;
|
||||
|
||||
/* forward references */
|
||||
char *libgncmod_gnome_utils_LTX_gnc_module_path(void);
|
||||
char *libgncmod_gnome_utils_LTX_gnc_module_description(void);
|
||||
int libgncmod_gnome_utils_LTX_gnc_module_init(int refcount);
|
||||
int libgncmod_gnome_utils_LTX_gnc_module_end(int refcount);
|
||||
int gnc_module_current = 0;
|
||||
int gnc_module_revision = 0;
|
||||
int gnc_module_age = 0;
|
||||
|
||||
|
||||
char *
|
||||
libgncmod_gnome_utils_LTX_gnc_module_path(void) {
|
||||
gnc_module_path(void) {
|
||||
return g_strdup("gnucash/gnome-utils");
|
||||
}
|
||||
|
||||
char *
|
||||
libgncmod_gnome_utils_LTX_gnc_module_description(void) {
|
||||
char *
|
||||
gnc_module_description(void) {
|
||||
return g_strdup("Utilities for using Gnome/Gtk with GnuCash");
|
||||
}
|
||||
|
||||
static void
|
||||
lmod(char * mn)
|
||||
lmod(char * mn)
|
||||
{
|
||||
char * form = g_strdup_printf("(use-modules %s)\n", mn);
|
||||
scm_c_eval_string(form);
|
||||
@ -60,7 +53,7 @@ lmod(char * mn)
|
||||
extern SCM scm_init_sw_gnome_utils_module(void);
|
||||
|
||||
int
|
||||
libgncmod_gnome_utils_LTX_gnc_module_init(int refcount) {
|
||||
gnc_module_init(int refcount) {
|
||||
/* load the engine (we depend on it) */
|
||||
if(!gnc_module_load("gnucash/engine", 0)) {
|
||||
return FALSE;
|
||||
@ -84,7 +77,7 @@ libgncmod_gnome_utils_LTX_gnc_module_init(int refcount) {
|
||||
scm_init_sw_gnome_utils_module();
|
||||
lmod("(sw_gnome_utils)");
|
||||
lmod("(gnucash gnome-utils)");
|
||||
|
||||
|
||||
/* Initialize the options-ui database */
|
||||
if (refcount == 0) {
|
||||
gnc_options_ui_initialize ();
|
||||
@ -101,7 +94,7 @@ libgncmod_gnome_utils_LTX_gnc_module_init(int refcount) {
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_gnome_utils_LTX_gnc_module_end(int refcount)
|
||||
gnc_module_end(int refcount)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -9,21 +9,18 @@ TESTS_GUI = test-gnc-recurrence test-gnc-dialog
|
||||
##lib_LTLIBRARIES = libgncgnome.la
|
||||
|
||||
GNC_TEST_DEPS := @GNC_TEST_SRFI_LOAD_CMD@ \
|
||||
--gnc-module-dir ${top_builddir}/src/core-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/gnc-module \
|
||||
--gnc-module-dir ${top_builddir}/src/network-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/engine \
|
||||
--gnc-module-dir ${top_builddir}/src/calculation \
|
||||
--gnc-module-dir ${top_builddir}/src/app-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/gnome-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/gnome \
|
||||
--gnc-module-dir ${top_builddir}/src/scm \
|
||||
--guile-load-dir ${top_srcdir}/src/scm \
|
||||
--guile-load-dir ${top_srcdir}/src/gnome \
|
||||
--guile-load-dir ${top_srcdir}/src/engine \
|
||||
--guile-load-dir ${top_srcdir}/src/app-utils \
|
||||
--guile-load-dir ${top_srcdir}/src/gnome-utils \
|
||||
--library-dir ${top_srcdir}/src/gnome
|
||||
--guile-load-dir ${top_builddir}/src/gnc-module \
|
||||
--guile-load-dir ${top_builddir}/src/engine \
|
||||
--library-dir ${top_builddir}/lib/libqof/qof \
|
||||
--library-dir ${top_builddir}/src/core-utils \
|
||||
--library-dir ${top_builddir}/src/gnc-module \
|
||||
--library-dir ${top_builddir}/src/engine \
|
||||
--library-dir ${top_builddir}/src/backend/file \
|
||||
--library-dir ${top_builddir}/src/network-utils \
|
||||
--library-dir ${top_builddir}/src/calculation \
|
||||
--library-dir ${top_builddir}/src/app-utils
|
||||
|
||||
TESTS_ENVIRONMENT := \
|
||||
$(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
|
||||
@ -53,12 +50,10 @@ test_gnc_dialog_LDADD = ${GNOME_LIBS} \
|
||||
test_link_module_SOURCES=test-link-module.c
|
||||
test_link_module_LDADD= \
|
||||
${GUILE_LIBS} \
|
||||
${top_builddir}/src/gnc-module/libgncmodule.la
|
||||
${top_builddir}/src/gnc-module/libgncmodule.la
|
||||
|
||||
EXTRA_DIST = \
|
||||
test-load-module
|
||||
|
||||
testit:
|
||||
libtool --mode execute gdb test-link-module
|
||||
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
SUBDIRS = . test
|
||||
PWD := $(shell pwd)
|
||||
|
||||
pkglib_LTLIBRARIES = libgncmod-binary-import.la
|
||||
|
||||
|
@ -1,13 +1,12 @@
|
||||
/*********************************************************************
|
||||
* gncmod-binary-import.c
|
||||
* module definition/initialization for importing gnucash binary files
|
||||
*
|
||||
* Copyright (c) 2001 Linux Developers Group, Inc.
|
||||
*
|
||||
* Copyright (c) 2001 Linux Developers Group, Inc.
|
||||
*********************************************************************/
|
||||
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include <glib.h>
|
||||
#include <gmodule.h>
|
||||
#include <libguile.h>
|
||||
|
||||
#include "gnc-hooks.h"
|
||||
@ -16,32 +15,26 @@
|
||||
#include "druid-commodity.h"
|
||||
|
||||
/* version of the gnc module system interface we require */
|
||||
int libgncmod_binary_import_LTX_gnc_module_system_interface = 0;
|
||||
int gnc_module_system_interface = 0;
|
||||
|
||||
/* module versioning uses libtool semantics. */
|
||||
int libgncmod_binary_import_LTX_gnc_module_current = 0;
|
||||
int libgncmod_binary_import_LTX_gnc_module_revision = 0;
|
||||
int libgncmod_binary_import_LTX_gnc_module_age = 0;
|
||||
|
||||
/* forward references */
|
||||
char *libgncmod_binary_import_LTX_gnc_module_path(void);
|
||||
char *libgncmod_binary_import_LTX_gnc_module_description(void);
|
||||
int libgncmod_binary_import_LTX_gnc_module_init(int refcount);
|
||||
int libgncmod_binary_import_LTX_gnc_module_end(int refcount);
|
||||
int gnc_module_current = 0;
|
||||
int gnc_module_revision = 0;
|
||||
int gnc_module_age = 0;
|
||||
|
||||
|
||||
char *
|
||||
libgncmod_binary_import_LTX_gnc_module_path(void) {
|
||||
gnc_module_path(void) {
|
||||
return g_strdup("gnucash/import-export/binary-import");
|
||||
}
|
||||
|
||||
char *
|
||||
libgncmod_binary_import_LTX_gnc_module_description(void) {
|
||||
char *
|
||||
gnc_module_description(void) {
|
||||
return g_strdup("Utilities importing GnuCash binary files");
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_binary_import_LTX_gnc_module_init(int refcount) {
|
||||
gnc_module_init(int refcount) {
|
||||
/* load the engine (we depend on it) */
|
||||
if(!gnc_module_load("gnucash/engine", 0)) {
|
||||
return FALSE;
|
||||
@ -64,6 +57,6 @@ libgncmod_binary_import_LTX_gnc_module_init(int refcount) {
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_binary_import_LTX_gnc_module_end(int refcount) {
|
||||
gnc_module_end(int refcount) {
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include <glib.h>
|
||||
#include <gmodule.h>
|
||||
#include <libguile.h>
|
||||
|
||||
#include "gnc-import-format-gnome.h"
|
||||
@ -14,34 +14,29 @@
|
||||
#include "gnc-module.h"
|
||||
#include "gnc-module-api.h"
|
||||
/* version of the gnc module system interface we require */
|
||||
int libgncmod_generic_import_LTX_gnc_module_system_interface = 0;
|
||||
int gnc_module_system_interface = 0;
|
||||
|
||||
/* module versioning uses libtool semantics. */
|
||||
int libgncmod_generic_import_LTX_gnc_module_current = 0;
|
||||
int libgncmod_generic_import_LTX_gnc_module_revision = 0;
|
||||
int libgncmod_generic_import_LTX_gnc_module_age = 0;
|
||||
int gnc_module_current = 0;
|
||||
int gnc_module_revision = 0;
|
||||
int gnc_module_age = 0;
|
||||
|
||||
/*static GNCModule engine; NOTUSED */
|
||||
|
||||
/* forward references */
|
||||
char *libgncmod_generic_import_LTX_gnc_module_path(void);
|
||||
char *libgncmod_generic_import_LTX_gnc_module_description(void);
|
||||
int libgncmod_generic_import_LTX_gnc_module_init(int refcount);
|
||||
int libgncmod_generic_import_LTX_gnc_module_end(int refcount);
|
||||
|
||||
|
||||
char *
|
||||
libgncmod_generic_import_LTX_gnc_module_path(void)
|
||||
gnc_module_path(void)
|
||||
{
|
||||
return g_strdup("gnucash/import-export");
|
||||
}
|
||||
|
||||
char *
|
||||
libgncmod_generic_import_LTX_gnc_module_description(void)
|
||||
gnc_module_description(void)
|
||||
{
|
||||
return g_strdup("Gnome GUI and C code for the generic import functions");
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_generic_import_LTX_gnc_module_init(int refcount)
|
||||
gnc_module_init(int refcount)
|
||||
{
|
||||
if(!gnc_module_load("gnucash/engine", 0))
|
||||
{
|
||||
@ -67,7 +62,7 @@ libgncmod_generic_import_LTX_gnc_module_init(int refcount)
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_generic_import_LTX_gnc_module_end(int refcount)
|
||||
gnc_module_end(int refcount)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -1,14 +1,13 @@
|
||||
/*********************************************************************
|
||||
* gncmod-hbci.c
|
||||
* module definition/initialization for HBCI support
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2002 Christian <stimming@tuhh.de>
|
||||
*********************************************************************/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <stdio.h>
|
||||
#include <gmodule.h>
|
||||
#include <libguile.h>
|
||||
|
||||
#include "gnc-module.h"
|
||||
@ -20,32 +19,27 @@
|
||||
#include "dialog-preferences.h"
|
||||
|
||||
/* version of the gnc module system interface we require */
|
||||
int libgncmod_hbci_LTX_gnc_module_system_interface = 0;
|
||||
int gnc_module_system_interface = 0;
|
||||
|
||||
/* module versioning uses libtool semantics. */
|
||||
int libgncmod_hbci_LTX_gnc_module_current = 0;
|
||||
int libgncmod_hbci_LTX_gnc_module_revision = 0;
|
||||
int libgncmod_hbci_LTX_gnc_module_age = 0;
|
||||
int gnc_module_current = 0;
|
||||
int gnc_module_revision = 0;
|
||||
int gnc_module_age = 0;
|
||||
|
||||
/* forward references */
|
||||
char *libgncmod_hbci_LTX_gnc_module_path(void);
|
||||
char *libgncmod_hbci_LTX_gnc_module_description(void);
|
||||
int libgncmod_hbci_LTX_gnc_module_init(int refcount);
|
||||
int libgncmod_hbci_LTX_gnc_module_end(int refcount);
|
||||
|
||||
char *
|
||||
libgncmod_hbci_LTX_gnc_module_path(void) {
|
||||
gnc_module_path(void) {
|
||||
return g_strdup("gnucash/import-export/hbci");
|
||||
}
|
||||
|
||||
char *
|
||||
libgncmod_hbci_LTX_gnc_module_description(void) {
|
||||
char *
|
||||
gnc_module_description(void) {
|
||||
return g_strdup("Support for HBCI protocol");
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
libgncmod_hbci_LTX_gnc_module_init(int refcount)
|
||||
gnc_module_init(int refcount)
|
||||
{
|
||||
/* load the engine (we depend on it) */
|
||||
if(!gnc_module_load("gnucash/engine", 0)) {
|
||||
@ -66,7 +60,7 @@ libgncmod_hbci_LTX_gnc_module_init(int refcount)
|
||||
|
||||
/* Add menu items with C callbacks */
|
||||
gnc_plugin_hbci_create_plugin();
|
||||
|
||||
|
||||
gnc_preferences_add_to_page("hbciprefs.glade", "hbci_prefs",
|
||||
"Online Banking");
|
||||
|
||||
@ -77,7 +71,7 @@ libgncmod_hbci_LTX_gnc_module_init(int refcount)
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_hbci_LTX_gnc_module_end(int refcount) {
|
||||
gnc_module_end(int refcount) {
|
||||
gnc_AB_BANKING_delete(0);
|
||||
|
||||
/* Finalize gwen library */
|
||||
|
@ -25,7 +25,7 @@
|
||||
*/
|
||||
#include "config.h"
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <gmodule.h>
|
||||
#include <libguile.h>
|
||||
|
||||
#include "gnc-log-replay.h"
|
||||
@ -34,35 +34,31 @@
|
||||
#include "gnc-plugin-log-replay.h"
|
||||
|
||||
/* version of the gnc module system interface we require */
|
||||
int libgncmod_log_replay_LTX_gnc_module_system_interface = 0;
|
||||
int gnc_module_system_interface = 0;
|
||||
|
||||
/* module versioning uses libtool semantics. */
|
||||
int libgncmod_log_replay_LTX_gnc_module_current = 0;
|
||||
int libgncmod_log_replay_LTX_gnc_module_revision = 0;
|
||||
int libgncmod_log_replay_LTX_gnc_module_age = 0;
|
||||
int gnc_module_current = 0;
|
||||
int gnc_module_revision = 0;
|
||||
int gnc_module_age = 0;
|
||||
|
||||
//static GNCModule bus_core;
|
||||
//static GNCModule file;
|
||||
|
||||
/* forward references */
|
||||
char *libgncmod_log_replay_LTX_gnc_module_path(void);
|
||||
char *libgncmod_log_replay_LTX_gnc_module_description(void);
|
||||
int libgncmod_log_replay_LTX_gnc_module_init(int refcount);
|
||||
int libgncmod_log_replay_LTX_gnc_module_end(int refcount);
|
||||
|
||||
|
||||
char *
|
||||
libgncmod_log_replay_LTX_gnc_module_path(void)
|
||||
gnc_module_path(void)
|
||||
{
|
||||
return g_strdup("gnucash/import-export/log-replay");
|
||||
}
|
||||
|
||||
char *
|
||||
libgncmod_log_replay_LTX_gnc_module_description(void)
|
||||
gnc_module_description(void)
|
||||
{
|
||||
return g_strdup("C code for log file replay");
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_log_replay_LTX_gnc_module_init(int refcount)
|
||||
gnc_module_init(int refcount)
|
||||
{
|
||||
if(!gnc_module_load("gnucash/engine", 0))
|
||||
{
|
||||
@ -88,7 +84,7 @@ libgncmod_log_replay_LTX_gnc_module_init(int refcount)
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_log_replay_LTX_gnc_module_end(int refcount)
|
||||
gnc_module_end(int refcount)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -25,7 +25,7 @@
|
||||
*/
|
||||
#include "config.h"
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <gmodule.h>
|
||||
|
||||
#include "gnc-ofx-import.h"
|
||||
#include "gnc-module.h"
|
||||
@ -33,35 +33,31 @@
|
||||
#include "gnc-plugin-ofx.h"
|
||||
|
||||
/* version of the gnc module system interface we require */
|
||||
int libgncmod_ofx_LTX_gnc_module_system_interface = 0;
|
||||
int gnc_module_system_interface = 0;
|
||||
|
||||
/* module versioning uses libtool semantics. */
|
||||
int libgncmod_ofx_LTX_gnc_module_current = 0;
|
||||
int libgncmod_ofx_LTX_gnc_module_revision = 0;
|
||||
int libgncmod_ofx_LTX_gnc_module_age = 0;
|
||||
int gnc_module_current = 0;
|
||||
int gnc_module_revision = 0;
|
||||
int gnc_module_age = 0;
|
||||
|
||||
//static GNCModule bus_core;
|
||||
//static GNCModule file;
|
||||
|
||||
/* forward references */
|
||||
char *libgncmod_ofx_LTX_gnc_module_path(void);
|
||||
char *libgncmod_ofx_LTX_gnc_module_description(void);
|
||||
int libgncmod_ofx_LTX_gnc_module_init(int refcount);
|
||||
int libgncmod_ofx_LTX_gnc_module_end(int refcount);
|
||||
|
||||
|
||||
char *
|
||||
libgncmod_ofx_LTX_gnc_module_path(void)
|
||||
gnc_module_path(void)
|
||||
{
|
||||
return g_strdup("gnucash/import-export/ofx");
|
||||
}
|
||||
|
||||
char *
|
||||
libgncmod_ofx_LTX_gnc_module_description(void)
|
||||
gnc_module_description(void)
|
||||
{
|
||||
return g_strdup("Gnome GUI and C code for OFX importer using libofx");
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_ofx_LTX_gnc_module_init(int refcount)
|
||||
gnc_module_init(int refcount)
|
||||
{
|
||||
if(!gnc_module_load("gnucash/engine", 0))
|
||||
{
|
||||
@ -82,12 +78,12 @@ libgncmod_ofx_LTX_gnc_module_init(int refcount)
|
||||
|
||||
/* Add menu items with C callbacks */
|
||||
gnc_plugin_ofx_create_plugin();
|
||||
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_ofx_LTX_gnc_module_end(int refcount)
|
||||
gnc_module_end(int refcount)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -1,12 +1,12 @@
|
||||
/*********************************************************************
|
||||
* gncmod-qif-import.c
|
||||
* module definition/initialization for old QIF importer (deprecated)
|
||||
*
|
||||
* Copyright (c) 2001 Linux Developers Group, Inc.
|
||||
*
|
||||
* Copyright (c) 2001 Linux Developers Group, Inc.
|
||||
*********************************************************************/
|
||||
|
||||
#include "config.h"
|
||||
#include <glib.h>
|
||||
#include <gmodule.h>
|
||||
#include <libguile.h>
|
||||
|
||||
#include "gnc-module.h"
|
||||
@ -17,46 +17,40 @@
|
||||
#include "gnc-plugin-qif-import.h"
|
||||
|
||||
/* version of the gnc module system interface we require */
|
||||
int libgncmod_qif_import_LTX_gnc_module_system_interface = 0;
|
||||
int gnc_module_system_interface = 0;
|
||||
|
||||
/* module versioning uses libtool semantics. */
|
||||
int libgncmod_qif_import_LTX_gnc_module_current = 0;
|
||||
int libgncmod_qif_import_LTX_gnc_module_revision = 0;
|
||||
int libgncmod_qif_import_LTX_gnc_module_age = 0;
|
||||
|
||||
/* forward references */
|
||||
char *libgncmod_qif_import_LTX_gnc_module_path(void);
|
||||
char *libgncmod_qif_import_LTX_gnc_module_description(void);
|
||||
int libgncmod_qif_import_LTX_gnc_module_init(int refcount);
|
||||
int libgncmod_qif_import_LTX_gnc_module_end(int refcount);
|
||||
int gnc_module_current = 0;
|
||||
int gnc_module_revision = 0;
|
||||
int gnc_module_age = 0;
|
||||
|
||||
|
||||
char *
|
||||
libgncmod_qif_import_LTX_gnc_module_path(void)
|
||||
gnc_module_path(void)
|
||||
{
|
||||
return g_strdup("gnucash/import-export/qif-import");
|
||||
}
|
||||
|
||||
char *
|
||||
libgncmod_qif_import_LTX_gnc_module_description(void)
|
||||
char *
|
||||
gnc_module_description(void)
|
||||
{
|
||||
return g_strdup("Gnome GUI and Scheme code for QIF importer");
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_qif_import_LTX_gnc_module_init(int refcount)
|
||||
gnc_module_init(int refcount)
|
||||
{
|
||||
if(!gnc_module_load("gnucash/engine", 0))
|
||||
if(!gnc_module_load("gnucash/engine", 0))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if(!gnc_module_load("gnucash/app-utils", 0))
|
||||
if(!gnc_module_load("gnucash/app-utils", 0))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if(!gnc_module_load("gnucash/gnome-utils", 0))
|
||||
if(!gnc_module_load("gnucash/gnome-utils", 0))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@ -78,7 +72,7 @@ libgncmod_qif_import_LTX_gnc_module_init(int refcount)
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_qif_import_LTX_gnc_module_end(int refcount)
|
||||
gnc_module_end(int refcount)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -1,44 +1,37 @@
|
||||
/*********************************************************************
|
||||
* gnc-mod-qifiocore.c
|
||||
* module definition/initialization for the QIF i/o module
|
||||
*
|
||||
* Copyright (c) 2001 Linux Developers Group, Inc.
|
||||
*
|
||||
* Copyright (c) 2001 Linux Developers Group, Inc.
|
||||
*********************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <gmodule.h>
|
||||
#include <libguile.h>
|
||||
#include <glib.h>
|
||||
|
||||
#include "gnc-module.h"
|
||||
#include "gnc-module-api.h"
|
||||
|
||||
/* version of the gnc module system interface we require */
|
||||
int libgncmod_qifiocore_LTX_gnc_module_system_interface = 0;
|
||||
int gnc_module_system_interface = 0;
|
||||
|
||||
/* module versioning uses libtool semantics. */
|
||||
int libgncmod_qifiocore_LTX_gnc_module_current = 0;
|
||||
int libgncmod_qifiocore_LTX_gnc_module_revision = 0;
|
||||
int libgncmod_qifiocore_LTX_gnc_module_age = 0;
|
||||
|
||||
/* forward references */
|
||||
char *libgncmod_qifiocore_LTX_gnc_module_path(void);
|
||||
char *libgncmod_qifiocore_LTX_gnc_module_description(void);
|
||||
int libgncmod_qifiocore_LTX_gnc_module_init(int refcount);
|
||||
int libgncmod_qifiocore_LTX_gnc_module_end(int refcount);
|
||||
int gnc_module_current = 0;
|
||||
int gnc_module_revision = 0;
|
||||
int gnc_module_age = 0;
|
||||
|
||||
|
||||
char *
|
||||
libgncmod_qifiocore_LTX_gnc_module_path(void) {
|
||||
gnc_module_path(void) {
|
||||
return g_strdup("gnucash/qif-io/core");
|
||||
}
|
||||
|
||||
char *
|
||||
libgncmod_qifiocore_LTX_gnc_module_description(void) {
|
||||
char *
|
||||
gnc_module_description(void) {
|
||||
return g_strdup("Core components of QIF import/export (non-GUI)");
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_qifiocore_LTX_gnc_module_init(int refcount) {
|
||||
gnc_module_init(int refcount) {
|
||||
/* load the engine (we depend on it) */
|
||||
if(!gnc_module_load("gnucash/engine", 0)) {
|
||||
return FALSE;
|
||||
@ -59,6 +52,6 @@ libgncmod_qifiocore_LTX_gnc_module_init(int refcount) {
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_qifiocore_LTX_gnc_module_end(int refcount) {
|
||||
gnc_module_end(int refcount) {
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
LDADD=${top_builddir}/src/gnc-module/libgncmodule.la ${GLIB_LIBS} -lltdl
|
||||
LDADD=${top_builddir}/src/gnc-module/libgncmodule.la ${GLIB_LIBS}
|
||||
|
||||
AM_CFLAGS = -I${top_srcdir}/src/gnc-module ${GUILE_INCS} ${GLIB_CFLAGS}
|
||||
|
||||
|
@ -7,7 +7,7 @@ AM_CFLAGS = \
|
||||
-I${top_srcdir}/src/import-export \
|
||||
${GUILE_INCS} \
|
||||
${QOF_CFLAGS} \
|
||||
${GLIB_CFLAGS}
|
||||
${GLIB_CFLAGS}
|
||||
|
||||
LDADD = \
|
||||
${top_builddir}/src/gnc-module/libgncmodule.la \
|
||||
@ -22,24 +22,19 @@ TESTS = \
|
||||
test-import-parse
|
||||
|
||||
GNC_TEST_DEPS := @GNC_TEST_SRFI_LOAD_CMD@ \
|
||||
--gnc-module-dir ${top_builddir}/src/core-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/gnc-module \
|
||||
--gnc-module-dir ${top_builddir}/src/engine \
|
||||
--gnc-module-dir ${top_builddir}/src/app-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/import-export \
|
||||
--gnc-module-dir ${top_builddir}/src/calculation \
|
||||
--gnc-module-dir ${top_builddir}/src/gnome-utils \
|
||||
--gnc-module-dir ${top_srcdir}/src/gnc-module \
|
||||
--gnc-module-dir ${top_srcdir}/src/engine \
|
||||
--gnc-module-dir ${top_srcdir}/src/app-utils \
|
||||
--gnc-module-dir ${top_srcdir}/src/gnome-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/gnome-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/network-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/gnome \
|
||||
--guile-load-dir ${top_builddir}/src/engine \
|
||||
--library-dir ${top_builddir}/lib/libqof/qof \
|
||||
--guile-load-dir ${top_builddir}/src/scm \
|
||||
--guile-load-dir ${top_srcdir}/src/scm \
|
||||
--guile-load-dir ${top_srcdir}/src/import-export
|
||||
--library-dir ${top_builddir}/src/core-utils \
|
||||
--library-dir ${top_builddir}/src/gnc-module \
|
||||
--library-dir ${top_builddir}/src/engine \
|
||||
--library-dir ${top_builddir}/src/backend/file \
|
||||
--library-dir ${top_builddir}/src/network-utils \
|
||||
--library-dir ${top_builddir}/src/calculation \
|
||||
--library-dir ${top_builddir}/src/app-utils \
|
||||
--library-dir ${top_builddir}/src/gnome-utils \
|
||||
--library-dir ${top_builddir}/src/import-export
|
||||
|
||||
TESTS_ENVIRONMENT := \
|
||||
$(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
|
||||
|
@ -1,48 +1,41 @@
|
||||
/*********************************************************************
|
||||
* gncmod-netword-utils.c
|
||||
* module definition/initialization for network communication utilities
|
||||
*
|
||||
* Copyright (c) 2001 Linux Developers Group, Inc.
|
||||
*
|
||||
* Copyright (c) 2001 Linux Developers Group, Inc.
|
||||
*********************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <gmodule.h>
|
||||
#include <libguile.h>
|
||||
#include <glib.h>
|
||||
|
||||
#include "gnc-module.h"
|
||||
#include "gnc-module-api.h"
|
||||
|
||||
/* version of the gnc module system interface we require */
|
||||
int libgncmod_network_utils_LTX_gnc_module_system_interface = 0;
|
||||
int gnc_module_system_interface = 0;
|
||||
|
||||
/* module versioning uses libtool semantics. */
|
||||
int libgncmod_network_utils_LTX_gnc_module_current = 0;
|
||||
int libgncmod_network_utils_LTX_gnc_module_revision = 0;
|
||||
int libgncmod_network_utils_LTX_gnc_module_age = 0;
|
||||
|
||||
/* forward references */
|
||||
char *libgncmod_network_utils_LTX_gnc_module_path(void);
|
||||
char *libgncmod_network_utils_LTX_gnc_module_description(void);
|
||||
int libgncmod_network_utils_LTX_gnc_module_init(int refcount);
|
||||
int libgncmod_network_utils_LTX_gnc_module_end(int refcount);
|
||||
int gnc_module_current = 0;
|
||||
int gnc_module_revision = 0;
|
||||
int gnc_module_age = 0;
|
||||
|
||||
|
||||
char *
|
||||
libgncmod_network_utils_LTX_gnc_module_path(void) {
|
||||
gnc_module_path(void) {
|
||||
return g_strdup("gnucash/network-utils");
|
||||
}
|
||||
|
||||
char *
|
||||
libgncmod_network_utils_LTX_gnc_module_description(void) {
|
||||
char *
|
||||
gnc_module_description(void) {
|
||||
return g_strdup("Utilities for performing network communication");
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_network_utils_LTX_gnc_module_init(int refcount) {
|
||||
gnc_module_init(int refcount) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_network_utils_LTX_gnc_module_end(int refcount) {
|
||||
gnc_module_end(int refcount) {
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -7,10 +7,11 @@ TESTS = \
|
||||
test-load-module
|
||||
|
||||
GNC_TEST_DEPS := \
|
||||
--gnc-module-dir ${top_builddir}/src/core-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/gnc-module \
|
||||
--gnc-module-dir ${top_builddir}/src/network-utils \
|
||||
--guile-load-dir ${top_builddir}/src/gnc-module \
|
||||
--library-dir ${top_builddir}/lib/libqof/qof \
|
||||
--gnc-module-dir ${top_builddir}/src/network-utils
|
||||
--library-dir ${top_builddir}/src/core-utils \
|
||||
--library-dir ${top_builddir}/src/gnc-module
|
||||
|
||||
TESTS_ENVIRONMENT := \
|
||||
$(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
|
||||
|
@ -1,52 +1,47 @@
|
||||
/*********************************************************************
|
||||
* gncmod-ledgercore.c
|
||||
* module definition/initialization for core (gui-independent) ledger
|
||||
*
|
||||
* Copyright (c) 2001 Linux Developers Group, Inc.
|
||||
*
|
||||
* Copyright (c) 2001 Linux Developers Group, Inc.
|
||||
*********************************************************************/
|
||||
|
||||
#include <glib.h>
|
||||
#include <gmodule.h>
|
||||
|
||||
#include "gnc-module.h"
|
||||
#include "gnc-module-api.h"
|
||||
|
||||
/* version of the gnc module system interface we require */
|
||||
int libgncmod_ledger_core_LTX_gnc_module_system_interface = 0;
|
||||
int gnc_module_system_interface = 0;
|
||||
|
||||
/* module versioning uses libtool semantics. */
|
||||
int libgncmod_ledger_core_LTX_gnc_module_current = 0;
|
||||
int libgncmod_ledger_core_LTX_gnc_module_revision = 0;
|
||||
int libgncmod_ledger_core_LTX_gnc_module_age = 0;
|
||||
|
||||
/* forward references */
|
||||
char *libgncmod_ledger_core_LTX_gnc_module_path(void);
|
||||
char *libgncmod_ledger_core_LTX_gnc_module_description(void);
|
||||
int libgncmod_ledger_core_LTX_gnc_module_init(int refcount);
|
||||
int gnc_module_current = 0;
|
||||
int gnc_module_revision = 0;
|
||||
int gnc_module_age = 0;
|
||||
|
||||
|
||||
char *
|
||||
libgncmod_ledger_core_LTX_gnc_module_path(void) {
|
||||
gnc_module_path(void) {
|
||||
return g_strdup("gnucash/register/ledger-core");
|
||||
}
|
||||
|
||||
char *
|
||||
libgncmod_ledger_core_LTX_gnc_module_description(void) {
|
||||
char *
|
||||
gnc_module_description(void) {
|
||||
return g_strdup("Toolkit-independent GUI for financial ledgers");
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_ledger_core_LTX_gnc_module_init(int refcount) {
|
||||
if(!gnc_module_load("gnucash/engine", 0))
|
||||
gnc_module_init(int refcount) {
|
||||
if(!gnc_module_load("gnucash/engine", 0))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if(!gnc_module_load("gnucash/register/register-core", 0))
|
||||
if(!gnc_module_load("gnucash/register/register-core", 0))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if(!gnc_module_load("gnucash/app-utils", 0))
|
||||
if(!gnc_module_load("gnucash/app-utils", 0))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -1,5 +1,4 @@
|
||||
SUBDIRS = . test
|
||||
PWD := $(shell pwd)
|
||||
|
||||
pkglib_LTLIBRARIES = libgncmod-register-core.la
|
||||
|
||||
|
@ -1,52 +1,47 @@
|
||||
/*********************************************************************
|
||||
* gncmod-registercore.c
|
||||
* module definition/initialization for core (gui-independent) register
|
||||
*
|
||||
* Copyright (c) 2001 Linux Developers Group, Inc.
|
||||
*
|
||||
* Copyright (c) 2001 Linux Developers Group, Inc.
|
||||
*********************************************************************/
|
||||
|
||||
#include "config.h"
|
||||
#include <glib.h>
|
||||
#include <gmodule.h>
|
||||
#include <libguile.h>
|
||||
|
||||
#include "gnc-module.h"
|
||||
#include "gnc-module-api.h"
|
||||
|
||||
/* version of the gnc module system interface we require */
|
||||
int libgncmod_register_core_LTX_gnc_module_system_interface = 0;
|
||||
int gnc_module_system_interface = 0;
|
||||
|
||||
/* module versioning uses libtool semantics. */
|
||||
int libgncmod_register_core_LTX_gnc_module_current = 0;
|
||||
int libgncmod_register_core_LTX_gnc_module_revision = 0;
|
||||
int libgncmod_register_core_LTX_gnc_module_age = 0;
|
||||
|
||||
/* forward references */
|
||||
char *libgncmod_register_core_LTX_gnc_module_path(void);
|
||||
char *libgncmod_register_core_LTX_gnc_module_description(void);
|
||||
int libgncmod_register_core_LTX_gnc_module_init(int refcount);
|
||||
int gnc_module_current = 0;
|
||||
int gnc_module_revision = 0;
|
||||
int gnc_module_age = 0;
|
||||
|
||||
|
||||
char *
|
||||
libgncmod_register_core_LTX_gnc_module_path(void) {
|
||||
gnc_module_path(void) {
|
||||
return g_strdup("gnucash/register/register-core");
|
||||
}
|
||||
|
||||
char *
|
||||
libgncmod_register_core_LTX_gnc_module_description(void) {
|
||||
char *
|
||||
gnc_module_description(void) {
|
||||
return g_strdup("Toolkit-independent GUI for ledger-like table displays");
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_register_core_LTX_gnc_module_init(int refcount)
|
||||
gnc_module_init(int refcount)
|
||||
{
|
||||
if(!gnc_module_load("gnucash/engine", 0))
|
||||
if(!gnc_module_load("gnucash/engine", 0))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* FIXME. We need this for the wide-character functions.
|
||||
* When fixing, get rid of gnome-utils includes, too. */
|
||||
if(!gnc_module_load("gnucash/gnome-utils", 0))
|
||||
if(!gnc_module_load("gnucash/gnome-utils", 0))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -2,11 +2,11 @@ TESTS = \
|
||||
test-link-module
|
||||
# test-load-module
|
||||
|
||||
TESTS_ENVIRONMENT= \
|
||||
GNC_MODULE_PATH=../../engine:../../gnc-module:../../calculation:.. \
|
||||
GUILE_LOAD_PATH=../../engine:..:../../gnc-module:${top_srcdir}/lib \
|
||||
LTDL_LIBRARY_PATH=.. \
|
||||
LD_LIBRARY_PATH=${top_builddir}/src/gnc-module:${top_builddir}/src/gnc-module/.libs:${top_builddir}/src/engine:${top_builddir}/src/engine/.libs:${top_builddir}/src/calculation:${top_builddir}/src/calculation/.libs:${top_builddir}/src/network-utils:${top_builddir}/src/network-utils/.libs
|
||||
#GNC_TEST_DEPS := \
|
||||
#
|
||||
|
||||
#TESTS_ENVIRONMENT := \
|
||||
# $(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
|
||||
|
||||
check_PROGRAMS = \
|
||||
test-link-module
|
||||
|
@ -1,13 +1,13 @@
|
||||
/*********************************************************************
|
||||
* gncmod-register-gnome.c
|
||||
* module definition/initialization for Gnome parts of register
|
||||
*
|
||||
* Copyright (c) 2001 Linux Developers Group, Inc.
|
||||
*
|
||||
* Copyright (c) 2001 Linux Developers Group, Inc.
|
||||
*********************************************************************/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <glib.h>
|
||||
#include <gmodule.h>
|
||||
|
||||
#include "combocell.h"
|
||||
#include "datecell.h"
|
||||
@ -20,31 +20,26 @@
|
||||
#include "table-gnome.h"
|
||||
|
||||
/* version of the gnc module system interface we require */
|
||||
int libgncmod_register_gnome_LTX_gnc_module_system_interface = 0;
|
||||
int gnc_module_system_interface = 0;
|
||||
|
||||
/* module versioning uses libtool semantics. */
|
||||
int libgncmod_register_gnome_LTX_gnc_module_current = 0;
|
||||
int libgncmod_register_gnome_LTX_gnc_module_revision = 0;
|
||||
int libgncmod_register_gnome_LTX_gnc_module_age = 0;
|
||||
|
||||
/* forward references */
|
||||
char *libgncmod_register_gnome_LTX_gnc_module_path(void);
|
||||
char *libgncmod_register_gnome_LTX_gnc_module_description(void);
|
||||
int libgncmod_register_gnome_LTX_gnc_module_init(int refcount);
|
||||
int gnc_module_current = 0;
|
||||
int gnc_module_revision = 0;
|
||||
int gnc_module_age = 0;
|
||||
|
||||
|
||||
char *
|
||||
libgncmod_register_gnome_LTX_gnc_module_path(void) {
|
||||
gnc_module_path(void) {
|
||||
return g_strdup("gnucash/register/register-gnome");
|
||||
}
|
||||
|
||||
char *
|
||||
libgncmod_register_gnome_LTX_gnc_module_description(void) {
|
||||
char *
|
||||
gnc_module_description(void) {
|
||||
return g_strdup("Gnome GUI for ledger-like table displays");
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_register_gnome_LTX_gnc_module_init(int refcount) {
|
||||
gnc_module_init(int refcount) {
|
||||
if(!gnc_module_load("gnucash/register/register-core", 0)) {
|
||||
return FALSE;
|
||||
}
|
||||
@ -53,7 +48,7 @@ libgncmod_register_gnome_LTX_gnc_module_init(int refcount) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (refcount == 0)
|
||||
if (refcount == 0)
|
||||
{
|
||||
gnc_register_add_cell_type (COMBO_CELL_TYPE_NAME, gnc_combo_cell_new);
|
||||
|
||||
|
@ -2,11 +2,11 @@ TESTS = \
|
||||
test-link-module
|
||||
# test-load-module
|
||||
|
||||
TESTS_ENVIRONMENT= \
|
||||
GNC_MODULE_PATH=../../engine:../../gnc-module:../../calculation:.. \
|
||||
GUILE_LOAD_PATH=../../engine:..:../../gnc-module:${top_srcdir}/lib \
|
||||
LTDL_LIBRARY_PATH=.. \
|
||||
LD_LIBRARY_PATH=${top_builddir}/src/gnc-module:${top_builddir}/src/gnc-module/.libs:${top_builddir}/src/engine:${top_builddir}/src/engine/.libs:${top_builddir}/src/calculation:${top_builddir}/src/calculation/.libs:${top_builddir}/src/network-utils:${top_builddir}/src/network-utils/.libs
|
||||
#GNC_TEST_DEPS := \
|
||||
#
|
||||
|
||||
#TESTS_ENVIRONMENT := \
|
||||
# $(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
|
||||
|
||||
check_PROGRAMS = \
|
||||
test-link-module
|
||||
@ -15,9 +15,8 @@ test_link_module_SOURCES = test-link-module.c
|
||||
test_link_module_LDADD = \
|
||||
${top_builddir}/src/engine/libgncmod-engine.la \
|
||||
${top_builddir}/src/app-utils/libgncmod-app-utils.la \
|
||||
../libgncmod-register-gnome.la
|
||||
../libgncmod-register-gnome.la
|
||||
|
||||
#EXTRA_DIST = test-load-module
|
||||
|
||||
AM_CFLAGS = -I${top_srcdir}/src/test-core -I.. ${GLIB_CFLAGS}
|
||||
|
||||
AM_CFLAGS = -I${top_srcdir}/src/test-core -I.. ${GLIB_CFLAGS}
|
||||
|
@ -1,37 +1,28 @@
|
||||
/*********************************************************************
|
||||
* gncmod-locale-reports-us.c
|
||||
* module definition/initialization for the US reports
|
||||
*
|
||||
* Copyright (c) 2001 Linux Developers Group, Inc.
|
||||
*
|
||||
* Copyright (c) 2001 Linux Developers Group, Inc.
|
||||
*********************************************************************/
|
||||
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include <gmodule.h>
|
||||
#include <libguile.h>
|
||||
#include <glib.h>
|
||||
#include <locale.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "gnc-module.h"
|
||||
#include "gnc-module-api.h"
|
||||
|
||||
/* version of the gnc module system interface we require */
|
||||
int libgncmod_locale_reports_us_LTX_gnc_module_system_interface = 0;
|
||||
int gnc_module_system_interface = 0;
|
||||
|
||||
/* module versioning uses libtool semantics. */
|
||||
int libgncmod_locale_reports_us_LTX_gnc_module_current = 0;
|
||||
int libgncmod_locale_reports_us_LTX_gnc_module_revision = 0;
|
||||
int libgncmod_locale_reports_us_LTX_gnc_module_age = 0;
|
||||
|
||||
/* forward references */
|
||||
char *libgncmod_locale_reports_us_LTX_gnc_module_path(void);
|
||||
char *libgncmod_locale_reports_us_LTX_gnc_module_description(void);
|
||||
int libgncmod_locale_reports_us_LTX_gnc_module_init(int refcount);
|
||||
int libgncmod_locale_reports_us_LTX_gnc_module_end(int refcount);
|
||||
int gnc_module_current = 0;
|
||||
int gnc_module_revision = 0;
|
||||
int gnc_module_age = 0;
|
||||
|
||||
|
||||
char *
|
||||
libgncmod_locale_reports_us_LTX_gnc_module_path(void) {
|
||||
gnc_module_path(void) {
|
||||
/* const char *thislocale = setlocale(LC_ALL, NULL);
|
||||
if (strncmp(thislocale, "de_DE", 5) == 0)
|
||||
return g_strdup("gnucash/report/locale-specific/de_DE");
|
||||
@ -39,13 +30,13 @@ libgncmod_locale_reports_us_LTX_gnc_module_path(void) {
|
||||
return g_strdup("gnucash/report/locale-specific/us");
|
||||
}
|
||||
|
||||
char *
|
||||
libgncmod_locale_reports_us_LTX_gnc_module_description(void) {
|
||||
char *
|
||||
gnc_module_description(void) {
|
||||
return g_strdup("US income tax reports and related material");
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_locale_reports_us_LTX_gnc_module_init(int refcount) {
|
||||
gnc_module_init(int refcount) {
|
||||
/* load the tax info */
|
||||
#ifdef LOCALE_SPECIFIC_TAX
|
||||
const char *thislocale = setlocale(LC_ALL, NULL);
|
||||
@ -56,10 +47,10 @@ libgncmod_locale_reports_us_LTX_gnc_module_init(int refcount) {
|
||||
#else
|
||||
gboolean is_de_DE = FALSE;
|
||||
#endif /* LOCALE_SPECIFIC_TAX */
|
||||
const char *tax_module = is_de_DE ?
|
||||
"gnucash/tax/de_DE" :
|
||||
const char *tax_module = is_de_DE ?
|
||||
"gnucash/tax/de_DE" :
|
||||
"gnucash/tax/us";
|
||||
const char *report_taxtxf = is_de_DE ?
|
||||
const char *report_taxtxf = is_de_DE ?
|
||||
"(use-modules (gnucash report taxtxf-de_DE))" :
|
||||
"(use-modules (gnucash report taxtxf))";
|
||||
const char *report_locale = is_de_DE ?
|
||||
@ -78,14 +69,14 @@ libgncmod_locale_reports_us_LTX_gnc_module_init(int refcount) {
|
||||
}
|
||||
|
||||
/* load the report generation scheme code */
|
||||
if(scm_c_eval_string(report_taxtxf)
|
||||
if(scm_c_eval_string(report_taxtxf)
|
||||
== SCM_BOOL_F) {
|
||||
printf("failed to load %s\n", report_taxtxf);
|
||||
g_warning("failed to load %s\n", report_taxtxf);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Load the module scheme code */
|
||||
if(scm_c_eval_string(report_locale)
|
||||
if(scm_c_eval_string(report_locale)
|
||||
== SCM_BOOL_F) {
|
||||
return FALSE;
|
||||
}
|
||||
@ -94,6 +85,6 @@ libgncmod_locale_reports_us_LTX_gnc_module_init(int refcount) {
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_locale_reports_us_LTX_gnc_module_end(int refcount) {
|
||||
gnc_module_end(int refcount) {
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -1,29 +1,19 @@
|
||||
TESTS = test-load-module test-link-module
|
||||
TESTS = test-load-module test-link-module
|
||||
|
||||
GNC_TEST_DEPS := @GNC_TEST_SRFI_LOAD_CMD@ \
|
||||
--gnc-module-dir ${top_builddir}/src/core-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/gnc-module \
|
||||
--gnc-module-dir ${top_builddir}/src/engine \
|
||||
--gnc-module-dir ${top_builddir}/src/calculation \
|
||||
--gnc-module-dir ${top_builddir}/src/app-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/tax/us \
|
||||
--gnc-module-dir ${top_builddir}/src/report/report-system \
|
||||
--gnc-module-dir ${top_builddir}/src/report/locale-specific/us \
|
||||
--gnc-module-dir ${top_builddir}/src/gnome-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/gnome \
|
||||
--gnc-module-dir ${top_builddir}/src/scm \
|
||||
--gnc-module-dir ${top_srcdir}/src/gnc-module \
|
||||
--gnc-module-dir ${top_srcdir}/src/engine \
|
||||
--gnc-module-dir ${top_builddir}/src/network-utils \
|
||||
--guile-load-dir ${top_srcdir}/src/scm \
|
||||
--guile-load-dir ${top_srcdir}/src/tax/us \
|
||||
--guile-load-dir ${top_srcdir}/src/report/report-system \
|
||||
--guile-load-dir ${top_srcdir}/src/app-utils \
|
||||
--guile-load-dir ${top_srcdir}/src/gnome-utils \
|
||||
--guile-load-dir ${top_srcdir}/src/gnome \
|
||||
--library-dir ${top_srcdir}/src/gnome-utils \
|
||||
--guile-load-dir ${top_builddir}/src/gnc-module \
|
||||
--guile-load-dir ${top_builddir}/src/engine \
|
||||
--guile-load-dir ${top_builddir}/src/tax/us \
|
||||
--library-dir ${top_builddir}/lib/libqof/qof \
|
||||
--library-dir ${top_srcdir}/src/gnome
|
||||
--library-dir ${top_builddir}/src/core-utils \
|
||||
--library-dir ${top_builddir}/src/gnc-module \
|
||||
--library-dir ${top_builddir}/src/engine \
|
||||
--library-dir ${top_builddir}/src/calculation \
|
||||
--library-dir ${top_builddir}/src/app-utils
|
||||
|
||||
TESTS_ENVIRONMENT := \
|
||||
$(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
|
||||
|
@ -1,7 +1,4 @@
|
||||
SUBDIRS = .
|
||||
# test -- removed 'test' from SUBDIRS by jsled 2004.05.02 .. I don't know how
|
||||
# to get the test-link-mumble to link correctly; plz assist.
|
||||
PWD := $(shell pwd)
|
||||
SUBDIRS = . test
|
||||
|
||||
pkglib_LTLIBRARIES = libgncmod-report-gnome.la
|
||||
|
||||
|
@ -1,16 +1,16 @@
|
||||
/*********************************************************************
|
||||
* gncmod-report-gnome.c
|
||||
* module definition/initialization for the gnome report infrastructure
|
||||
*
|
||||
* Copyright (c) 2001 Linux Developers Group, Inc.
|
||||
* module definition/initialization for the gnome report infrastructure
|
||||
*
|
||||
* Copyright (c) 2001 Linux Developers Group, Inc.
|
||||
*********************************************************************/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <gmodule.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include <stdio.h>
|
||||
#include <libguile.h>
|
||||
|
||||
#include "gnc-module.h"
|
||||
@ -19,28 +19,22 @@
|
||||
#include "window-report.h"
|
||||
|
||||
/* version of the gnc module system interface we require */
|
||||
int libgncmod_report_gnome_LTX_gnc_module_system_interface = 0;
|
||||
int gnc_module_system_interface = 0;
|
||||
|
||||
/* module versioning uses libtool semantics. */
|
||||
int libgncmod_report_gnome_LTX_gnc_module_current = 0;
|
||||
int libgncmod_report_gnome_LTX_gnc_module_revision = 0;
|
||||
int libgncmod_report_gnome_LTX_gnc_module_age = 0;
|
||||
|
||||
/* forward references */
|
||||
char *libgncmod_report_gnome_LTX_gnc_module_path(void);
|
||||
char *libgncmod_report_gnome_LTX_gnc_module_description(void);
|
||||
int libgncmod_report_gnome_LTX_gnc_module_init(int refcount);
|
||||
int libgncmod_report_gnome_LTX_gnc_module_end(int refcount);
|
||||
int gnc_module_current = 0;
|
||||
int gnc_module_revision = 0;
|
||||
int gnc_module_age = 0;
|
||||
|
||||
|
||||
char *
|
||||
libgncmod_report_gnome_LTX_gnc_module_path(void)
|
||||
gnc_module_path(void)
|
||||
{
|
||||
return g_strdup("gnucash/report/report-gnome");
|
||||
}
|
||||
|
||||
char *
|
||||
libgncmod_report_gnome_LTX_gnc_module_description(void)
|
||||
char *
|
||||
gnc_module_description(void)
|
||||
{
|
||||
return g_strdup("Gnome component of GnuCash report generation system");
|
||||
}
|
||||
@ -55,7 +49,7 @@ lmod(char * mn)
|
||||
extern SCM scm_init_sw_report_gnome_module(void);
|
||||
|
||||
int
|
||||
libgncmod_report_gnome_LTX_gnc_module_init(int refcount)
|
||||
gnc_module_init(int refcount)
|
||||
{
|
||||
if(!gnc_module_load("gnucash/app-utils", 0)) {
|
||||
return FALSE;
|
||||
@ -80,7 +74,7 @@ libgncmod_report_gnome_LTX_gnc_module_init(int refcount)
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_report_gnome_LTX_gnc_module_end(int refcount)
|
||||
gnc_module_end(int refcount)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -1,33 +1,29 @@
|
||||
TESTS = \
|
||||
test-link-module \
|
||||
test-load-module
|
||||
test-load-module
|
||||
|
||||
GNC_TEST_DEPS := @GNC_TEST_SRFI_LOAD_CMD@ \
|
||||
--gnc-module-dir ${top_builddir}/src/gnc-module \
|
||||
--gnc-module-dir ${top_builddir}/src/network-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/scm \
|
||||
--gnc-module-dir ${top_builddir}/src/engine \
|
||||
--gnc-module-dir ${top_builddir}/src/calculation \
|
||||
--gnc-module-dir ${top_builddir}/src/app-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/gnome \
|
||||
--gnc-module-dir ${top_builddir}/src/gnome-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/report/report-system \
|
||||
--gnc-module-dir ${top_builddir}/src/report/report-gnome \
|
||||
--gnc-module-dir ${top_srcdir}/src/gnc-module \
|
||||
--gnc-module-dir ${top_srcdir}/src/engine \
|
||||
--guile-load-dir ${top_srcdir}/src/scm \
|
||||
--guile-load-dir ${top_srcdir}/src/app-utils \
|
||||
--guile-load-dir ${top_srcdir}/src/report/report-system \
|
||||
--guile-load-dir ${top_srcdir}/src/gnome-utils \
|
||||
--guile-load-dir ${top_srcdir}/src/gnome \
|
||||
--library-dir ${top_srcdir}/src/gnome-utils \
|
||||
--library-dir ${top_srcdir}/src/gnome
|
||||
--guile-load-dir ${top_builddir}/src/gnc-module \
|
||||
--guile-load-dir ${top_builddir}/src/engine \
|
||||
--library-dir ${top_builddir}/lib/libqof/qof \
|
||||
--library-dir ${top_builddir}/src/core-utils \
|
||||
--library-dir ${top_builddir}/src/gnc-module \
|
||||
--library-dir ${top_builddir}/src/engine \
|
||||
--library-dir ${top_builddir}/src/backend/file \
|
||||
--library-dir ${top_builddir}/src/network-utils \
|
||||
--library-dir ${top_builddir}/src/calculation \
|
||||
--library-dir ${top_builddir}/src/app-utils \
|
||||
--library-dir ${top_builddir}/src/gnome-utils \
|
||||
--library-dir ${top_builddir}/src/report/report-system
|
||||
|
||||
TESTS_ENVIRONMENT := \
|
||||
$(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
|
||||
|
||||
LDADD = ../libgncmod-report-gnome.la
|
||||
LDADD = ../libgncmod-report-gnome.la
|
||||
|
||||
check_PROGRAMS = test-link-module
|
||||
check_PROGRAMS = test-link-module
|
||||
|
||||
EXTRA_DIST = test-load-module
|
||||
|
@ -1,47 +1,40 @@
|
||||
/*********************************************************************
|
||||
* gncmod-report-system.c
|
||||
* module definition/initialization for the report infrastructure
|
||||
*
|
||||
* Copyright (c) 2001 Linux Developers Group, Inc.
|
||||
* module definition/initialization for the report infrastructure
|
||||
*
|
||||
* Copyright (c) 2001 Linux Developers Group, Inc.
|
||||
*********************************************************************/
|
||||
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include <glib.h>
|
||||
#include <gmodule.h>
|
||||
#include <libguile.h>
|
||||
|
||||
#include "gnc-module.h"
|
||||
#include "gnc-module-api.h"
|
||||
|
||||
/* version of the gnc module system interface we require */
|
||||
int libgncmod_report_system_LTX_gnc_module_system_interface = 0;
|
||||
int gnc_module_system_interface = 0;
|
||||
|
||||
/* module versioning uses libtool semantics. */
|
||||
int libgncmod_report_system_LTX_gnc_module_current = 0;
|
||||
int libgncmod_report_system_LTX_gnc_module_revision = 0;
|
||||
int libgncmod_report_system_LTX_gnc_module_age = 0;
|
||||
|
||||
/* forward references */
|
||||
char *libgncmod_report_system_LTX_gnc_module_path(void);
|
||||
char *libgncmod_report_system_LTX_gnc_module_description(void);
|
||||
int libgncmod_report_system_LTX_gnc_module_init(int refcount);
|
||||
int libgncmod_report_system_LTX_gnc_module_end(int refcount);
|
||||
int gnc_module_current = 0;
|
||||
int gnc_module_revision = 0;
|
||||
int gnc_module_age = 0;
|
||||
|
||||
|
||||
char *
|
||||
libgncmod_report_system_LTX_gnc_module_path(void) {
|
||||
gnc_module_path(void) {
|
||||
return g_strdup("gnucash/report/report-system");
|
||||
}
|
||||
|
||||
char *
|
||||
libgncmod_report_system_LTX_gnc_module_description(void) {
|
||||
char *
|
||||
gnc_module_description(void) {
|
||||
return g_strdup("Core components of GnuCash report generation system");
|
||||
}
|
||||
|
||||
extern SCM scm_init_sw_report_system_module(void);
|
||||
|
||||
int
|
||||
libgncmod_report_system_LTX_gnc_module_init(int refcount) {
|
||||
gnc_module_init(int refcount) {
|
||||
/* load the engine (we depend on it) */
|
||||
if(!gnc_module_load("gnucash/engine", 0)) {
|
||||
return FALSE;
|
||||
@ -51,7 +44,7 @@ libgncmod_report_system_LTX_gnc_module_init(int refcount) {
|
||||
return FALSE;
|
||||
}
|
||||
scm_init_sw_report_system_module();
|
||||
|
||||
|
||||
scm_c_eval_string("(use-modules (gnucash report report-system))");
|
||||
|
||||
/* if this is the first time the module's being loaded, initialize
|
||||
@ -64,6 +57,6 @@ libgncmod_report_system_LTX_gnc_module_init(int refcount) {
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_report_system_LTX_gnc_module_end(int refcount) {
|
||||
gnc_module_end(int refcount) {
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -1,34 +1,23 @@
|
||||
TESTS = \
|
||||
test-link-module \
|
||||
test-load-module
|
||||
test-load-module
|
||||
|
||||
GNC_TEST_DEPS := @GNC_TEST_SRFI_LOAD_CMD@ \
|
||||
--gnc-module-dir ${top_builddir}/src/core-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/gnc-module \
|
||||
--gnc-module-dir ${top_builddir}/src/engine \
|
||||
--gnc-module-dir ${top_builddir}/src/scm \
|
||||
--gnc-module-dir ${top_builddir}/src/gnome \
|
||||
--gnc-module-dir ${top_builddir}/src/gnome-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/calculation \
|
||||
--gnc-module-dir ${top_builddir}/src/app-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/report/report-system \
|
||||
--gnc-module-dir ${top_builddir}/src/network-utils \
|
||||
--gnc-module-dir ${top_srcdir}/src/gnc-module \
|
||||
--gnc-module-dir ${top_srcdir}/src/engine \
|
||||
--guile-load-dir ${top_srcdir}/src/scm \
|
||||
--guile-load-dir ${top_srcdir}/src/gnome-utils \
|
||||
--guile-load-dir ${top_srcdir}/src/gnome \
|
||||
--guile-load-dir ${top_srcdir}/src/app-utils \
|
||||
--guile-load-dir ${top_srcdir}/src/report/report-system \
|
||||
--library-dir ${top_srcdir}/src/gnome-utils \
|
||||
--guile-load-dir ${top_builddir}/src/gnc-module \
|
||||
--guile-load-dir ${top_builddir}/src/engine \
|
||||
--library-dir ${top_builddir}/lib/libqof/qof \
|
||||
--library-dir ${top_srcdir}/src/gnome
|
||||
--library-dir ${top_builddir}/src/core-utils \
|
||||
--library-dir ${top_builddir}/src/gnc-module \
|
||||
--library-dir ${top_builddir}/src/engine \
|
||||
--library-dir ${top_builddir}/src/calculation \
|
||||
--library-dir ${top_builddir}/src/app-utils
|
||||
|
||||
TESTS_ENVIRONMENT := \
|
||||
$(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
|
||||
|
||||
LDADD = ../libgncmod-report-system.la
|
||||
|
||||
check_PROGRAMS = test-link-module
|
||||
check_PROGRAMS = test-link-module
|
||||
|
||||
EXTRA_DIST = test-load-module
|
||||
|
@ -1,45 +1,38 @@
|
||||
/*********************************************************************
|
||||
* gncmod-standard-reports.c
|
||||
* module definition/initialization for the standard reports
|
||||
*
|
||||
* Copyright (c) 2001 Linux Developers Group, Inc.
|
||||
* module definition/initialization for the standard reports
|
||||
*
|
||||
* Copyright (c) 2001 Linux Developers Group, Inc.
|
||||
*********************************************************************/
|
||||
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include <glib.h>
|
||||
#include <gmodule.h>
|
||||
#include <libguile.h>
|
||||
|
||||
#include "gnc-module.h"
|
||||
#include "gnc-module-api.h"
|
||||
|
||||
/* version of the gnc module system interface we require */
|
||||
int libgncmod_standard_reports_LTX_gnc_module_system_interface = 0;
|
||||
int gnc_module_system_interface = 0;
|
||||
|
||||
/* module versioning uses libtool semantics. */
|
||||
int libgncmod_standard_reports_LTX_gnc_module_current = 0;
|
||||
int libgncmod_standard_reports_LTX_gnc_module_revision = 0;
|
||||
int libgncmod_standard_reports_LTX_gnc_module_age = 0;
|
||||
|
||||
/* forward references */
|
||||
char *libgncmod_standard_reports_LTX_gnc_module_path(void);
|
||||
char *libgncmod_standard_reports_LTX_gnc_module_description(void);
|
||||
int libgncmod_standard_reports_LTX_gnc_module_init(int refcount);
|
||||
int libgncmod_standard_reports_LTX_gnc_module_end(int refcount);
|
||||
int gnc_module_current = 0;
|
||||
int gnc_module_revision = 0;
|
||||
int gnc_module_age = 0;
|
||||
|
||||
|
||||
char *
|
||||
libgncmod_standard_reports_LTX_gnc_module_path(void) {
|
||||
gnc_module_path(void) {
|
||||
return g_strdup("gnucash/report/standard-reports");
|
||||
}
|
||||
|
||||
char *
|
||||
libgncmod_standard_reports_LTX_gnc_module_description(void) {
|
||||
char *
|
||||
gnc_module_description(void) {
|
||||
return g_strdup("Standard income, asset, balance sheet, etc. reports");
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_standard_reports_LTX_gnc_module_init(int refcount) {
|
||||
gnc_module_init(int refcount) {
|
||||
/* load the report system */
|
||||
if(!gnc_module_load("gnucash/report/report-system", 0)) {
|
||||
return FALSE;
|
||||
@ -49,12 +42,11 @@ libgncmod_standard_reports_LTX_gnc_module_init(int refcount) {
|
||||
if(scm_c_eval_string("(use-modules (gnucash report standard-reports))") ==
|
||||
SCM_BOOL_F) {
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_standard_reports_LTX_gnc_module_end(int refcount) {
|
||||
gnc_module_end(int refcount) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -1,28 +1,17 @@
|
||||
TESTS=test-load-module
|
||||
TESTS=test-load-module
|
||||
|
||||
GNC_TEST_DEPS := @GNC_TEST_SRFI_LOAD_CMD@ \
|
||||
--gnc-module-dir ${top_builddir}/src/core-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/gnc-module \
|
||||
--gnc-module-dir ${top_builddir}/src/engine \
|
||||
--gnc-module-dir ${top_builddir}/src/scm \
|
||||
--gnc-module-dir ${top_builddir}/src/gnome \
|
||||
--gnc-module-dir ${top_builddir}/src/gnome-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/calculation \
|
||||
--gnc-module-dir ${top_builddir}/src/report/report-system \
|
||||
--gnc-module-dir ${top_builddir}/src/app-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/calculation \
|
||||
--gnc-module-dir ${top_builddir}/src/report/standard-reports \
|
||||
--gnc-module-dir ${top_builddir}/src/network-utils \
|
||||
--gnc-module-dir ${top_srcdir}/src/gnc-module \
|
||||
--gnc-module-dir ${top_srcdir}/src/engine \
|
||||
--guile-load-dir ${top_srcdir}/src/scm \
|
||||
--guile-load-dir ${top_srcdir}/src/app-utils \
|
||||
--guile-load-dir ${top_srcdir}/src/gnome-utils \
|
||||
--guile-load-dir ${top_srcdir}/src/gnome \
|
||||
--guile-load-dir ${top_srcdir}/src/report/report-system \
|
||||
--library-dir ${top_builddir}/src/gnome-utils \
|
||||
--guile-load-dir ${top_builddir}/src/gnc-module \
|
||||
--guile-load-dir ${top_builddir}/src/engine \
|
||||
--library-dir ${top_builddir}/lib/libqof/qof \
|
||||
--library-dir ${top_builddir}/src/gnome
|
||||
--library-dir ${top_builddir}/src/core-utils \
|
||||
--library-dir ${top_builddir}/src/gnc-module \
|
||||
--library-dir ${top_builddir}/src/engine \
|
||||
--library-dir ${top_builddir}/src/calculation \
|
||||
--library-dir ${top_builddir}/src/app-utils
|
||||
|
||||
TESTS_ENVIRONMENT := \
|
||||
$(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
|
||||
|
@ -1,14 +1,13 @@
|
||||
/*********************************************************************
|
||||
* gncmod-stylesheets.c
|
||||
* module definition/initialization for the standard reports
|
||||
*
|
||||
* Copyright (c) 2001 Linux Developers Group, Inc.
|
||||
* module definition/initialization for the standard reports
|
||||
*
|
||||
* Copyright (c) 2001 Linux Developers Group, Inc.
|
||||
*********************************************************************/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <stdio.h>
|
||||
#include <gmodule.h>
|
||||
#include <libguile.h>
|
||||
|
||||
#include "gnc-module.h"
|
||||
@ -16,32 +15,26 @@
|
||||
#include "gnc-plugin-stylesheets.h"
|
||||
|
||||
/* version of the gnc module system interface we require */
|
||||
int libgncmod_stylesheets_LTX_gnc_module_system_interface = 0;
|
||||
int gnc_module_system_interface = 0;
|
||||
|
||||
/* module versioning uses libtool semantics. */
|
||||
int libgncmod_stylesheets_LTX_gnc_module_current = 0;
|
||||
int libgncmod_stylesheets_LTX_gnc_module_revision = 0;
|
||||
int libgncmod_stylesheets_LTX_gnc_module_age = 0;
|
||||
|
||||
/* forward references */
|
||||
char *libgncmod_stylesheets_LTX_gnc_module_path(void);
|
||||
char *libgncmod_stylesheets_LTX_gnc_module_description(void);
|
||||
int libgncmod_stylesheets_LTX_gnc_module_init(int refcount);
|
||||
int libgncmod_stylesheets_LTX_gnc_module_end(int refcount);
|
||||
int gnc_module_current = 0;
|
||||
int gnc_module_revision = 0;
|
||||
int gnc_module_age = 0;
|
||||
|
||||
|
||||
char *
|
||||
libgncmod_stylesheets_LTX_gnc_module_path(void) {
|
||||
gnc_module_path(void) {
|
||||
return g_strdup("gnucash/report/stylesheets");
|
||||
}
|
||||
|
||||
char *
|
||||
libgncmod_stylesheets_LTX_gnc_module_description(void) {
|
||||
char *
|
||||
gnc_module_description(void) {
|
||||
return g_strdup("Standard report stylesheet definitions");
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_stylesheets_LTX_gnc_module_init(int refcount) {
|
||||
gnc_module_init(int refcount) {
|
||||
/* load the report system */
|
||||
if(!gnc_module_load("gnucash/report/report-system", 0)) {
|
||||
return FALSE;
|
||||
@ -52,14 +45,14 @@ libgncmod_stylesheets_LTX_gnc_module_init(int refcount) {
|
||||
SCM_BOOL_F) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/* Add menu items with C callbacks */
|
||||
gnc_plugin_stylesheets_create_plugin();
|
||||
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_stylesheets_LTX_gnc_module_end(int refcount) {
|
||||
gnc_module_end(int refcount) {
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -1,29 +1,22 @@
|
||||
TESTS=test-load-module
|
||||
TESTS=test-load-module
|
||||
|
||||
GNC_TEST_DEPS := @GNC_TEST_SRFI_LOAD_CMD@ \
|
||||
--gnc-module-dir ${top_builddir}/src/core-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/gnc-module \
|
||||
--gnc-module-dir ${top_builddir}/src/scm \
|
||||
--gnc-module-dir ${top_builddir}/src/engine \
|
||||
--gnc-module-dir ${top_builddir}/src/report/report-system \
|
||||
--gnc-module-dir ${top_builddir}/src/report/utility-reports \
|
||||
--gnc-module-dir ${top_builddir}/src/report/stylesheets \
|
||||
--gnc-module-dir ${top_builddir}/src/app-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/calculation \
|
||||
--gnc-module-dir ${top_builddir}/src/gnome-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/network-utils \
|
||||
--gnc-module-dir ${top_srcdir}/src/gnome-utils \
|
||||
--gnc-module-dir ${top_srcdir}/src/gnc-module \
|
||||
--gnc-module-dir ${top_srcdir}/src/engine \
|
||||
--guile-load-dir ${top_srcdir}/src/scm \
|
||||
--guile-load-dir ${top_srcdir}/src/app-utils \
|
||||
--guile-load-dir ${top_srcdir}/src/report/report-system \
|
||||
--guile-load-dir ${top_srcdir}/src/report/stylesheets \
|
||||
--guile-load-dir ${top_builddir}/src/gnome-utils \
|
||||
--guile-load-dir ${top_builddir}/src/gnome \
|
||||
--library-dir ${top_builddir}/src/gnome-utils \
|
||||
--guile-load-dir ${top_builddir}/src/gnc-module \
|
||||
--guile-load-dir ${top_builddir}/src/engine \
|
||||
--library-dir ${top_builddir}/lib/libqof/qof \
|
||||
--library-dir ${top_builddir}/src/gnome
|
||||
--library-dir ${top_builddir}/src/core-utils \
|
||||
--library-dir ${top_builddir}/src/gnc-module \
|
||||
--library-dir ${top_builddir}/src/engine \
|
||||
--library-dir ${top_builddir}/src/backend/file \
|
||||
--library-dir ${top_builddir}/src/network-utils \
|
||||
--library-dir ${top_builddir}/src/calculation \
|
||||
--library-dir ${top_builddir}/src/app-utils \
|
||||
--library-dir ${top_builddir}/src/gnome-utils \
|
||||
--library-dir ${top_builddir}/src/report/report-system \
|
||||
--library-dir ${top_builddir}/src/report/report-gnome
|
||||
|
||||
TESTS_ENVIRONMENT := \
|
||||
$(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
|
||||
|
@ -1,4 +1,4 @@
|
||||
#! /bin/bash
|
||||
#! /bin/sh
|
||||
exec guile -s "$0"
|
||||
!#
|
||||
|
||||
|
@ -1,45 +1,38 @@
|
||||
/*********************************************************************
|
||||
* gncmod-utility-reports.c
|
||||
* module definition/initialization for the utility reports
|
||||
*
|
||||
* Copyright (c) 2001 Linux Developers Group, Inc.
|
||||
* module definition/initialization for the utility reports
|
||||
*
|
||||
* Copyright (c) 2001 Linux Developers Group, Inc.
|
||||
*********************************************************************/
|
||||
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include <gmodule.h>
|
||||
#include <libguile.h>
|
||||
#include <glib.h>
|
||||
|
||||
#include "gnc-module.h"
|
||||
#include "gnc-module-api.h"
|
||||
|
||||
/* version of the gnc module system interface we require */
|
||||
int libgncmod_utility_reports_LTX_gnc_module_system_interface = 0;
|
||||
int gnc_module_system_interface = 0;
|
||||
|
||||
/* module versioning uses libtool semantics. */
|
||||
int libgncmod_utility_reports_LTX_gnc_module_current = 0;
|
||||
int libgncmod_utility_reports_LTX_gnc_module_revision = 0;
|
||||
int libgncmod_utility_reports_LTX_gnc_module_age = 0;
|
||||
|
||||
/* forward references */
|
||||
char *libgncmod_utility_reports_LTX_gnc_module_path(void);
|
||||
char *libgncmod_utility_reports_LTX_gnc_module_description(void);
|
||||
int libgncmod_utility_reports_LTX_gnc_module_init(int refcount);
|
||||
int libgncmod_utility_reports_LTX_gnc_module_end(int refcount);
|
||||
int gnc_module_current = 0;
|
||||
int gnc_module_revision = 0;
|
||||
int gnc_module_age = 0;
|
||||
|
||||
|
||||
char *
|
||||
libgncmod_utility_reports_LTX_gnc_module_path(void) {
|
||||
gnc_module_path(void) {
|
||||
return g_strdup("gnucash/report/utility-reports");
|
||||
}
|
||||
|
||||
char *
|
||||
libgncmod_utility_reports_LTX_gnc_module_description(void) {
|
||||
char *
|
||||
gnc_module_description(void) {
|
||||
return g_strdup("Non-financial (utility) reports");
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_utility_reports_LTX_gnc_module_init(int refcount) {
|
||||
gnc_module_init(int refcount) {
|
||||
/* load the report system */
|
||||
if(!gnc_module_load("gnucash/report/report-system", 0)) {
|
||||
return FALSE;
|
||||
@ -50,11 +43,11 @@ libgncmod_utility_reports_LTX_gnc_module_init(int refcount) {
|
||||
SCM_BOOL_F) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_utility_reports_LTX_gnc_module_end(int refcount) {
|
||||
gnc_module_end(int refcount) {
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -1,28 +1,17 @@
|
||||
TESTS = test-load-module
|
||||
TESTS = test-load-module
|
||||
|
||||
GNC_TEST_DEPS := @GNC_TEST_SRFI_LOAD_CMD@ \
|
||||
--gnc-module-dir ${top_builddir}/src/core-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/gnc-module \
|
||||
--gnc-module-dir ${top_builddir}/src/engine \
|
||||
--gnc-module-dir ${top_builddir}/src/scm \
|
||||
--gnc-module-dir ${top_builddir}/src/gnome \
|
||||
--gnc-module-dir ${top_builddir}/src/gnome-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/report/report-system \
|
||||
--gnc-module-dir ${top_builddir}/src/report/utility-reports \
|
||||
--gnc-module-dir ${top_builddir}/src/app-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/calculation \
|
||||
--gnc-module-dir ${top_builddir}/src/network-utils \
|
||||
--gnc-module-dir ${top_srcdir}/src/gnc-module \
|
||||
--gnc-module-dir ${top_srcdir}/src/engine \
|
||||
--guile-load-dir ${top_srcdir}/src/scm \
|
||||
--guile-load-dir ${top_srcdir}/src/app-utils \
|
||||
--guile-load-dir ${top_srcdir}/src/gnome-utils \
|
||||
--guile-load-dir ${top_srcdir}/src/gnome \
|
||||
--guile-load-dir ${top_srcdir}/src/report/report-system \
|
||||
--guile-load-dir ${top_srcdir}/src/report/utility-reports \
|
||||
--library-dir ${top_builddir}/src/gnome-utils \
|
||||
--library-dir ${top_builddir}/src/gnome \
|
||||
--library-dir ${top_builddir}/lib/libqof/qof
|
||||
--guile-load-dir ${top_builddir}/src/gnc-module \
|
||||
--guile-load-dir ${top_builddir}/src/engine \
|
||||
--library-dir ${top_builddir}/lib/libqof/qof \
|
||||
--library-dir ${top_builddir}/src/core-utils \
|
||||
--library-dir ${top_builddir}/src/gnc-module \
|
||||
--library-dir ${top_builddir}/src/engine \
|
||||
--library-dir ${top_builddir}/src/calculation \
|
||||
--library-dir ${top_builddir}/src/app-utils
|
||||
|
||||
TESTS_ENVIRONMENT := \
|
||||
$(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
|
||||
|
@ -1,37 +1,28 @@
|
||||
/*********************************************************************
|
||||
* gncmod-tax-us.c
|
||||
* module definition/initialization for us tax info
|
||||
*
|
||||
* Copyright (c) 2001 Linux Developers Group, Inc.
|
||||
* module definition/initialization for us tax info
|
||||
*
|
||||
* Copyright (c) 2001 Linux Developers Group, Inc.
|
||||
*********************************************************************/
|
||||
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include <glib.h>
|
||||
#include <gmodule.h>
|
||||
#include <libguile.h>
|
||||
#include <locale.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "gnc-module.h"
|
||||
#include "gnc-module-api.h"
|
||||
|
||||
/* version of the gnc module system interface we require */
|
||||
int libgncmod_tax_us_LTX_gnc_module_system_interface = 0;
|
||||
int gnc_module_system_interface = 0;
|
||||
|
||||
/* module versioning uses libtool semantics. */
|
||||
int libgncmod_tax_us_LTX_gnc_module_current = 0;
|
||||
int libgncmod_tax_us_LTX_gnc_module_revision = 0;
|
||||
int libgncmod_tax_us_LTX_gnc_module_age = 0;
|
||||
|
||||
/* forward references */
|
||||
char *libgncmod_tax_us_LTX_gnc_module_path(void);
|
||||
char *libgncmod_tax_us_LTX_gnc_module_description(void);
|
||||
int libgncmod_tax_us_LTX_gnc_module_init(int refcount);
|
||||
int libgncmod_tax_us_LTX_gnc_module_end(int refcount);
|
||||
int gnc_module_current = 0;
|
||||
int gnc_module_revision = 0;
|
||||
int gnc_module_age = 0;
|
||||
|
||||
|
||||
char *
|
||||
libgncmod_tax_us_LTX_gnc_module_path(void) {
|
||||
gnc_module_path(void) {
|
||||
#ifdef LOCALE_SPECIFIC_TAX
|
||||
const char *thislocale = setlocale(LC_ALL, NULL);
|
||||
if (strncmp(thislocale, "de_DE", 5) == 0)
|
||||
@ -41,13 +32,13 @@ libgncmod_tax_us_LTX_gnc_module_path(void) {
|
||||
return g_strdup("gnucash/tax/us");
|
||||
}
|
||||
|
||||
char *
|
||||
libgncmod_tax_us_LTX_gnc_module_description(void) {
|
||||
char *
|
||||
gnc_module_description(void) {
|
||||
return g_strdup("US income tax information");
|
||||
}
|
||||
|
||||
static void
|
||||
lmod(char * mn)
|
||||
lmod(char * mn)
|
||||
{
|
||||
char * form = g_strdup_printf("(use-modules %s)\n", mn);
|
||||
scm_c_eval_string(form);
|
||||
@ -55,7 +46,7 @@ lmod(char * mn)
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_tax_us_LTX_gnc_module_init(int refcount) {
|
||||
gnc_module_init(int refcount) {
|
||||
/* This is a very simple hack that loads the (new, special) German
|
||||
tax definition file in a German locale, or (default) loads the
|
||||
previous US tax file. */
|
||||
@ -70,6 +61,6 @@ libgncmod_tax_us_LTX_gnc_module_init(int refcount) {
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_tax_us_LTX_gnc_module_end(int refcount) {
|
||||
gnc_module_end(int refcount) {
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -1,29 +1,18 @@
|
||||
TESTS = test-link-module test-load-module
|
||||
TESTS = test-link-module test-load-module
|
||||
|
||||
# Some of these dirs may not be needed anymore.
|
||||
GNC_TEST_DEPS := \
|
||||
--gnc-module-dir ${top_builddir}/src/core-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/gnc-module \
|
||||
--gnc-module-dir ${top_builddir}/src/engine \
|
||||
--gnc-module-dir ${top_builddir}/src/report/report-system \
|
||||
--gnc-module-dir ${top_builddir}/src/report/utility-reports \
|
||||
--gnc-module-dir ${top_builddir}/src/report/stylesheets \
|
||||
--gnc-module-dir ${top_builddir}/src/app-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/calculation \
|
||||
--gnc-module-dir ${top_builddir}/src/tax/us \
|
||||
--gnc-module-dir ${top_srcdir}/src/tax/us \
|
||||
--guile-load-dir ${top_builddir}/src/scm \
|
||||
--guile-load-dir ${top_builddir}/lib \
|
||||
--guile-load-dir ${top_builddir}/src/gnome-utils \
|
||||
--guile-load-dir ${top_builddir}/src/gnome \
|
||||
--library-dir ${top_builddir}/src/gnome-utils \
|
||||
--library-dir ${top_builddir}/src/gnome
|
||||
--guile-load-dir ${top_builddir}/src/gnc-module \
|
||||
--guile-load-dir ${top_builddir}/src/tax/us \
|
||||
--library-dir ${top_builddir}/src/core-utils \
|
||||
--library-dir ${top_builddir}/src/gnc-module
|
||||
|
||||
TESTS_ENVIRONMENT := \
|
||||
$(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
|
||||
|
||||
EXTRA_DIST = test-load-module
|
||||
|
||||
check_PROGRAMS=test-link-module
|
||||
check_PROGRAMS=test-link-module
|
||||
test_link_module_SOURCES=test-link-module.c
|
||||
test_link_module_LDADD=../libgncmod-tax-us.la ${GUILE_LIBS} ${GLIB_LIBS}
|
||||
|
@ -1,47 +1,41 @@
|
||||
/*********************************************************************
|
||||
* gncmod-test.c
|
||||
* module definition/initialization for the test infrastructure
|
||||
*
|
||||
* Copyright (c) 2001 Linux Developers Group, Inc.
|
||||
* module definition/initialization for the test infrastructure
|
||||
*
|
||||
* Copyright (c) 2001 Linux Developers Group, Inc.
|
||||
*********************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <glib.h>
|
||||
#include <gmodule.h>
|
||||
|
||||
#include "gnc-module.h"
|
||||
#include "gnc-module-api.h"
|
||||
|
||||
/* version of the gnc module system interface we require */
|
||||
int libgncmod_test_LTX_gnc_module_system_interface = 0;
|
||||
int gnc_module_system_interface = 0;
|
||||
|
||||
/* module versioning uses libtool semantics. */
|
||||
int libgncmod_test_LTX_gnc_module_current = 0;
|
||||
int libgncmod_test_LTX_gnc_module_revision = 0;
|
||||
int libgncmod_test_LTX_gnc_module_age = 0;
|
||||
|
||||
/* forward references */
|
||||
char *libgncmod_test_LTX_gnc_module_path(void);
|
||||
char *libgncmod_test_LTX_gnc_module_description(void);
|
||||
int libgncmod_test_LTX_gnc_module_init(int refcount);
|
||||
int libgncmod_test_LTX_gnc_module_end(int refcount);
|
||||
int gnc_module_current = 0;
|
||||
int gnc_module_revision = 0;
|
||||
int gnc_module_age = 0;
|
||||
|
||||
|
||||
char *
|
||||
libgncmod_test_LTX_gnc_module_path(void) {
|
||||
gnc_module_path(void) {
|
||||
return g_strdup("gnucash/test");
|
||||
}
|
||||
|
||||
char *
|
||||
libgncmod_test_LTX_gnc_module_description(void) {
|
||||
char *
|
||||
gnc_module_description(void) {
|
||||
return g_strdup("Basic GnuCash test infrastructure.");
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_test_LTX_gnc_module_init(int refcount) {
|
||||
gnc_module_init(int refcount) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_test_LTX_gnc_module_end(int refcount) {
|
||||
gnc_module_end(int refcount) {
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -48,12 +48,6 @@
|
||||
obj:/usr/lib/libguile.so.12.3.0
|
||||
}
|
||||
|
||||
{
|
||||
libltdl.so.3(Value1)
|
||||
Memcheck:Value1
|
||||
obj:/usr/lib/libltdl.so.3
|
||||
}
|
||||
|
||||
{
|
||||
libglib-1.2.so.0(Value4)
|
||||
Memcheck:Value4
|
||||
|
Loading…
Reference in New Issue
Block a user