mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Remove the gncmod boilerplate from standard-reports and utility-reports
This adds unnecessary overhead and also serves as an initial experiment to greatly reduce the gnc-module based modularization. Oh, and it fixes the autotools make check failure in standard-reports which I introduced in the previous commit. The fix was to either fully gnc-modularize business reports or to go to de-gnc-modularize standard-reports. I chose the latter as I don't want to add any new gnc-modules any more at this point.
This commit is contained in:
parent
f71317626d
commit
342627d527
@ -1773,7 +1773,6 @@ AC_CONFIG_FILES(
|
||||
src/report/stylesheets/Makefile
|
||||
src/report/stylesheets/test/Makefile
|
||||
src/report/utility-reports/Makefile
|
||||
src/report/utility-reports/test/Makefile
|
||||
src/report/jqplot/Makefile
|
||||
src/scm/Makefile
|
||||
src/scm/gnumeric/Makefile
|
||||
@ -1850,12 +1849,8 @@ AC_CONFIG_FILES([src/report/report-gnome/test/test-load-module],
|
||||
[chmod +x src/report/report-gnome/test/test-load-module])
|
||||
AC_CONFIG_FILES([src/report/report-system/test/test-load-module],
|
||||
[chmod +x src/report/report-system/test/test-load-module])
|
||||
AC_CONFIG_FILES([src/report/standard-reports/test/test-load-module],
|
||||
[chmod +x src/report/standard-reports/test/test-load-module])
|
||||
AC_CONFIG_FILES([src/report/stylesheets/test/test-load-module],
|
||||
[chmod +x src/report/stylesheets/test/test-load-module])
|
||||
AC_CONFIG_FILES([src/report/utility-reports/test/test-load-module],
|
||||
[chmod +x src/report/utility-reports/test/test-load-module])
|
||||
AC_CONFIG_FILES([src/tax/us/test/test-load-module],
|
||||
[chmod +x src/tax/us/test/test-load-module])
|
||||
|
||||
|
@ -275,8 +275,6 @@ src/gnome/top-level.c
|
||||
src/gnome/window-autoclear.c
|
||||
src/gnome/window-reconcile2.c
|
||||
src/gnome/window-reconcile.c
|
||||
src/gnome-business/business-gnome.scm
|
||||
src/gnome-business/gncmod-business-gnome.c
|
||||
src/gnome-search/dialog-search.c
|
||||
src/gnome-search/dialog-search.glade
|
||||
src/gnome-search/gnc-general-search.c
|
||||
@ -640,7 +638,6 @@ src/report/standard-reports/daily-reports.scm
|
||||
src/report/standard-reports/equity-statement.scm
|
||||
src/report/standard-reports/general-journal.scm
|
||||
src/report/standard-reports/general-ledger.scm
|
||||
src/report/standard-reports/gncmod-standard-reports.c
|
||||
src/report/standard-reports/income-statement.scm
|
||||
src/report/standard-reports/net-barchart.scm
|
||||
src/report/standard-reports/net-linechart.scm
|
||||
@ -659,7 +656,6 @@ src/report/stylesheets/stylesheet-footer.scm
|
||||
src/report/stylesheets/stylesheet-head-or-tail.scm
|
||||
src/report/stylesheets/stylesheet-plain.scm
|
||||
src/report/stylesheets/stylesheets.scm
|
||||
src/report/utility-reports/gncmod-utility-reports.c
|
||||
src/report/utility-reports/hello-world.scm
|
||||
src/report/utility-reports/utility-reports.scm
|
||||
src/report/utility-reports/view-column.scm
|
||||
|
@ -1,25 +1,22 @@
|
||||
-*-text-*-
|
||||
|
||||
'Modules' in Gnucash are relatively self-contained segments of code that
|
||||
can be dynamically loaded at runtime. Eventually we want the whole gnucash
|
||||
source tree to be a set of modules and the app itself to be a short Scheme
|
||||
program that loads them all.
|
||||
can be dynamically loaded at runtime. While this may have been a great
|
||||
design when gnucash was pure guile, it turns out this needlessly complicates
|
||||
the current mix of C, C++ and guile. So expect this gnc-module based
|
||||
modularization to be greatly reduced in the future. All the core parts should
|
||||
be loadable straight away as dynamic libraries. This is currently not feasible
|
||||
so the gnc-module functionality will still be around for some time and perhaps
|
||||
forever as a way to extend gnucash with external code.
|
||||
|
||||
We're not there yet :)
|
||||
|
||||
core-utils The lowest level. Very basic code.
|
||||
Should not depend on any other modules.
|
||||
This module is not a gnc-module (and
|
||||
perhaps shouldn't be).
|
||||
|
||||
Here are the bits that have been converted to use the module system so
|
||||
far.
|
||||
Here are the bits that are still using the module system so far (this list is probably
|
||||
outdated already, but can serve as a starting point to figure out which modules
|
||||
can already be de-modularized):.
|
||||
|
||||
gnc-module The module system (actually not a module itself)
|
||||
|
||||
calculation Low-level expression parsing & financial
|
||||
equation solving.
|
||||
|
||||
engine The engine module, without any backends
|
||||
|
||||
backend/xml Binary and XML (v1 and v2) backends
|
||||
@ -34,14 +31,10 @@ register/register-core Toolkit independent register code, formerly in
|
||||
register/register-gnome Gnome-specific register code, formerly in
|
||||
src/register/gnome
|
||||
|
||||
import-export/binary-import utils for importing old GnuCash binary files
|
||||
|
||||
import-export/qif-import the old qif importer with Gnome druid
|
||||
import-export/qif-io-core new qif import/export module. unfinished.
|
||||
|
||||
report/report-system the report infrastructure and HTML handling
|
||||
report/standard-reports most of the reports that are in gnucash
|
||||
report/utility-reports the multicolumn view, the iframe report, etc.
|
||||
report/locale-specific-reports reports that should only be loaded in
|
||||
certain locales. subdir per locale.
|
||||
report/stylesheets predefined style sheet templates
|
||||
@ -50,14 +43,8 @@ report/report-gnome Gnome gui for displaying reports.
|
||||
app-utils utils for the gnucash app framework (component
|
||||
mgr, cmd line processing, gettext stuff, etc)
|
||||
|
||||
app-file application-level file handling
|
||||
|
||||
gnome-utils Extensions and utilities for using Gnome/Gtk
|
||||
with GnuCash, including new widgets.
|
||||
|
||||
network-utils Utils for network communication.
|
||||
|
||||
tax/us US tax information
|
||||
|
||||
(RPC was removed in v.1.9.0, subversion release: 12018)
|
||||
|
||||
|
@ -505,8 +505,6 @@ load_gnucash_modules()
|
||||
{ "gnucash/import-export/aqbanking", 0, TRUE },
|
||||
{ "gnucash/report/report-system", 0, FALSE },
|
||||
{ "gnucash/report/stylesheets", 0, FALSE },
|
||||
{ "gnucash/report/standard-reports", 0, FALSE },
|
||||
{ "gnucash/report/utility-reports", 0, FALSE },
|
||||
{ "gnucash/report/locale-specific/us", 0, FALSE },
|
||||
{ "gnucash/report/report-gnome", 0, FALSE },
|
||||
{ "gnucash/gtkmm", 0, TRUE },
|
||||
|
@ -39,9 +39,6 @@ eval `${top_srcdir}/src/gnc-test-env.pl \
|
||||
--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/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/report/stylesheets \
|
||||
|
@ -78,9 +78,7 @@ SET(COPY_FROM_BUILD
|
||||
src/report/report-gnome/test/test-load-module
|
||||
src/report/report-system/swig-report-system.c
|
||||
src/report/report-system/test/test-load-module
|
||||
src/report/standard-reports/test/test-load-module
|
||||
src/report/stylesheets/test/test-load-module
|
||||
src/report/utility-reports/test/test-load-module
|
||||
src/scm/build-config.scm
|
||||
src/swig-runtime.h
|
||||
src/test-core/swig-unittest-support-guile.c
|
||||
|
@ -91,7 +91,7 @@ gnc_engine_init_part2()
|
||||
#ifdef WIN32
|
||||
#define LIBDIR "bin"
|
||||
#else
|
||||
#define LIBDIR "lib"
|
||||
#define LIBDIR "lib/gnucash"
|
||||
#endif
|
||||
#else
|
||||
pkglibdir = g_build_path (G_DIR_SEPARATOR_S, builddir,
|
||||
|
@ -31,7 +31,7 @@ SET(GUILE_LOAD_DIRS src/app-utils src/core-utils src/engine src/gnc-module sr
|
||||
src/report/business_reports src/report/report-system src/report/standard-reports)
|
||||
SET(GUILE_LIBRARY_DIRS src/app-utils src/core-utils src/engine src/gnc-module src/gnome-utils src/report/report-system
|
||||
src/report/standard-reports)
|
||||
SET(GUILE_DEPENDS scm-business-reports-links gncmod-standard-reports scm-standard-reports)
|
||||
SET(GUILE_DEPENDS scm-business-reports-links scm-standard-reports)
|
||||
|
||||
GNC_ADD_SCHEME_TARGETS(scm-business-reports
|
||||
"${business_reports_SCHEME}"
|
||||
|
@ -53,8 +53,6 @@ GUILE_COMPILE_ENV = \
|
||||
--gnc-module-dir ${top_builddir}/src/gnome-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/html \
|
||||
--gnc-module-dir ${top_builddir}/src/report/report-system \
|
||||
--gnc-module-dir ${top_builddir}/src/report/standard-reports \
|
||||
--gnc-module-dir ${top_builddir}/src/report/business-reports \
|
||||
--guile-load-dir ${top_builddir}/src/app-utils \
|
||||
--guile-load-dir ${top_builddir}/src/core-utils \
|
||||
--guile-load-dir ${top_builddir}/src/engine \
|
||||
@ -73,8 +71,7 @@ GUILE_COMPILE_ENV = \
|
||||
--library-dir ${top_builddir}/src/backend/sql \
|
||||
--library-dir ${top_builddir}/src/html \
|
||||
--library-dir ${top_builddir}/src/gnc-module \
|
||||
--library-dir ${top_builddir}/src/report/report-system \
|
||||
--library-dir ${top_builddir}/src/report/business-reports
|
||||
--library-dir ${top_builddir}/src/report/report-system
|
||||
|
||||
|
||||
%.go : %.scm .scm-links $(pkglib_LTLIBRARIES)
|
||||
|
@ -27,7 +27,7 @@
|
||||
(use-modules (gnucash gnc-module))
|
||||
(use-modules (gnucash app-utils))
|
||||
(use-modules (gnucash report report-system))
|
||||
(gnc:module-load "gnucash/report/standard-reports" 0)
|
||||
(use-modules (gnucash report standard-reports))
|
||||
|
||||
;; to define gnc-build-url
|
||||
(gnc:module-load "gnucash/html" 0)
|
||||
|
@ -53,7 +53,7 @@ SET(GUILE_OUTPUT_DIR gnucash/report)
|
||||
SET(GUILE_MODULES src/app-utils src/scm src/engine src/gnc-module src/gnome-utils src/reports/report-system src/report/utility-reports)
|
||||
SET(GUILE_LOAD_DIRS src/app-utils src/gnc-module src/engine src/scm src/core-utils src/gnome-utils)
|
||||
SET(GUILE_LIBRARY_DIRS src/app-utils src/core-utils src/engine src/gnc-module src/gnome-utils src/report-gnome)
|
||||
SET(GUILE_DEPENDS gncmod-report-gnome gncmod-engine scm-app-utils scm-gnome-utils scm-core-utils scm-gnc-module scm-scm)
|
||||
SET(GUILE_DEPENDS gncmod-report-gnome gncmod-engine scm-app-utils scm-gnome-utils scm-core-utils scm-gnc-module scm-scm scm-standard-reports scm-business-reports scm-utility-reports)
|
||||
|
||||
GNC_ADD_SCHEME_TARGETS(scm-report-gnome
|
||||
"${report_gnome_SCHEME}"
|
||||
|
@ -109,11 +109,15 @@ if GNC_HAVE_GUILE_2
|
||||
GUILE_COMPILE_ENV = \
|
||||
--gnc-module-dir ${top_builddir}/src/app-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/engine \
|
||||
--gnc-module-dir ${top_builddir}/src/html \
|
||||
--gnc-module-dir ${top_builddir}/src/report/report-system \
|
||||
--guile-load-dir ${top_builddir}/src/app-utils \
|
||||
--guile-load-dir ${top_builddir}/src/core-utils \
|
||||
--guile-load-dir ${top_builddir}/src/engine \
|
||||
--guile-load-dir ${top_builddir}/src/gnc-module \
|
||||
--guile-load-dir ${top_builddir}/src/gnome-utils \
|
||||
--guile-load-dir ${top_builddir}/src/report/report-system \
|
||||
--guile-load-dir ${top_builddir}/src/report/utility-reports \
|
||||
--guile-load-dir ${top_builddir}/src/scm \
|
||||
--library-dir ${top_builddir}/src/engine \
|
||||
--library-dir ${top_builddir}/src/libqof/qof \
|
||||
|
@ -87,6 +87,11 @@ libgncmod_report_gnome_gnc_module_init(int refcount)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
lmod ("(gnucash report standard-reports)");
|
||||
lmod ("(gnucash report business-reports)");
|
||||
lmod ("(gnucash report utility-reports)");
|
||||
|
||||
scm_init_sw_report_gnome_module();
|
||||
|
||||
lmod ("(sw_report_gnome)");
|
||||
|
@ -29,6 +29,7 @@
|
||||
(use-modules (gnucash gnc-module))
|
||||
(use-modules (gnucash gnome-utils))
|
||||
(use-modules (gnucash gettext))
|
||||
(use-modules (gnucash report utility-reports))
|
||||
|
||||
(use-modules (gnucash printf))
|
||||
|
||||
@ -43,7 +44,6 @@
|
||||
|
||||
(gnc:module-load "gnucash/gnome-utils" 0)
|
||||
(gnc:module-load "gnucash/report/report-system" 0)
|
||||
(gnc:module-load "gnucash/report/utility-reports" 0)
|
||||
|
||||
(export gnc:report-menu-setup)
|
||||
(export gnc:add-report-template-menu-items)
|
||||
|
@ -25,7 +25,6 @@ GNC_TEST_DEPS = --gnc-module-dir ${top_builddir}/src/engine \
|
||||
--gnc-module-dir ${top_builddir}/src/gnome-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/html \
|
||||
--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/report-gnome \
|
||||
\
|
||||
--guile-load-dir ${top_builddir}/src/gnc-module \
|
||||
@ -35,6 +34,8 @@ GNC_TEST_DEPS = --gnc-module-dir ${top_builddir}/src/engine \
|
||||
--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/business-reports \
|
||||
--guile-load-dir ${top_builddir}/src/report/utility-reports \
|
||||
--guile-load-dir ${top_builddir}/src/report/report-gnome \
|
||||
\
|
||||
|
@ -1,26 +1,6 @@
|
||||
|
||||
ADD_SUBDIRECTORY(test)
|
||||
|
||||
SET(standard_reports_SOURCES gncmod-standard-reports.c)
|
||||
|
||||
ADD_LIBRARY (gncmod-standard-reports ${standard_reports_SOURCES})
|
||||
|
||||
TARGET_LINK_LIBRARIES(gncmod-standard-reports gnc-module ${GTK3_LDFLAGS})
|
||||
|
||||
TARGET_COMPILE_DEFINITIONS(gncmod-standard-reports PRIVATE -DG_LOG_DOMAIN=\"gnc.report.standard\")
|
||||
|
||||
TARGET_INCLUDE_DIRECTORIES(gncmod-standard-reports PRIVATE ${GUILE_INCLUDE_DIRS})
|
||||
|
||||
INSTALL(TARGETS gncmod-standard-reports
|
||||
LIBRARY DESTINATION lib/gnucash
|
||||
ARCHIVE DESTINATION lib/gnucash
|
||||
RUNTIME DESTINATION bin)
|
||||
|
||||
# No headers to install
|
||||
|
||||
|
||||
# Scheme
|
||||
|
||||
SET (standard_reports_SCHEME standard-reports.scm)
|
||||
|
||||
SET (standard_reports_SCHEME_2
|
||||
@ -56,7 +36,7 @@ SET(GUILE_LOAD_DIRS src/app-utils src/engine src/core-utils src/gnc-module sr
|
||||
SET(GUILE_LIBRARY_DIRS src/app-utils src/engine src/core-utils src/gnc-module src/gnome-utils src/report/report-system)
|
||||
SET(GUILE_DEPENDS gncmod-html scm-app-utils scm-gnome-utils scm-report-system scm-report-system-3)
|
||||
|
||||
GNC_ADD_SCHEME_TARGETS(scm-standard-reports
|
||||
GNC_ADD_SCHEME_TARGETS(scm-standard-reports-1
|
||||
"${standard_reports_SCHEME}"
|
||||
"gnucash/report"
|
||||
"${GUILE_MODULES}"
|
||||
@ -76,6 +56,8 @@ GNC_ADD_SCHEME_TARGETS(scm-standard-reports-2
|
||||
TRUE
|
||||
)
|
||||
|
||||
ADD_CUSTOM_TARGET(scm-standard-reports ALL DEPENDS scm-standard-reports-2 scm-standard-reports)
|
||||
|
||||
# FIXME: This is a hack since core-utils assumes an autotools build environment.
|
||||
|
||||
SET(STD_RPT_DIR ${CMAKE_CURRENT_BINARY_DIR}/gnucash/report)
|
||||
@ -85,5 +67,5 @@ FILE(COPY standard-reports.scm DESTINATION ${STD_RPT_DIR})
|
||||
FILE(MAKE_DIRECTORY ${STD_RPT_DIR}/standard-reports)
|
||||
FILE(COPY ${standard_reports_SCHEME_2} DESTINATION ${STD_RPT_DIR}/standard-reports)
|
||||
|
||||
SET_LOCAL_DIST(standard_reports_DIST_local CMakeLists.txt Makefile.am ${standard_reports_SOURCES} ${standard_reports_SCHEME} ${standard_reports_SCHEME_2})
|
||||
SET_LOCAL_DIST(standard_reports_DIST_local CMakeLists.txt Makefile.am ${standard_reports_SCHEME} ${standard_reports_SCHEME_2})
|
||||
SET(standard_reports_DIST ${standard_reports_DIST_local} ${test_standard_reports_DIST} PARENT_SCOPE)
|
||||
|
@ -1,23 +1,5 @@
|
||||
SUBDIRS = . test
|
||||
|
||||
pkglib_LTLIBRARIES = libgncmod-standard-reports.la
|
||||
|
||||
libgncmod_standard_reports_la_SOURCES = \
|
||||
gncmod-standard-reports.c
|
||||
|
||||
libgncmod_standard_reports_la_LDFLAGS = -avoid-version
|
||||
|
||||
libgncmod_standard_reports_la_LIBADD = \
|
||||
${top_builddir}/src/gnc-module/libgnc-module.la \
|
||||
${GUILE_LIBS} \
|
||||
${GLIB_LIBS}
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I${top_srcdir}/src \
|
||||
-I${top_srcdir}/src/gnc-module \
|
||||
${GUILE_CFLAGS} \
|
||||
${GLIB_CFLAGS}
|
||||
|
||||
gncscmmoddir = ${GNC_SCM_INSTALL_DIR}/gnucash/report/
|
||||
gncscmmod_DATA = \
|
||||
standard-reports.scm
|
||||
@ -81,7 +63,6 @@ GUILE_COMPILE_ENV = \
|
||||
--gnc-module-dir ${top_builddir}/src/gnome-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/html \
|
||||
--gnc-module-dir ${top_builddir}/src/report/report-system \
|
||||
--gnc-module-dir ${top_builddir}/src/report/standard-reports \
|
||||
--guile-load-dir ${top_builddir}/src/app-utils \
|
||||
--guile-load-dir ${top_builddir}/src/core-utils \
|
||||
--guile-load-dir ${top_builddir}/src/engine \
|
||||
@ -99,8 +80,7 @@ GUILE_COMPILE_ENV = \
|
||||
--library-dir ${top_builddir}/src/backend/xml \
|
||||
--library-dir ${top_builddir}/src/backend/sql \
|
||||
--library-dir ${top_builddir}/src/html \
|
||||
--library-dir ${top_builddir}/src/report/report-system \
|
||||
--library-dir ${top_builddir}/src/report/standard-reports
|
||||
--library-dir ${top_builddir}/src/report/report-system
|
||||
|
||||
%.go : %.scm .scm-links $(pkglib_LTLIBRARIES)
|
||||
GNC_UNINSTALLED=yes \
|
||||
@ -127,10 +107,9 @@ EXTRA_DIST = \
|
||||
|
||||
CLEANFILES = \
|
||||
.scm-links \
|
||||
${SCM_FILE_LINK} \
|
||||
${gncscmmodcache_DATA} \
|
||||
${gncscmrptcache_DATA}
|
||||
|
||||
DISTCLEANFILES =
|
||||
DISTCLEANFILES = ${SCM_FILE_LINKS}
|
||||
|
||||
AM_CPPFLAGS += -DG_LOG_DOMAIN=\"gnc.report.standard\"
|
||||
AM_CPPFLAGS = -DG_LOG_DOMAIN=\"gnc.report.standard\"
|
||||
|
@ -1,85 +0,0 @@
|
||||
/*********************************************************************
|
||||
* gncmod-standard-reports.c
|
||||
* module definition/initialization for the standard reports
|
||||
*
|
||||
* Copyright (c) 2001 Linux Developers Group, Inc.
|
||||
*********************************************************************/
|
||||
/********************************************************************\
|
||||
* This program is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU General Public License as *
|
||||
* published by the Free Software Foundation; either version 2 of *
|
||||
* the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License*
|
||||
* along with this program; if not, contact: *
|
||||
* *
|
||||
* Free Software Foundation Voice: +1-617-542-5942 *
|
||||
* 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
|
||||
* Boston, MA 02110-1301, USA gnu@gnu.org *
|
||||
* *
|
||||
\********************************************************************/
|
||||
|
||||
|
||||
#include "config.h"
|
||||
#include <gmodule.h>
|
||||
#include <libguile.h>
|
||||
|
||||
#include "gnc-module.h"
|
||||
#include "gnc-module-api.h"
|
||||
|
||||
GNC_MODULE_API_DECL(libgncmod_standard_reports)
|
||||
|
||||
/* version of the gnc module system interface we require */
|
||||
int libgncmod_standard_reports_gnc_module_system_interface = 0;
|
||||
|
||||
/* module versioning uses libtool semantics. */
|
||||
int libgncmod_standard_reports_gnc_module_current = 0;
|
||||
int libgncmod_standard_reports_gnc_module_revision = 0;
|
||||
int libgncmod_standard_reports_gnc_module_age = 0;
|
||||
|
||||
|
||||
char *
|
||||
libgncmod_standard_reports_gnc_module_path(void)
|
||||
{
|
||||
return g_strdup("gnucash/report/standard-reports");
|
||||
}
|
||||
|
||||
char *
|
||||
libgncmod_standard_reports_gnc_module_description(void)
|
||||
{
|
||||
return g_strdup("Standard income, asset, balance sheet, etc. reports");
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_standard_reports_gnc_module_init(int refcount)
|
||||
{
|
||||
/* load the report system */
|
||||
if (!gnc_module_load("gnucash/report/report-system", 0))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* load the report generation scheme code */
|
||||
if (scm_c_eval_string("(use-modules (gnucash report standard-reports))") ==
|
||||
SCM_BOOL_F)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
if (scm_c_eval_string("(use-modules (gnucash report business-reports))") ==
|
||||
SCM_BOOL_F)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_standard_reports_gnc_module_end(int refcount)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
@ -1,9 +1,7 @@
|
||||
CONFIGURE_FILE(test-load-module.in test-load-module @ONLY)
|
||||
GNC_ADD_SCHEME_TEST(test-cash-flow test-cash-flow.scm)
|
||||
GNC_ADD_SCHEME_TEST(test-standard-category-report test-standard-category-report.scm)
|
||||
GNC_ADD_SCHEME_TEST(test-standard-net-barchart test-standard-net-barchart.scm)
|
||||
GNC_ADD_SCHEME_TEST(test-standard-net-linechart test-standard-net-linechart.scm)
|
||||
GNC_ADD_SCHEME_TEST(test-load-module-report-standard-reports test-load-module.in)
|
||||
|
||||
SET(scm_test_standard_reports_SOURCES
|
||||
test-generic-category-report.scm
|
||||
@ -22,5 +20,5 @@ GNC_ADD_SCHEME_TARGETS(scm-test-standard-reports
|
||||
)
|
||||
|
||||
SET_DIST_LIST(test_standard_reports_DIST CMakeLists.txt Makefile.am ${scm_test_standard_reports_SOURCES}
|
||||
test-load-module.in test-cash-flow.scm test-standard-category-report.scm test-standard-net-barchart.scm
|
||||
test-cash-flow.scm test-standard-category-report.scm test-standard-net-barchart.scm
|
||||
test-standard-net-linechart.scm)
|
||||
|
@ -1,6 +1,4 @@
|
||||
MODULE_TESTS=test-load-module
|
||||
|
||||
TESTS = $(SCM_TESTS) $(MODULE_TESTS)
|
||||
TESTS = $(SCM_TESTS)
|
||||
|
||||
SCM_TESTS = \
|
||||
test-cash-flow \
|
||||
@ -19,8 +17,6 @@ GNC_TEST_DEPS = \
|
||||
--gnc-module-dir ${top_builddir}/src/report/app-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/report/report-system \
|
||||
--gnc-module-dir ${top_builddir}/src/report/report-system/test \
|
||||
--gnc-module-dir ${top_builddir}/src/report/standard-reports \
|
||||
--gnc-module-dir ${top_builddir}/src/report/standard-reports/test \
|
||||
\
|
||||
--guile-load-dir ${top_builddir}/src/gnc-module \
|
||||
--guile-load-dir ${top_builddir}/src/scm \
|
||||
@ -35,7 +31,6 @@ GNC_TEST_DEPS = \
|
||||
--guile-load-dir ${top_builddir}/src/report/standard-reports/test \
|
||||
\
|
||||
--library-dir ${top_builddir}/src/report/report-system \
|
||||
--library-dir ${top_builddir}/src/report/standard-reports \
|
||||
--library-dir ${top_builddir}/src/libqof/qof \
|
||||
--library-dir ${top_builddir}/src/core-utils \
|
||||
--library-dir ${top_builddir}/src/app-utils \
|
||||
@ -64,7 +59,6 @@ SCM_TEST_HELPERS = \
|
||||
test-generic-net-linechart.scm
|
||||
|
||||
EXTRA_DIST = \
|
||||
test-load-module \
|
||||
$(SCM_TEST_HELPERS) \
|
||||
$(SCM_TEST_SRCS) \
|
||||
CMakeLists.txt
|
||||
|
@ -1,20 +0,0 @@
|
||||
#! @SHELL@
|
||||
exec ${GUILE} -s "$0"
|
||||
!#
|
||||
|
||||
(display " testing standard report module load ... ")
|
||||
(setenv "GNC_UNINSTALLED" "1")
|
||||
(use-modules (gnucash gnc-module))
|
||||
(gnc:module-system-init)
|
||||
|
||||
(if (gnc:module-load "gnucash/report/standard-reports" 0)
|
||||
(begin
|
||||
(display "ok\n")
|
||||
(exit 0))
|
||||
(begin
|
||||
(display "failed\n")
|
||||
(exit -1)))
|
||||
|
||||
|
||||
|
||||
|
@ -1,30 +1,3 @@
|
||||
ADD_SUBDIRECTORY(test)
|
||||
|
||||
SET(utility_reports_SOURCES
|
||||
gncmod-utility-reports.c
|
||||
)
|
||||
|
||||
ADD_LIBRARY(gncmod-utility-reports MODULE ${utility_reports_SOURCES})
|
||||
|
||||
TARGET_LINK_LIBRARIES(gncmod-utility-reports gnc-module ${GUILE_LDFLAGS} ${GLIB2_LDFLAGS})
|
||||
|
||||
TARGET_COMPILE_DEFINITIONS(gncmod-utility-reports PRIVATE -DG_LOG_DOMAIN=\"gnc.report.util\")
|
||||
|
||||
TARGET_INCLUDE_DIRECTORIES(gncmod-utility-reports
|
||||
PRIVATE ${GUILE_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
SET(LIB_DIR lib/gnucash)
|
||||
IF (WIN32)
|
||||
SET(LIB_DIR bin)
|
||||
ENDIF(WIN32)
|
||||
|
||||
|
||||
INSTALL(TARGETS gncmod-utility-reports
|
||||
LIBRARY DESTINATION ${LIB_DIR}
|
||||
ARCHIVE DESTINATION ${LIB_DIR}
|
||||
RUNTIME DESTINATION bin)
|
||||
|
||||
# Scheme
|
||||
|
||||
SET(utility_reports_SCHEME
|
||||
@ -53,5 +26,5 @@ GNC_ADD_SCHEME_TARGETS(scm-utility-reports
|
||||
)
|
||||
|
||||
SET_LOCAL_DIST(utility_reports_DIST_local CMakeLists.txt Makefile.am
|
||||
${utility_reports_SOURCES} ${utility_reports_SCHEME})
|
||||
${utility_reports_SCHEME})
|
||||
SET(utility_reports_DIST ${utility_reports_DIST_local} ${test_utility_reports_DIST} PARENT_SCOPE)
|
||||
|
@ -1,21 +1,3 @@
|
||||
SUBDIRS = . test
|
||||
|
||||
pkglib_LTLIBRARIES = libgncmod-utility-reports.la
|
||||
|
||||
libgncmod_utility_reports_la_SOURCES = \
|
||||
gncmod-utility-reports.c
|
||||
libgncmod_utility_reports_la_LIBADD = \
|
||||
${top_builddir}/src/gnc-module/libgnc-module.la \
|
||||
${GUILE_LIBS} \
|
||||
${GLIB_LIBS}
|
||||
|
||||
libgncmod_utility_reports_la_LDFLAGS = -module -avoid-version
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I${top_srcdir}/src \
|
||||
-I${top_srcdir}/src/gnc-module \
|
||||
${GUILE_CFLAGS} ${GLIB_CFLAGS}
|
||||
|
||||
gncscmmoddir = ${GNC_SCM_INSTALL_DIR}/gnucash/report/
|
||||
gncscmmod_DATA = \
|
||||
hello-world.scm \
|
||||
@ -53,7 +35,6 @@ GUILE_COMPILE_ENV = \
|
||||
--gnc-module-dir ${top_builddir}/src/gnome-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/html \
|
||||
--gnc-module-dir ${top_builddir}/src/report/report-system \
|
||||
--gnc-module-dir ${top_builddir}/src/report/utility-reports \
|
||||
--guile-load-dir ${top_builddir}/src/app-utils \
|
||||
--guile-load-dir ${top_builddir}/src/core-utils \
|
||||
--guile-load-dir ${top_builddir}/src/engine \
|
||||
@ -71,8 +52,7 @@ GUILE_COMPILE_ENV = \
|
||||
--library-dir ${top_builddir}/src/backend/xml \
|
||||
--library-dir ${top_builddir}/src/backend/sql \
|
||||
--library-dir ${top_builddir}/src/html \
|
||||
--library-dir ${top_builddir}/src/report/report-system \
|
||||
--library-dir ${top_builddir}/src/report/utility-reports
|
||||
--library-dir ${top_builddir}/src/report/report-system
|
||||
|
||||
%.go : %.scm .scm-links $(pkglib_LTLIBRARIES)
|
||||
GNC_UNINSTALLED=yes \
|
||||
@ -94,4 +74,4 @@ EXTRA_DIST = ${gncscmmod_DATA} CMakeLists.txt
|
||||
CLEANFILES = .scm-links ${gncscmmodcache_DATA}
|
||||
DISTCLEANFILES = ${SCM_FILE_LINKS}
|
||||
|
||||
AM_CPPFLAGS += -DG_LOG_DOMAIN=\"gnc.report.util\"
|
||||
AM_CPPFLAGS = -DG_LOG_DOMAIN=\"gnc.report.util\"
|
||||
|
@ -1,81 +0,0 @@
|
||||
/*********************************************************************
|
||||
* gncmod-utility-reports.c
|
||||
* module definition/initialization for the utility reports
|
||||
*
|
||||
* Copyright (c) 2001 Linux Developers Group, Inc.
|
||||
*********************************************************************/
|
||||
/********************************************************************\
|
||||
* This program is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU General Public License as *
|
||||
* published by the Free Software Foundation; either version 2 of *
|
||||
* the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License*
|
||||
* along with this program; if not, contact: *
|
||||
* *
|
||||
* Free Software Foundation Voice: +1-617-542-5942 *
|
||||
* 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
|
||||
* Boston, MA 02110-1301, USA gnu@gnu.org *
|
||||
* *
|
||||
\********************************************************************/
|
||||
|
||||
|
||||
#include "config.h"
|
||||
#include <gmodule.h>
|
||||
#include <libguile.h>
|
||||
|
||||
#include "gnc-module.h"
|
||||
#include "gnc-module-api.h"
|
||||
|
||||
GNC_MODULE_API_DECL(libgncmod_utility_reports)
|
||||
|
||||
/* version of the gnc module system interface we require */
|
||||
int libgncmod_utility_reports_gnc_module_system_interface = 0;
|
||||
|
||||
/* module versioning uses libtool semantics. */
|
||||
int libgncmod_utility_reports_gnc_module_current = 0;
|
||||
int libgncmod_utility_reports_gnc_module_revision = 0;
|
||||
int libgncmod_utility_reports_gnc_module_age = 0;
|
||||
|
||||
|
||||
char *
|
||||
libgncmod_utility_reports_gnc_module_path(void)
|
||||
{
|
||||
return g_strdup("gnucash/report/utility-reports");
|
||||
}
|
||||
|
||||
char *
|
||||
libgncmod_utility_reports_gnc_module_description(void)
|
||||
{
|
||||
return g_strdup("Non-financial (utility) reports");
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_utility_reports_gnc_module_init(int refcount)
|
||||
{
|
||||
/* load the report system */
|
||||
if (!gnc_module_load("gnucash/report/report-system", 0))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* load the report generation scheme code */
|
||||
if (scm_c_eval_string("(use-modules (gnucash report utility-reports))") ==
|
||||
SCM_BOOL_F)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int
|
||||
libgncmod_utility_reports_gnc_module_end(int refcount)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
CONFIGURE_FILE(test-load-module.in test-load-module @ONLY)
|
||||
GNC_ADD_SCHEME_TEST(test-load-module-report-utility-reports
|
||||
test-load-module.in
|
||||
)
|
||||
|
||||
SET_DIST_LIST(test_utility_reports_DIST CMakeLists.txt Makefile.am test-load-module.in)
|
@ -1,35 +0,0 @@
|
||||
TESTS = test-load-module
|
||||
|
||||
GNC_TEST_DEPS = --gnc-module-dir ${top_builddir}/src/engine \
|
||||
--gnc-module-dir ${top_builddir}/src/app-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/gnome-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/html \
|
||||
--gnc-module-dir ${top_builddir}/src/report/report-system \
|
||||
--gnc-module-dir ${top_builddir}/src/report/utility-reports \
|
||||
\
|
||||
--guile-load-dir ${top_builddir}/src/gnc-module \
|
||||
--guile-load-dir ${top_builddir}/src/scm \
|
||||
--guile-load-dir ${top_builddir}/src/engine \
|
||||
--guile-load-dir ${top_builddir}/src/core-utils \
|
||||
--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/utility-reports \
|
||||
\
|
||||
--library-dir ${top_builddir}/src/report/report-system \
|
||||
--library-dir ${top_builddir}/src/libqof/qof \
|
||||
--library-dir ${top_builddir}/src/core-utils \
|
||||
--library-dir ${top_builddir}/src/app-utils \
|
||||
--library-dir ${top_builddir}/src/gnome-utils \
|
||||
--library-dir ${top_builddir}/src/engine \
|
||||
--library-dir ${top_builddir}/src/backend/xml \
|
||||
--library-dir ${top_builddir}/src/backend/sql \
|
||||
--library-dir ${top_builddir}/src/gnc-module
|
||||
|
||||
TESTS_ENVIRONMENT = \
|
||||
GUILE_WARN_DEPRECATED=no \
|
||||
GUILE="${GUILE}" \
|
||||
GNC_BUILDDIR="${abs_top_builddir}" \
|
||||
$(shell ${abs_top_srcdir}/src/gnc-test-env.pl --noexports ${GNC_TEST_DEPS})
|
||||
|
||||
EXTRA_DIST = test-load-module CMakeLists.txt
|
@ -1,20 +0,0 @@
|
||||
#! @SHELL@
|
||||
exec ${GUILE} -s "$0"
|
||||
!#
|
||||
|
||||
(display " testing utility report module load ... ")
|
||||
(setenv "GNC_UNINSTALLED" "1")
|
||||
(use-modules (gnucash gnc-module))
|
||||
(gnc:module-system-init)
|
||||
|
||||
(if (gnc:module-load "gnucash/report/utility-reports" 0)
|
||||
(begin
|
||||
(display "ok\n")
|
||||
(exit 0))
|
||||
(begin
|
||||
(display "failed\n")
|
||||
(exit -1)))
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user