diff --git a/bindings/CMakeLists.txt b/bindings/CMakeLists.txt index 99e2ca73b8..6510379562 100644 --- a/bindings/CMakeLists.txt +++ b/bindings/CMakeLists.txt @@ -6,6 +6,5 @@ set_local_dist(bindings_DIST_local business-core.i core-utils.i engine.i - engine-common.i - gnc-module.i) + engine-common.i) set(bindings_DIST ${bindings_DIST_local} ${guile_DIST} ${python_bindings_DIST} PARENT_SCOPE) diff --git a/bindings/gnc-module.i b/bindings/gnc-module.i deleted file mode 100644 index e3913b7288..0000000000 --- a/bindings/gnc-module.i +++ /dev/null @@ -1,39 +0,0 @@ -/********************************************************************\ - * 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 * - * * -\********************************************************************/ - -%module sw_gnc_module -%{ -#include -%} -#if defined(SWIGGUILE) -%{ -#include "guile-mappings.h" - -SCM scm_init_sw_gnc_module_module (void); -%} -#endif - -%import "base-typemaps.i" - -void gnc_module_system_init(void); -void gnc_module_system_refresh(void); -GNCModule gnc_module_load(gchar * module_name, gint interface); -GNCModule gnc_module_load_optional(gchar * module_name, gint interface); -int gnc_module_unload(GNCModule mod); diff --git a/bindings/guile/CMakeLists.txt b/bindings/guile/CMakeLists.txt index ced12f94d1..6237635e33 100644 --- a/bindings/guile/CMakeLists.txt +++ b/bindings/guile/CMakeLists.txt @@ -20,15 +20,6 @@ gnc_add_swig_guile_command (swig-engine-c ${CMAKE_SOURCE_DIR}/bindings/engine-common.i ) -# Command to generate the swig-gnc-module.c wrapper file -gnc_swig_extract_header_files (gnc-module GNC_MODULE_HEADERS) -gnc_add_swig_guile_command (swig-gnc-module-c - SWIG_GNC_MODULE_C swig-gnc-module.c - ${CMAKE_SOURCE_DIR}/bindings/gnc-module.i - "${CMAKE_CURRENT_SOURCE_DIR};${CMAKE_SOURCE_DIR}/libgnucash/gnc-module" - ${GNC_MODULE_HEADERS} -) - set(guile_HEADERS glib-guile.h gnc-engine-guile.h @@ -46,8 +37,7 @@ add_library(gnucash-guile SHARED ${guile_SOURCES} ${guile_HEADERS} ${SWIG_CORE_UTILS_GUILE_C} - ${SWIG_ENGINE_C} - ${SWIG_GNC_MODULE_C}) + ${SWIG_ENGINE_C}) add_dependencies(gnucash-guile swig-runtime-h) @@ -67,7 +57,6 @@ target_link_libraries(gnucash-guile PRIVATE gnc-core-utils gnc-engine - gnc-module ${GLIB2_LDFLAGS}) install(TARGETS gnucash-guile @@ -139,7 +128,6 @@ gnc_add_scheme_targets(scm-engine-2 add_custom_target(scm-engine ALL DEPENDS scm-engine-2 scm-engine-1 scm-engine-0) set(scm_gnc_module_DEPENDS - gnc-module gnucash-guile) gnc_add_scheme_targets(scm-gnc-module diff --git a/bindings/guile/gnc-guile-bindings.c b/bindings/guile/gnc-guile-bindings.c index 424d31daf0..4d40df5cdf 100644 --- a/bindings/guile/gnc-guile-bindings.c +++ b/bindings/guile/gnc-guile-bindings.c @@ -34,7 +34,6 @@ static int is_initialized = 0; extern SCM scm_init_sw_core_utils_module (void); extern SCM scm_init_sw_engine_module (void); -extern SCM scm_init_sw_gnc_module_module (void); void gnc_guile_bindings_init(void) @@ -44,7 +43,6 @@ gnc_guile_bindings_init(void) /* Do what's necessary to initialize the bindings */ scm_init_sw_core_utils_module(); scm_init_sw_engine_module(); - scm_init_sw_gnc_module_module(); is_initialized = 1; } diff --git a/bindings/guile/gnc-module.scm b/bindings/guile/gnc-module.scm index 9785e8bae8..d47cff6f2f 100644 --- a/bindings/guile/gnc-module.scm +++ b/bindings/guile/gnc-module.scm @@ -27,23 +27,50 @@ (define-module (gnucash gnc-module)) -;; Guile 2 needs to find the symbols from the extension at compile time already -(eval-when - (compile load eval expand) - (load-extension "libgnucash-guile" "gnc_guile_bindings_init")) -(use-modules (sw_gnc_module)) +(define (no-op-deprecation-warning) + (issue-deprecation-warning "* WARNING * Guile wrappers for the gnc module system have been deprecated.") + (issue-deprecation-warning "This particular function call is now a no-op. Please use equivalent (use-modules ...) calls instead.")) -; Export the swig-wrapped symbols in the public interface of this module -(let ((i (module-public-interface (current-module)))) - (module-use! i (resolve-interface '(sw_gnc_module)))) - -(define-public gnc:module-system-init gnc-module-system-init) -(define-public gnc:module-system-refresh gnc-module-system-refresh) -(define-public gnc:module-load gnc-module-load) -(define-public gnc:module-load-optional gnc-module-load-optional) -(define-public gnc:module-unload gnc-module-unload) - -;; Guile 2 needs to load external modules at compile time -(define-syntax-rule (gnc:module-begin-syntax form ...) - (eval-when (load compile eval expand) (begin form ...))) -(export gnc:module-begin-syntax) +(define-public (gnc:module-system-init) + (no-op-deprecation-warning)) +(define-public (gnc:module-system-refresh) + (no-op-deprecation-warning)) +(define-public (gnc:module-load-optional) + (no-op-deprecation-warning)) +(define-public (gnc:module-unload) + (no-op-deprecation-warning)) +(define-public (gnc:module-load gnc-mod-name mod-sys-version) + (let* ((mod-name-split (string-split gnc-mod-name #\/)) + (mod-name-str (string-join mod-name-split " ")) + (scm-mod-name (map string->symbol mod-name-split))) + (cond + ((string=? gnc-mod-name "gnucash/app-utils") + (issue-deprecation-warning "* WARNING * 'gnc:module-load (\"gnucash/app-utils\" 0)' has been deprecated and will be removed in gnucash 5.0.") + (issue-deprecation-warning "Use '(use-modules (gnucash engine)(gnucash app-utils))' instead.") + (issue-deprecation-warning "Use of the '(gnucash engine)' guile module is optional and depends on whether or not you use functions from this module in your code or not.") + (use-modules (gnucash engine)(gnucash app-utils))) + ((or + (string=? gnc-mod-name "gnucash/tax/de_DE") + (string=? gnc-mod-name "gnucash/tax/us")) + (set! scm-mod-name (list 'gnucash 'locale (list-ref scm-mod-name 2) 'tax)) + (set! mod-name-str (string-join (map symbol->string scm-mod-name) " ")) + (issue-deprecation-warning (string-concatenate (list "* WARNING * '(gnc:module-load \"" gnc-mod-name "\" 0)' has been deprecated."))) + (issue-deprecation-warning (string-concatenate (list "Use '(use-modules (" mod-name-str "))' instead."))) + (module-use! (current-module) (resolve-interface scm-mod-name))) + ((or + (string=? gnc-mod-name "gnucash/gnome-utils") + (string=? gnc-mod-name "gnucash/html") + (string=? gnc-mod-name "gnucash/report/report-system")) + (when (string=? gnc-mod-name"gnucash/report/report-system") + (set! mod-name-str "gnucash report")) + (set! scm-mod-name (list 'gnucash 'report)) + (issue-deprecation-warning (string-concatenate (list "* WARNING * '(gnc:module-load \"" gnc-mod-name "\" 0)' has been deprecated."))) + (issue-deprecation-warning (string-concatenate (list "Use '(use-modules (gnucash engine)(gnucash app-utils)(" mod-name-str "))' instead."))) + (issue-deprecation-warning "Use of the '(gnucash engine)' or '(gnucash app-utils)' guile modules is optional and depends on whether or not you use functions from this module in your code or not.") + (use-modules (gnucash engine)(gnucash app-utils)) + (module-use! (current-module) (resolve-interface scm-mod-name))) + (else + (issue-deprecation-warning (string-concatenate (list "* WARNING * '(gnc:module-load \"" gnc-mod-name "\" 0)' has been deprecated."))) + (issue-deprecation-warning (string-concatenate ( list "Use '(use-modules (" mod-name-str "))' instead."))) + (issue-deprecation-warning "Additional guile modules may have to be loaded depending on your specific code.") + (module-use! (current-module) (resolve-interface scm-mod-name)))))) diff --git a/bindings/guile/test/CMakeLists.txt b/bindings/guile/test/CMakeLists.txt index 17be2b82c2..41485785bb 100644 --- a/bindings/guile/test/CMakeLists.txt +++ b/bindings/guile/test/CMakeLists.txt @@ -1,9 +1,5 @@ # C(++) tests requiring a proper guile environment set up -add_subdirectory(mod-foo) -add_subdirectory(mod-bar) -add_subdirectory(mod-baz) - set(ENGINE_TEST_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/libgnucash/backend/xml ${CMAKE_SOURCE_DIR}/libgnucash/engine @@ -115,43 +111,6 @@ if (HAVE_SRFI64) endif (HAVE_SRFI64) - -set (test_gnc_module_SCHEME - test-gnc-module-scm-init.scm - test-gnc-module-load-scm.scm - test-gnc-module-swigged-c.scm - test-gnc-module-load-deps.scm - test-gnc-module-scm-dynload.scm - test-gnc-module-scm-module.scm - test-gnc-module-scm-multi.scm -) - -set (test_gnc_module_DEPENDS - scm-gnc-module - scm-test-core - scm-mod-foo - gncmod-bar - scm-mod-baz -) - -gnc_add_scheme_test_targets (test-gnc-modules-scm - "${test_gnc_module_SCHEME}" - "tests" - "${test_gnc_module_DEPENDS}" - TRUE -) -gnc_add_scheme_tests ("${test_gnc_module_SCHEME}") -if(NOT WIN32) - # This little dance is needed because gnc_module_init will assert if - # it finds libgncmod-futuremod.so outside of a test that expects it. - get_guile_env() - set(_GNC_MODULE_PATH "${LIBDIR_BUILD}:${LIBDIR_BUILD}/gnucash:${LIBDIR_BUILD}/gnucash/test") - foreach(test_file ${test_gnc_module_SCHEME}) - get_filename_component(basename ${test_file} NAME_WE) - set_tests_properties(${basename} PROPERTIES ENVIRONMENT "${GUILE_ENV};GNC_MODULE_PATH=${_GNC_MODULE_PATH}") - endforeach() -endif() - set(test_engine_SCHEME_DIST srfi64-extras.scm ${bindings_test_SCHEME} @@ -164,14 +123,10 @@ set_local_dist(test_guile_DIST_local CMakeLists.txt test-scm-query.cpp ${test_engine_SCHEME_DIST} - ${test_gnc_module_SCHEME} ${test_scm_SCHEME} ) set(test_guile_DIST ${test_guile_DIST_local} - ${mod_bar_DIST} - ${mod_baz_DIST} - ${mod_foo_DIST} PARENT_SCOPE ) diff --git a/bindings/guile/test/mod-bar/CMakeLists.txt b/bindings/guile/test/mod-bar/CMakeLists.txt deleted file mode 100644 index 3b70c9f3ed..0000000000 --- a/bindings/guile/test/mod-bar/CMakeLists.txt +++ /dev/null @@ -1,35 +0,0 @@ - -gnc_add_swig_guile_command (swig-bar-c - SWIG_BAR_C swig-bar.c - ${CMAKE_CURRENT_SOURCE_DIR}/bar.i "" bar.h -) - -add_library(bar EXCLUDE_FROM_ALL bar.c bar.h) -add_library(gncmod-bar EXCLUDE_FROM_ALL gnc-mod-bar.c) -set_source_files_properties (gnc-mod-bar.c PROPERTY OBJECT_DEPENDS ${SWIG_BAR_C}) - -target_link_libraries(gncmod-bar bar gnc-module) -target_include_directories(gncmod-bar PRIVATE - ${CMAKE_BINARY_DIR}/common - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_SOURCE_DIR}/common - ${CMAKE_SOURCE_DIR}/libgnucash/gnc-module - ${GLIB2_INCLUDE_DIRS} - ${GUILE_INCLUDE_DIRS} -) - -gnc_add_scheme_test_targets(scm-mod-bar - gnucash/bar.scm - "tests/gnucash" - gncmod-bar - FALSE - ) - -set_target_properties(bar gncmod-bar PROPERTIES - LIBRARY_OUTPUT_DIRECTORY ${LIBDIR_BUILD}/gnucash/test - ARCHIVE_OUTPUT_DIRECTORY ${LIBDIR_BUILD}/gnucash/test - RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/test - ) - -set_dist_list(mod_bar_DIST CMakeLists.txt bar.c gnucash/bar.scm bar.h bar.i gnc-mod-bar.c) diff --git a/bindings/guile/test/mod-bar/bar.c b/bindings/guile/test/mod-bar/bar.c deleted file mode 100644 index 9c45f6b875..0000000000 --- a/bindings/guile/test/mod-bar/bar.c +++ /dev/null @@ -1,33 +0,0 @@ -/* libfoo. this is a dependency-free client library, equivalent to - * the engine or some other core component that's ignorant of guile - * and the module system */ -/********************************************************************\ - * 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 - -#include "bar.h" - -int -bar_hello(void) -{ - return 1; -} diff --git a/bindings/guile/test/mod-bar/bar.h b/bindings/guile/test/mod-bar/bar.h deleted file mode 100644 index e52398f994..0000000000 --- a/bindings/guile/test/mod-bar/bar.h +++ /dev/null @@ -1,28 +0,0 @@ -/* bar.h: header for a dependency-free, guile-free client lib */ -/********************************************************************\ - * This program is free software; you can redistribute it and/or * - * modify it under the terms of the GNU General Public License as * - * published by the Free Software Foundation; either version 2 of * - * the License, or (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License* - * along with this program; if not, contact: * - * * - * Free Software Foundation Voice: +1-617-542-5942 * - * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 * - * Boston, MA 02110-1301, USA gnu@gnu.org * - * * -\********************************************************************/ - - -#ifndef BAR_H -#define BAR_H - -int bar_hello(void); - -#endif diff --git a/bindings/guile/test/mod-bar/bar.i b/bindings/guile/test/mod-bar/bar.i deleted file mode 100644 index 5e3666f9de..0000000000 --- a/bindings/guile/test/mod-bar/bar.i +++ /dev/null @@ -1,33 +0,0 @@ -/********************************************************************\ - * 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 * - * * -\********************************************************************/ - -%module sw_bar -%{ -#include -%} -#if defined(SWIGGUILE) -%{ -#include "guile-mappings.h" - -SCM scm_init_sw_bar_module (void); -%} -#endif - -int bar_hello(void); diff --git a/bindings/guile/test/mod-bar/gnc-mod-bar.c b/bindings/guile/test/mod-bar/gnc-mod-bar.c deleted file mode 100644 index a5fba1001d..0000000000 --- a/bindings/guile/test/mod-bar/gnc-mod-bar.c +++ /dev/null @@ -1,63 +0,0 @@ -/* gnc-mod-bar.c : the Gnucash plugin that wraps the library - * 'libbar.so'. it does this by being linked against libbar.so */ -/********************************************************************\ - * 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 -#include -#include -#include - -#include "gnc-module-api.h" -#include "swig-bar.c" - -GNC_MODULE_API_DECL(libgncmod_bar) - -int libgncmod_bar_gnc_module_system_interface = 0; - -int libgncmod_bar_gnc_module_current = 0; -int libgncmod_bar_gnc_module_age = 0; -int libgncmod_bar_gnc_module_revision = 0; - -char * -libgncmod_bar_gnc_module_path(void) -{ - return g_strdup("gnucash/bar"); -} - -char * -libgncmod_bar_gnc_module_description(void) -{ - return g_strdup("this is a bar module"); -} - -int -libgncmod_bar_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; -} diff --git a/bindings/guile/test/mod-bar/gnucash/bar.scm b/bindings/guile/test/mod-bar/gnucash/bar.scm deleted file mode 100644 index 881190bea6..0000000000 --- a/bindings/guile/test/mod-bar/gnucash/bar.scm +++ /dev/null @@ -1,31 +0,0 @@ -;; test of a Scheme module called gnc-mod-bar, which should get -;; loaded by the Gnucash module "bar" -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; 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 -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - - -(define-module (gnucash bar)) - -(export bar:scheme-hello) - -(define (bar:scheme-hello) - #t) - - - diff --git a/bindings/guile/test/mod-baz/CMakeLists.txt b/bindings/guile/test/mod-baz/CMakeLists.txt deleted file mode 100644 index 04ef81f9a6..0000000000 --- a/bindings/guile/test/mod-baz/CMakeLists.txt +++ /dev/null @@ -1,40 +0,0 @@ - -gnc_add_swig_guile_command (swig-baz-c - SWIG_BAZ_C swig-baz.c - ${CMAKE_CURRENT_SOURCE_DIR}/baz.i "" baz.h -) - -add_library(baz EXCLUDE_FROM_ALL baz.c baz.h) -target_include_directories(baz PRIVATE - ${CMAKE_SOURCE_DIR}/bindings/guile/test/mod-foo -) -target_link_libraries(baz foo) - - -add_library(gncmod-baz EXCLUDE_FROM_ALL gnc-mod-baz.c) -set_source_files_properties (gnc-mod-baz.c PROPERTY OBJECT_DEPENDS ${SWIG_BAZ_C}) - -target_link_libraries(gncmod-baz baz gnc-module) -target_include_directories(gncmod-baz PRIVATE - ${CMAKE_BINARY_DIR}/common - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_SOURCE_DIR}/common - ${CMAKE_SOURCE_DIR}/libgnucash/gnc-module - ${GLIB2_INCLUDE_DIRS} - ${GUILE_INCLUDE_DIRS} -) - -gnc_add_scheme_test_targets(scm-mod-baz - gnucash/baz.scm - "tests/gnucash" - gncmod-baz - FALSE - ) - -set_target_properties(baz gncmod-baz PROPERTIES -LIBRARY_OUTPUT_DIRECTORY ${LIBDIR_BUILD}/gnucash/test -ARCHIVE_OUTPUT_DIRECTORY ${LIBDIR_BUILD}/gnucash/test -RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/test) - -set_dist_list(mod_baz_DIST CMakeLists.txt baz.c gnucash/baz.scm baz.h baz.i gnc-mod-baz.c) diff --git a/bindings/guile/test/mod-baz/baz.c b/bindings/guile/test/mod-baz/baz.c deleted file mode 100644 index 1c809954b8..0000000000 --- a/bindings/guile/test/mod-baz/baz.c +++ /dev/null @@ -1,34 +0,0 @@ -/* libbaz. this library depends on foo */ -/********************************************************************\ - * 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 - -#include "baz.h" -#include "foo.h" - -int -baz_hello(void) -{ - foo_hello(); - return 1; -} - diff --git a/bindings/guile/test/mod-baz/baz.h b/bindings/guile/test/mod-baz/baz.h deleted file mode 100644 index 3aaa6760ab..0000000000 --- a/bindings/guile/test/mod-baz/baz.h +++ /dev/null @@ -1,28 +0,0 @@ -/* baz.h: header for a dependency-free, guile-free client lib */ -/********************************************************************\ - * This program is free software; you can redistribute it and/or * - * modify it under the terms of the GNU General Public License as * - * published by the Free Software Foundation; either version 2 of * - * the License, or (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License* - * along with this program; if not, contact: * - * * - * Free Software Foundation Voice: +1-617-542-5942 * - * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 * - * Boston, MA 02110-1301, USA gnu@gnu.org * - * * -\********************************************************************/ - - -#ifndef BAZ_H -#define BAZ_H - -int baz_hello(void); - -#endif diff --git a/bindings/guile/test/mod-baz/baz.i b/bindings/guile/test/mod-baz/baz.i deleted file mode 100644 index e16ec52de1..0000000000 --- a/bindings/guile/test/mod-baz/baz.i +++ /dev/null @@ -1,33 +0,0 @@ -/********************************************************************\ - * 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 * - * * -\********************************************************************/ - -%module sw_baz -%{ -#include -%} -#if defined(SWIGGUILE) -%{ -#include "guile-mappings.h" - -SCM scm_init_sw_baz_module (void); -%} -#endif - -int baz_hello(void); diff --git a/bindings/guile/test/mod-baz/gnc-mod-baz.c b/bindings/guile/test/mod-baz/gnc-mod-baz.c deleted file mode 100644 index d15442d6de..0000000000 --- a/bindings/guile/test/mod-baz/gnc-mod-baz.c +++ /dev/null @@ -1,72 +0,0 @@ -/* gnc-mod-baz.c : the Gnucash plugin that wraps the library - * 'libbaz.so'. it does this by being linked against libbaz.so */ -/********************************************************************\ - * 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 -#include -#include -#include - -#include "gnc-module.h" -#include "gnc-module-api.h" -#include "swig-baz.c" - -GNC_MODULE_API_DECL(libgncmod_baz) - -int libgncmod_baz_gnc_module_system_interface = 0; - -int libgncmod_baz_gnc_module_current = 0; -int libgncmod_baz_gnc_module_age = 0; -int libgncmod_baz_gnc_module_revision = 0; - -char * -libgncmod_baz_gnc_module_path(void) -{ - return g_strdup("gnucash/baz"); -} - -char * -libgncmod_baz_gnc_module_description(void) -{ - return g_strdup("this is the baz module"); -} - -int -libgncmod_baz_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))"); - - return TRUE; - } - else - { - return FALSE; - } -} diff --git a/bindings/guile/test/mod-baz/gnucash/baz.scm b/bindings/guile/test/mod-baz/gnucash/baz.scm deleted file mode 100644 index 7b38f35395..0000000000 --- a/bindings/guile/test/mod-baz/gnucash/baz.scm +++ /dev/null @@ -1,31 +0,0 @@ -;; test of a Scheme module called gnc-mod-baz, which should get -;; loaded by the Gnucash module "baz" -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; 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 -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - - -(define-module (gnucash baz)) - -(export baz:scheme-hello) - -(define (baz:scheme-hello) - #t) - - - diff --git a/bindings/guile/test/mod-foo/CMakeLists.txt b/bindings/guile/test/mod-foo/CMakeLists.txt deleted file mode 100644 index 6de0b79d90..0000000000 --- a/bindings/guile/test/mod-foo/CMakeLists.txt +++ /dev/null @@ -1,34 +0,0 @@ - -gnc_add_swig_guile_command (swig-foo-c - SWIG_FOO_C swig-foo.c - ${CMAKE_CURRENT_SOURCE_DIR}/foo.i "" foo.h -) - -add_library(foo EXCLUDE_FROM_ALL foo.c foo.h) -add_library(gncmod-foo EXCLUDE_FROM_ALL gnc-mod-foo.c) -set_source_files_properties (gnc-mod-foo.c PROPERTY OBJECT_DEPENDS ${SWIG_FOO_C}) - -target_link_libraries(gncmod-foo foo gnc-module) -target_include_directories(gncmod-foo PRIVATE - ${CMAKE_BINARY_DIR}/common - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_SOURCE_DIR}/common - ${CMAKE_SOURCE_DIR}/libgnucash/gnc-module - ${GLIB2_INCLUDE_DIRS} - ${GUILE_INCLUDE_DIRS} -) - -gnc_add_scheme_test_targets(scm-mod-foo - gnucash/foo.scm - "tests/gnucash" - gncmod-foo - FALSE - ) - -set_target_properties(foo gncmod-foo PROPERTIES -LIBRARY_OUTPUT_DIRECTORY ${LIBDIR_BUILD}/gnucash/test -ARCHIVE_OUTPUT_DIRECTORY ${LIBDIR_BUILD}/gnucash/test -RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/test) - -set_dist_list(mod_foo_DIST CMakeLists.txt foo.i gnucash/foo.scm foo.c foo.h gnc-mod-foo.c) diff --git a/bindings/guile/test/mod-foo/foo.c b/bindings/guile/test/mod-foo/foo.c deleted file mode 100644 index 889f61f420..0000000000 --- a/bindings/guile/test/mod-foo/foo.c +++ /dev/null @@ -1,33 +0,0 @@ -/* libfoo. this is a dependency-free client library, equivalent to - * the engine or some other core component that's ignorant of guile - * and the module system */ -/********************************************************************\ - * 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 - -#include "foo.h" - -int -foo_hello(void) -{ - return 10; -} diff --git a/bindings/guile/test/mod-foo/foo.h b/bindings/guile/test/mod-foo/foo.h deleted file mode 100644 index b462323bf5..0000000000 --- a/bindings/guile/test/mod-foo/foo.h +++ /dev/null @@ -1,28 +0,0 @@ -/* foo.h: header for a dependency-free, guile-free client lib */ -/********************************************************************\ - * This program is free software; you can redistribute it and/or * - * modify it under the terms of the GNU General Public License as * - * published by the Free Software Foundation; either version 2 of * - * the License, or (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License* - * along with this program; if not, contact: * - * * - * Free Software Foundation Voice: +1-617-542-5942 * - * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 * - * Boston, MA 02110-1301, USA gnu@gnu.org * - * * -\********************************************************************/ - - -#ifndef FOO_H -#define FOO_H - -int foo_hello(void); - -#endif diff --git a/bindings/guile/test/mod-foo/foo.i b/bindings/guile/test/mod-foo/foo.i deleted file mode 100644 index 5c883a7122..0000000000 --- a/bindings/guile/test/mod-foo/foo.i +++ /dev/null @@ -1,33 +0,0 @@ -/********************************************************************\ - * 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 * - * * -\********************************************************************/ - -%module sw_foo -%{ -#include -%} -#if defined(SWIGGUILE) -%{ -#include "guile-mappings.h" - -SCM scm_init_sw_foo_module (void); -%} -#endif - -int foo_hello(void); diff --git a/bindings/guile/test/mod-foo/gnc-mod-foo.c b/bindings/guile/test/mod-foo/gnc-mod-foo.c deleted file mode 100644 index f41cc9549d..0000000000 --- a/bindings/guile/test/mod-foo/gnc-mod-foo.c +++ /dev/null @@ -1,63 +0,0 @@ -/* gnc-mod-foo.c : the Gnucash plugin that wraps the library - * 'libfoo.so'. it does this by being linked against libfoo.so */ -/********************************************************************\ - * 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 -#include -#include -#include - -#include "gnc-module-api.h" -#include "swig-foo.c" - -GNC_MODULE_API_DECL(libgncmod_foo) - -int libgncmod_foo_gnc_module_system_interface = 0; - -int libgncmod_foo_gnc_module_current = 0; -int libgncmod_foo_gnc_module_age = 0; -int libgncmod_foo_gnc_module_revision = 0; - -char * -libgncmod_foo_gnc_module_path(void) -{ - return g_strdup("gnucash/foo"); -} - -char * -libgncmod_foo_gnc_module_description(void) -{ - return g_strdup("this is a foo module"); -} - -int -libgncmod_foo_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; -} diff --git a/bindings/guile/test/mod-foo/gnucash/foo.scm b/bindings/guile/test/mod-foo/gnucash/foo.scm deleted file mode 100644 index 6d2d1c666f..0000000000 --- a/bindings/guile/test/mod-foo/gnucash/foo.scm +++ /dev/null @@ -1,31 +0,0 @@ -;; test of a Scheme module called gnc-mod-foo, which should get -;; loaded by the Gnucash module "foo" -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; 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 -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - - -(define-module (gnucash foo)) - -(export foo:scheme-hello) - -(define (foo:scheme-hello) - #t) - - - diff --git a/bindings/guile/test/test-create-account.scm b/bindings/guile/test/test-create-account.scm index d816d2bc4c..b972289818 100644 --- a/bindings/guile/test/test-create-account.scm +++ b/bindings/guile/test/test-create-account.scm @@ -20,12 +20,10 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(use-modules (gnucash gnc-module)) (use-modules (gnucash engine)) (define (run-test) (setenv "GNC_UNINSTALLED" "1") - (gnc:module-system-init) (let* ((session (qof-session-new)) (book (qof-session-get-book session)) diff --git a/bindings/guile/test/test-gnc-module-load-deps.scm b/bindings/guile/test/test-gnc-module-load-deps.scm deleted file mode 100755 index 16a55ced0e..0000000000 --- a/bindings/guile/test/test-gnc-module-load-deps.scm +++ /dev/null @@ -1,11 +0,0 @@ -(use-modules (gnucash gnc-module)) - -(gnc:module-system-init) -(gnc:module-load "gnucash/baz" 0) - -(baz-hello) -(foo-hello) -(baz:scheme-hello) -(foo:scheme-hello) - -(exit 0) diff --git a/bindings/guile/test/test-gnc-module-load-scm.scm b/bindings/guile/test/test-gnc-module-load-scm.scm deleted file mode 100755 index 37443f081c..0000000000 --- a/bindings/guile/test/test-gnc-module-load-scm.scm +++ /dev/null @@ -1,6 +0,0 @@ -(use-modules (gnucash gnc-module)) - -(gnc:module-system-init) -(gnc:module-load "gnucash/foo" 0) - -(exit 0) diff --git a/bindings/guile/test/test-gnc-module-scm-dynload.scm b/bindings/guile/test/test-gnc-module-scm-dynload.scm deleted file mode 100755 index 8d7a82a748..0000000000 --- a/bindings/guile/test/test-gnc-module-scm-dynload.scm +++ /dev/null @@ -1,2 +0,0 @@ -(dynamic-link "libgnc-module") -(exit 0) diff --git a/bindings/guile/test/test-gnc-module-scm-init.scm b/bindings/guile/test/test-gnc-module-scm-init.scm deleted file mode 100755 index 7a6685ac8a..0000000000 --- a/bindings/guile/test/test-gnc-module-scm-init.scm +++ /dev/null @@ -1,5 +0,0 @@ -(use-modules (gnucash gnc-module)) - -(gnc:module-system-init) - -(exit 0) diff --git a/bindings/guile/test/test-gnc-module-scm-module.scm b/bindings/guile/test/test-gnc-module-scm-module.scm deleted file mode 100755 index 47e7dc4308..0000000000 --- a/bindings/guile/test/test-gnc-module-scm-module.scm +++ /dev/null @@ -1,6 +0,0 @@ -(use-modules (gnucash gnc-module)) - -(gnc:module-system-init) -(if (not (gnc:module-load "gnucash/foo" 0)) (exit -1)) - -(exit (foo:scheme-hello)) diff --git a/bindings/guile/test/test-gnc-module-scm-multi.scm b/bindings/guile/test/test-gnc-module-scm-multi.scm deleted file mode 100755 index edebd9becf..0000000000 --- a/bindings/guile/test/test-gnc-module-scm-multi.scm +++ /dev/null @@ -1,14 +0,0 @@ -(use-modules (gnucash gnc-module)) - -(gnc:module-system-init) -(gnc:module-load "gnucash/foo" 0) -(foo-hello) -(foo:scheme-hello) - -(gnc:module-load "gnucash/bar" 0) -(foo-hello) -(foo:scheme-hello) -(bar-hello) -(bar:scheme-hello) - -(exit 0) diff --git a/bindings/guile/test/test-gnc-module-swigged-c.scm b/bindings/guile/test/test-gnc-module-swigged-c.scm deleted file mode 100755 index a74e68ff33..0000000000 --- a/bindings/guile/test/test-gnc-module-swigged-c.scm +++ /dev/null @@ -1,5 +0,0 @@ -(use-modules (gnucash gnc-module)) - -(gnc:module-system-init) -(gnc:module-load "gnucash/foo" 0) -(exit (eq? 10 (foo-hello))) diff --git a/bindings/guile/test/test-scm-query-import.scm b/bindings/guile/test/test-scm-query-import.scm index 9f30797a38..ace8885bd4 100644 --- a/bindings/guile/test/test-scm-query-import.scm +++ b/bindings/guile/test/test-scm-query-import.scm @@ -20,12 +20,10 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(use-modules (gnucash gnc-module)) (use-modules (gnucash engine)) (define (run-test) (setenv "GNC_UNINSTALLED" "1") - (gnc:module-system-init) (display "\tTesting the Query Import interface... \n") (display "\tYou may see \"Error: xaccQueryAddGUIDMatch: Invalid match type\".\n") diff --git a/common/cmake_modules/GncAddTest.cmake b/common/cmake_modules/GncAddTest.cmake index 5a0ca004fc..caa918f9c2 100644 --- a/common/cmake_modules/GncAddTest.cmake +++ b/common/cmake_modules/GncAddTest.cmake @@ -32,9 +32,6 @@ function(get_guile_env) list(APPEND env "GUILE=${GUILE_EXECUTABLE}") set(guile_load_paths "") - list(APPEND guile_load_paths "${CMAKE_CURRENT_SOURCE_DIR}/mod-foo") - list(APPEND guile_load_paths "${CMAKE_CURRENT_SOURCE_DIR}/mod-bar") - list(APPEND guile_load_paths "${CMAKE_CURRENT_SOURCE_DIR}/mod-baz") #list(APPEND guile_load_paths "${CMAKE_BINARY_DIR}/${GUILE_REL_SITEDIR}") list(APPEND guile_load_paths "${CMAKE_BINARY_DIR}/${GUILE_REL_SITEDIR}/gnucash/deprecated") # Path to gnucash' deprecated modules set(guile_load_path "${guile_load_paths}") diff --git a/gnucash/gnome-utils/test/test-load-gnome-utils-module.scm b/gnucash/gnome-utils/test/test-load-gnome-utils-module.scm index 530eb66b51..8eaab5595d 100755 --- a/gnucash/gnome-utils/test/test-load-gnome-utils-module.scm +++ b/gnucash/gnome-utils/test/test-load-gnome-utils-module.scm @@ -1,14 +1,21 @@ +(define exit-code 0) (setenv "GNC_UNINSTALLED" "1") -(use-modules (gnucash gnc-module)) -(gnc:module-system-init) (display " testing gnome-utils module load ... ") -(if (gnc:module-load "gnucash/gnome-utils" 0) +(use-modules (gnucash gnome-utils)) - (begin - (display "ok\n") - (exit 0)) - (begin - (display "failed\n") - (exit 1))) +(cond + ((defined? 'gnc:make-menu) + (display "Procedure gnc:make-menu found\n")) + (else + (display "Failed - procedure gnc:make-menu not found\n") + (set! exit-code -1))) +(cond + ((defined? 'gnc:set-ui-status) + (display "Procedure gnc:set-ui-status found\n")) + (else + (display "Failed - procedure gnc:set-ui-status not found\n") + (set! exit-code -1))) + +(exit exit-code) diff --git a/gnucash/report/test/test-load-report-module.scm b/gnucash/report/test/test-load-report-module.scm index 270fe4b9ad..9c59a8fb59 100755 --- a/gnucash/report/test/test-load-report-module.scm +++ b/gnucash/report/test/test-load-report-module.scm @@ -1,17 +1,21 @@ -(debug-enable 'backtrace) - -(debug-set! stack 500000) +(define exit-code 0) +(setenv "GNC_UNINSTALLED" "1") (display " testing report module load ... ") -(setenv "GNC_UNINSTALLED" "1") -(use-modules (gnucash gnc-module)) +(use-modules (gnucash report)) -(gnc:module-system-init) +(cond + ((defined? 'gnc:define-report) + (display "Procedure gnc:define-report found\n")) + (else + (display "Failed - procedure gnc:define-report not found\n") + (set! exit-code -1))) -(if (gnc:module-load "gnucash/report" 0) - (begin - (display "ok\n") - (exit 0)) - (begin - (display "failed\n") - (exit -1))) +(cond + ((defined? 'gnc:make-html-chart) + (display "Procedure gnc:make-html-chart found\n")) + (else + (display "Failed - procedure gnc:make-html-chart not found\n") + (set! exit-code -1))) + +(exit exit-code)