mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
gnc-module - move guile wrappers to bindings/guile
This commit is contained in:
@@ -2,12 +2,6 @@
|
||||
add_subdirectory(test)
|
||||
add_subdirectory(example)
|
||||
|
||||
# Command to generate the swig-gnc-module.c wrapper file
|
||||
gnc_add_swig_guile_command (swig-gnc-module-c
|
||||
SWIG_GNC_MODULE_C swig-gnc-module.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/gnc-module.i ""
|
||||
)
|
||||
|
||||
set (gnc_module_SOURCES gnc-module.c)
|
||||
|
||||
# Add dependency on config.h
|
||||
@@ -21,7 +15,6 @@ set (gnc_module_HEADERS
|
||||
add_library (gnc-module
|
||||
${gnc_module_SOURCES}
|
||||
${gnc_module_HEADERS}
|
||||
${SWIG_GNC_MODULE_C}
|
||||
)
|
||||
|
||||
target_link_libraries(gnc-module ${GUILE_LDFLAGS} ${GMODULE_LDFLAGS} ${GLIB2_LDFLAGS})
|
||||
@@ -43,20 +36,6 @@ install(TARGETS gnc-module
|
||||
|
||||
install(FILES ${gnc_module_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gnucash)
|
||||
|
||||
# --- Compile Scheme file(s) ---
|
||||
|
||||
set (gnc_module_SCHEME gnc-module.scm)
|
||||
|
||||
set(GUILE_OUTPUT_DIR gnucash)
|
||||
set(GUILE_DEPENDS gnc-module)
|
||||
|
||||
gnc_add_scheme_targets(scm-gnc-module
|
||||
"${gnc_module_SCHEME}"
|
||||
${GUILE_OUTPUT_DIR}
|
||||
"${GUILE_DEPENDS}"
|
||||
FALSE
|
||||
)
|
||||
|
||||
set_local_dist(gnc_module_DIST_local CMakeLists.txt ${gnc_module_SOURCES} ${gnc_module_HEADERS}
|
||||
gnc-module.i gnc-module.scm README)
|
||||
README)
|
||||
set(gnc_module_DIST ${gnc_module_DIST_local} ${test_gnc_module_DIST} ${example_DIST} PARENT_SCOPE)
|
||||
|
||||
@@ -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 <gnc-module.h>
|
||||
%}
|
||||
#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);
|
||||
@@ -1,52 +0,0 @@
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;; gnc-module.scm
|
||||
;;; Guile module which allows initialization of the gnucash module
|
||||
;;; system from Scheme
|
||||
;;;
|
||||
;;; Copyright 2001 Linux Developers Group
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; 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 gnc-module))
|
||||
|
||||
;; Guile 2 needs to find the symbols from the extension at compile time already
|
||||
(eval-when
|
||||
(compile load eval expand)
|
||||
(load-extension "libgnc-module" "scm_init_sw_gnc_module_module"))
|
||||
|
||||
(use-modules (sw_gnc_module))
|
||||
|
||||
(define gnc:module-system-init gnc-module-system-init)
|
||||
(define gnc:module-system-refresh gnc-module-system-refresh)
|
||||
(define gnc:module-load gnc-module-load)
|
||||
(define gnc:module-load-optional gnc-module-load-optional)
|
||||
(define gnc:module-unload gnc-module-unload)
|
||||
|
||||
(export gnc:module-system-init)
|
||||
(export gnc:module-system-refresh)
|
||||
(export gnc:module-load)
|
||||
(export gnc:module-load-optional)
|
||||
(export gnc:module-unload)
|
||||
(export gnc:module-begin-syntax)
|
||||
|
||||
;; 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 ...)))
|
||||
@@ -56,7 +56,7 @@ set(test_gnc_module_SCHEME
|
||||
)
|
||||
|
||||
set(CORE_GUILE_DEPENDS
|
||||
gnc-module
|
||||
scm-gnc-module
|
||||
scm-test-core
|
||||
scm-mod-foo
|
||||
gncmod-bar
|
||||
|
||||
Reference in New Issue
Block a user