Drop guile 1.8 support

And with it all quirks we still had in the code to support that version.
This commit is contained in:
Geert Janssens 2017-12-19 23:13:01 +01:00
parent a784dd5784
commit 3d910ad2b1
61 changed files with 110 additions and 509 deletions

View File

@ -269,7 +269,7 @@ IF(BUILDING_FROM_VCS)
ENDIF()
# Find Guile and determine which version we are using.
# Look for guile versions in this order: 2.2 > 2.0 > 1.8
# Look for guile versions in this order: 2.2 > 2.0
# guile library and include dir
GNC_PKG_CHECK_MODULES (GUILE22 guile-2.2 QUIET)
@ -302,19 +302,7 @@ ELSE(GUILE22_FOUND)
MESSAGE(STATUS "Using guile-2.0.x")
FIND_PROGRAM (GUILE_EXECUTABLE NAMES guile2.0 guile)
ELSE(GUILE2_FOUND)
# look for guile 1.8
GNC_PKG_CHECK_MODULES (GUILE1 guile-1.8>=1.8.8 QUIET)
IF (NOT GUILE1_FOUND)
MESSAGE (FATAL_ERROR "Neither guile 1.8 nor guile 2.0 were found GnuCash can't run without one of them. Ensure that one is installed and can be found with pgk-config.")
ENDIF(NOT GUILE1_FOUND)
SET(HAVE_GUILE1 TRUE)
SET(GUILE_EFFECTIVE_VERSION 1.8)
SET(GUILE_INCLUDE_DIRS ${GUILE1_INCLUDE_DIRS})
SET(GUILE_LDFLAGS ${GUILE1_LDFLAGS})
MESSAGE(STATUS "Using guile-1.8.x")
FIND_PROGRAM (GUILE_EXECUTABLE NAMES guile1.8 guile)
MESSAGE (FATAL_ERROR "Neither guile 2.2 nor guile 2.0 were found GnuCash can't run without one of them. Ensure that one is installed and can be found with pgk-config.")
ENDIF(GUILE2_FOUND)
ENDIF(GUILE22_FOUND)

View File

@ -57,7 +57,6 @@ dist_doc_DATA = \
# CVS dirs.
EXTRA_DIST = \
$(SWIG_DIST_FAIL) \
CMakeLists.txt \
cmake/cmake_uninstall.cmake.in \
cmake/README_CMAKE.txt \
@ -174,14 +173,6 @@ distuninstallcheck_listfiles = \
#dist-hook: po/POTFILES.in
# Make "make dist" fail if we have the wrong version of swig
if SWIG_DIST_FAIL
SWIG_DIST_FAIL = swig-dist-fail
swig-dist-fail:
@echo "You cannot build the dist with your version of swig"
@exit 1
endif
distcheck-hook:
@e=''; \
for X in `grep -v \# ${distdir}/po/POTFILES.in | sed 's/\[type:.*\]//'` ; do \

3
README
View File

@ -237,9 +237,8 @@ you'll need for the systems we know about:
current:
libgnome-dev
libwebkit-dev
guile1.8
guile
libguile9-dev
libguile9-slib
SuSE:

View File

@ -64,7 +64,7 @@ Libraries/Deps
-------- _______
glib2 2.40.0
gtk+3 3.14.0
guile 1.8.5 or 2.0.0
guile 2.2.0 or 2.0.0
libxml2 2.5.10
libxslt
ICU International Compnents for

View File

@ -10,8 +10,7 @@ SET(common_EXTRA_DIST
config.h.cmake.in
gnc-test-env.pl
guile-mappings.h
platform.h
swig-utf8.patch)
platform.h)
IF (BUILDING_FROM_VCS)
SET (SWIG_RUNTIME_H ${CMAKE_CURRENT_BINARY_DIR}/swig-runtime.h PARENT_SCOPE)

View File

@ -39,5 +39,4 @@ EXTRA_DIST = \
gnc-test-env.pl \
guile-mappings.h \
platform.h \
swig-utf8.patch \
CMakeLists.txt

View File

@ -54,8 +54,8 @@ FUNCTION(GNC_ADD_SCHEME_TARGETS _TARGET _SOURCE_FILES _OUTPUT_DIR _GUILE_DEPENDS
MAKE_UNIX_PATH(CMAKE_SOURCE_DIR)
ENDIF(MINGW64)
# For guile 1, we simple link (or copy, for Windows) each source file to the dest directory
IF(HAVE_GUILE1 OR MAKE_LINKS)
# If links are requested, we simple link (or copy, for Windows) each source file to the dest directory
IF(MAKE_LINKS)
SET(_LINK_DIR ${DATADIR_BUILD}/gnucash/scm/${_OUTPUT_DIR})
FILE(MAKE_DIRECTORY ${_LINK_DIR})
SET(_SCHEME_LINKS "")
@ -74,30 +74,25 @@ FUNCTION(GNC_ADD_SCHEME_TARGETS _TARGET _SOURCE_FILES _OUTPUT_DIR _GUILE_DEPENDS
)
ENDIF()
ENDFOREACH(scheme_file)
IF(HAVE_GUILE1)
ADD_CUSTOM_TARGET(${_TARGET} ALL DEPENDS ${_SCHEME_LINKS})
ELSE()
ADD_CUSTOM_TARGET(${_TARGET}-links ALL DEPENDS ${_SCHEME_LINKS})
ENDIF()
ENDIF(HAVE_GUILE1 OR MAKE_LINKS)
ADD_CUSTOM_TARGET(${_TARGET}-links ALL DEPENDS ${_SCHEME_LINKS})
ENDIF(MAKE_LINKS)
IF(HAVE_GUILE2)
# Construct the guile source and compiled load paths
# Construct the guile source and compiled load paths
SET(_GUILE_LOAD_PATH "${current_srcdir}"
"${current_bindir}" "${CMAKE_BINARY_DIR}/libgnucash/scm") # to pick up generated build-config.scm
SET(_GUILE_LOAD_COMPILED_PATH "${current_bindir}")
SET(_GUILE_LOAD_PATH "${current_srcdir}"
"${current_bindir}" "${CMAKE_BINARY_DIR}/libgnucash/scm") # to pick up generated build-config.scm
SET(_GUILE_LOAD_COMPILED_PATH "${current_bindir}")
SET(_GUILE_CACHE_DIR ${LIBDIR_BUILD}/gnucash/scm/ccache/${GUILE_EFFECTIVE_VERSION})
SET(_GUILE_LOAD_PATH "${current_srcdir}")
IF (MAKE_LINKS)
SET(_GUILE_CACHE_DIR ${LIBDIR_BUILD}/gnucash/scm/ccache/${GUILE_EFFECTIVE_VERSION})
SET(_GUILE_LOAD_PATH "${current_srcdir}")
IF (MAKE_LINKS)
LIST(APPEND _GUILE_LOAD_PATH "${build_datadir}/gnucash/scm")
ENDIF()
SET(_GUILE_LOAD_COMPILED_PATH ${build_libdir}/gnucash/scm/ccache/${GUILE_EFFECTIVE_VERSION})
ENDIF()
SET(_GUILE_LOAD_COMPILED_PATH ${build_libdir}/gnucash/scm/ccache/${GUILE_EFFECTIVE_VERSION})
SET(_TARGET_FILES "")
SET(_TARGET_FILES "")
FOREACH(source_file ${_SOURCE_FILES})
FOREACH(source_file ${_SOURCE_FILES})
SET(guile_depends ${_GUILE_DEPENDS})
GET_FILENAME_COMPONENT(basename ${source_file} NAME_WE)
@ -121,11 +116,11 @@ FUNCTION(GNC_ADD_SCHEME_TARGETS _TARGET _SOURCE_FILES _OUTPUT_DIR _GUILE_DEPENDS
SET(CMAKE_COMMAND_TMP ${CMAKE_COMMAND} -E env)
ENDIF()
IF (MINGW64)
set(fpath "")
foreach(dir $ENV{PATH})
MAKE_UNIX_PATH(dir)
set(fpath "${fpath}${dir}:")
endforeach(dir)
set(fpath "")
foreach(dir $ENV{PATH})
MAKE_UNIX_PATH(dir)
set(fpath "${fpath}${dir}:")
endforeach(dir)
SET(LIBRARY_PATH "PATH=\"${build_bindir}:${fpath}\"")
ELSE (MINGW64)
SET (LIBRARY_PATH "LD_LIBRARY_PATH=${LIBDIR_BUILD}:${LIBDIR_BUILD}/gnucash:${_GUILE_LD_LIBRARY_PATH}")
@ -135,7 +130,7 @@ FUNCTION(GNC_ADD_SCHEME_TARGETS _TARGET _SOURCE_FILES _OUTPUT_DIR _GUILE_DEPENDS
ENDIF (APPLE)
SET(_GNC_MODULE_PATH "")
IF(MINGW64)
SET(_GNC_MODULE_PATH "${build_bindir}")
SET(_GNC_MODULE_PATH "${build_bindir}")
ELSE(MINGW64)
SET(_GNC_MODULE_PATH "${LIBDIR_BUILD}" "${LIBDIR_BUILD}/gnucash" "${GNC_MODULE_PATH}")
ENDIF(MINGW64)
@ -144,31 +139,30 @@ FUNCTION(GNC_ADD_SCHEME_TARGETS _TARGET _SOURCE_FILES _OUTPUT_DIR _GUILE_DEPENDS
MAKE_UNIX_PATH_LIST(_GUILE_LD_LIBRARY_PATH)
MAKE_UNIX_PATH_LIST(_GNC_MODULE_PATH)
IF (__DEBUG)
MESSAGE(" ")
MESSAGE(" LIBRARY_PATH: ${LIBRARY_PATH}")
MESSAGE(" GUILE_LOAD_PATH: ${_GUILE_LOAD_PATH}")
MESSAGE(" GUILE_LOAD_COMPILED_PATH: ${_GUILE_LOAD_COMPILED_PATH}")
MESSAGE(" GNC_MODULE_PATH: ${_GNC_MODULE_PATH}")
MESSAGE(" ")
MESSAGE(" LIBRARY_PATH: ${LIBRARY_PATH}")
MESSAGE(" GUILE_LOAD_PATH: ${_GUILE_LOAD_PATH}")
MESSAGE(" GUILE_LOAD_COMPILED_PATH: ${_GUILE_LOAD_COMPILED_PATH}")
MESSAGE(" GNC_MODULE_PATH: ${_GNC_MODULE_PATH}")
ENDIF(__DEBUG)
ADD_CUSTOM_COMMAND(
OUTPUT ${output_file}
COMMAND ${CMAKE_COMMAND_TMP}
${LIBRARY_PATH}
GNC_UNINSTALLED=YES
GNC_BUILDDIR=${CMAKE_BINARY_DIR}
GUILE_LOAD_PATH=${_GUILE_LOAD_PATH}
GUILE_LOAD_COMPILED_PATH=${_GUILE_LOAD_COMPILED_PATH}
GNC_MODULE_PATH=${_GNC_MODULE_PATH}
${GUILE_EXECUTABLE} -e '\(@@ \(guild\) main\)' -s ${GUILD_EXECUTABLE} compile -o ${output_file} ${source_file_abs_path}
${LIBRARY_PATH}
GNC_UNINSTALLED=YES
GNC_BUILDDIR=${CMAKE_BINARY_DIR}
GUILE_LOAD_PATH=${_GUILE_LOAD_PATH}
GUILE_LOAD_COMPILED_PATH=${_GUILE_LOAD_COMPILED_PATH}
GNC_MODULE_PATH=${_GNC_MODULE_PATH}
${GUILE_EXECUTABLE} -e '\(@@ \(guild\) main\)' -s ${GUILD_EXECUTABLE} compile -o ${output_file} ${source_file_abs_path}
DEPENDS ${guile_depends}
MAIN_DEPENDENCY ${source_file_abs_path}
)
ENDFOREACH(source_file)
IF (__DEBUG)
MESSAGE("TARGET_FILES are ${_TARGET_FILES}")
ENDIF(__DEBUG)
ADD_CUSTOM_TARGET(${_TARGET} ALL DEPENDS ${_TARGET_FILES})
INSTALL(FILES ${_TARGET_FILES} DESTINATION ${SCHEME_INSTALLED_CACHE_DIR}/${_OUTPUT_DIR})
ENDIF(HAVE_GUILE2)
ENDFOREACH(source_file)
IF (__DEBUG)
MESSAGE("TARGET_FILES are ${_TARGET_FILES}")
ENDIF(__DEBUG)
ADD_CUSTOM_TARGET(${_TARGET} ALL DEPENDS ${_TARGET_FILES})
INSTALL(FILES ${_TARGET_FILES} DESTINATION ${SCHEME_INSTALLED_CACHE_DIR}/${_OUTPUT_DIR})
INSTALL(FILES ${_SOURCE_FILES} DESTINATION ${SCHEME_INSTALLED_SOURCE_DIR}/${_OUTPUT_DIR})
ENDFUNCTION(GNC_ADD_SCHEME_TARGETS)

View File

@ -19,15 +19,6 @@
#include <libguile.h> /* for SCM_MAJOR_VERSION etc */
/* Give Guile 1.8 a 2.0-like interface */
#if (SCM_MAJOR_VERSION < 2)
# define scm_c_string_length scm_i_string_length
#endif
#ifndef scm_from_utf8_string
# define scm_from_utf8_string scm_from_locale_string
# define scm_to_utf8_string scm_to_locale_string
#endif
/* Convenience macros */
#define scm_is_equal(obj1,obj2) scm_is_true(scm_equal_p(obj1,obj2))

View File

@ -1,60 +0,0 @@
--- guile_scm_run.swg
+++ guile_scm_run.swg
@@ -41,10 +41,14 @@ typedef struct swig_guile_clientdata {
SCM goops_class;
} swig_guile_clientdata;
+#if SCM_MAJOR_VERSION <= 2
+#define scm_to_utf8_string scm_to_locale_string
+#define scm_from_utf8_string scm_from_locale_string
+#endif
#define SWIG_scm2str(s) \
SWIG_Guile_scm2newstr(s, NULL)
#define SWIG_str02scm(str) \
- str ? scm_from_locale_string(str) : SCM_BOOL_F
+ str ? scm_from_utf8_string(str) : SCM_BOOL_F
# define SWIG_malloc(size) \
scm_malloc(size)
# define SWIG_free(mem) \
@@ -84,21 +88,13 @@ SWIGINTERN char *
SWIG_Guile_scm2newstr(SCM str, size_t *len) {
#define FUNC_NAME "SWIG_Guile_scm2newstr"
char *ret;
- char *tmp;
- size_t l;
SCM_ASSERT (scm_is_string(str), str, 1, FUNC_NAME);
- l = scm_c_string_length(str);
- ret = (char *) SWIG_malloc( (l + 1) * sizeof(char));
+ ret = scm_to_utf8_string(str);
if (!ret) return NULL;
- tmp = scm_to_locale_string(str);
- memcpy(ret, tmp, l);
- free(tmp);
-
- ret[l] = '\0';
- if (len) *len = l;
+ if (len) *len = strlen(ret) - 1;
return ret;
#undef FUNC_NAME
}
@@ -473,7 +469,7 @@ SWIG_Guile_GetArgs (SCM *dest, SCM rest,
int num_args_passed = 0;
for (i = 0; i<reqargs; i++) {
if (!SCM_CONSP(rest))
- scm_wrong_num_args(scm_from_locale_string(procname ? (char *) procname : "unknown procedure"));
+ scm_wrong_num_args(scm_from_utf8_string(procname ? (char *) procname : "unknown procedure"));
*dest++ = SCM_CAR(rest);
rest = SCM_CDR(rest);
num_args_passed++;
@@ -486,7 +482,7 @@ SWIG_Guile_GetArgs (SCM *dest, SCM rest,
for (; i<optargs; i++)
*dest++ = SCM_UNDEFINED;
if (!SCM_NULLP(rest))
- scm_wrong_num_args(scm_from_locale_string(procname ? (char *) procname : "unknown procedure"));
+ scm_wrong_num_args(scm_from_utf8_string(procname ? (char *) procname : "unknown procedure"));
return num_args_passed;
}

View File

@ -28,13 +28,6 @@ swig-unittest-support-guile.c: unittest-support.i $(top_srcdir)/common/base-type
$(SWIG) -guile -Linkage module \
-I${top_srcdir}/common \
${AM_CPPFLAGS} -o $@ $<
if ! OS_WIN32
if ! SWIG_DIST_FAIL
if ! `grep "define scm_from_utf8_string" $@ > /dev/null 2>&1`; then \
patch $@ $(top_srcdir)/common/swig-utf8.patch; \
fi
endif
endif
swig-unittest-support-python.c: unittest-support.i $(top_srcdir)/common/base-typemaps.i
$(SWIG) -python -Wall -Werror \
@ -110,7 +103,6 @@ if ! OS_WIN32
touch .scm-links
endif
if GNC_HAVE_GUILE_2
GUILE_COMPILE_ENV = \
--library-dir ${top_builddir}/common/test-core \
--library-dir ${top_builddir}/libgnucash/engine \
@ -125,7 +117,6 @@ GUILE_COMPILE_ENV = \
gncscmmodcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash
gncscmmodcache_DATA = $(gncscmmod_DATA:.scm=.go)
endif
clean-local:
$(RM) -rf gnucash

View File

@ -18,13 +18,9 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define-module (gnucash unittest-support))
(cond-expand
(guile-2
(eval-when
(eval-when
(compile load eval expand)
(load-extension "libtest-core-guile" "scm_init_unittest_support_module")))
(else
(load-extension "libtest-core-guile" "scm_init_unittest_support_module")))
(load-extension "libtest-core-guile" "scm_init_unittest_support_module"))
(use-modules (unittest_support))
(re-export TestErrorStruct-log-level-set)

View File

@ -504,40 +504,38 @@ GUILE_EFFECTIVE_VERSION=0
# - determine GUILE_CFLAGS and GUILE_LIBS
AC_ARG_WITH([guile],
AS_HELP_STRING([--with-guile=1.8|2.0|auto],
AS_HELP_STRING([--with-guile=2.2|2.0|auto],
[which guile version to compile against @<:@default: auto@:>@]),
[],
[with_guile=auto]
)
AS_IF([test "$with_guile" = "2.0"],
AS_IF([test "$with_guile" = "2.2"],
[PKG_CHECK_MODULES(GUILE, [guile-2.2 >= 2.2.0],
[GUILE_EFFECTIVE_VERSION=2.2])],
[test "$with_guile" = "2.0"],
[PKG_CHECK_MODULES(GUILE, [guile-2.0 >= 2.0.0],
[GUILE_EFFECTIVE_VERSION=2.0
AC_PATH_PROG([GUILD], guild)])],
[test "$with_guile" = "1.8"],
[PKG_CHECK_MODULES(GUILE, [guile-1.8 >= 1.8.5],
[GUILE_EFFECTIVE_VERSION=1.8])],
[GUILE_EFFECTIVE_VERSION=2.0])],
[test "$with_guile" = "auto"],
[PKG_CHECK_MODULES(GUILE, [guile-2.0 >= 2.0.0],
[GUILE_EFFECTIVE_VERSION=2.0
AC_PATH_PROG([GUILD], guild)],
[PKG_CHECK_MODULES(GUILE, [guile-1.8 >= 1.8.5],
[GUILE_EFFECTIVE_VERSION=1.8],
[PKG_CHECK_MODULES(GUILE, [guile-2.2 >= 2.2.0],
[GUILE_EFFECTIVE_VERSION=2.2],
[PKG_CHECK_MODULES(GUILE, [guile-2.0 >= 2.0.0],
[GUILE_EFFECTIVE_VERSION=2.0],
[GUILE_EFFECTIVE_VERSION=0])
])],
# else
[AC_MSG_ERROR([invalid guile version specified])]
)
AC_PATH_PROG([GUILD], guild)
AS_IF([test "$GUILE_EFFECTIVE_VERSION" = "0"],
[AC_MSG_ERROR([
guile does not appear to be installed correctly, or is not in the
correct version range. Perhaps you have not installed the guile
development packages? Gnucash requires at least version 1.8.5 to build.
development packages? Gnucash requires at least version 2.0.0 to build.
])]
)
AM_CONDITIONAL(GNC_HAVE_GUILE_2, [test "$GUILE_EFFECTIVE_VERSION" = "2.0"])
AC_SUBST(GUILE_EFFECTIVE_VERSION)
AC_SUBST(GUILE, [`pwd`/gnc-guile])
@ -553,48 +551,13 @@ the libtool(-ltdl) development package?])])
# version 2.0.10 of SWIG, because that's the first version that supports
# guile 2.
#
# For a guile 1.8 build we accept an older version, but won't allow you
# to build the dist because we need to apply a patch to the swig
# generated files that needs to go into the release tarball. At that
# point we don't know yet which version of guile will be used together
# with that tarball so we have to prepare the tarball for guile 2
# compatibility.
#
if test "${BUILDING_FROM_VCS}" = yes
then
AX_PKG_SWIG(2.0.10, [gnc_have_swig_2_0_10=yes], [gnc_have_swig_2_0_10=no])
if test "${GUILE_EFFECTIVE_VERSION}" = "2.0"
then
if test "${gnc_have_swig_2_0_10}" = no
then
AC_MSG_ERROR([
You are building from ${VCS_TYPE} but swig was not found or too old.
To build gnucash you need at least swig version 2.0.10.
])
fi
else # using guile 1.8
if test "${gnc_have_swig_2_0_10}" = no
then
AX_PKG_SWIG(1.3.31, [],
AX_PKG_SWIG(2.0.10, ,
[AC_MSG_ERROR([
You are building from ${VCS_TYPE} but swig was not found or too old.
To build gnucash with guile 1.8 you need at least swig version 1.3.31.
])])
fi
fi
# If we get here then we have an okay version to build locally.
# Check if we can build dist (which always requires swig 2.0.10)
if test "${gnc_have_swig_2_0_10}" = no
then
AC_MSG_WARN([You don't have SWIG 2.0.10 so you will not be able to "make dist"])
fi
AM_CONDITIONAL([SWIG_DIST_FAIL], test "${gnc_have_swig_2_0_10}" != yes)
else
# When building from tarball, all the prerequisites to build dist are already
# met so make sure it's allowed
AM_CONDITIONAL([SWIG_DIST_FAIL], test yes != yes)
To build gnucash you need at least swig version 2.0.10.
])])
fi
### --------------------------------------------------------------------------

View File

@ -222,13 +222,6 @@ swig-gnome-utils.c: gnome-utils.i \
${top_srcdir}/common/base-typemaps.i
$(SWIG) -guile -Linkage module \
-I${top_srcdir}/common -o $@ $<
if ! OS_WIN32
if ! SWIG_DIST_FAIL
if ! `grep "define scm_from_utf8_string" $@ > /dev/null 2>&1`; then \
patch $@ $(top_srcdir)/common/swig-utf8.patch; \
fi
endif
endif
endif
gncscmmoddir = ${GNC_SCM_INSTALL_DIR}/gnucash
@ -267,7 +260,6 @@ if ! OS_WIN32
touch .scm-links
endif
if GNC_HAVE_GUILE_2
GUILE_COMPILE_ENV = \
--guile-load-dir ${top_builddir}/libgnucash/core-utils \
--guile-load-dir ${top_builddir}/libgnucash/gnc-module \
@ -290,7 +282,6 @@ gncscmmodcache_DATA = $(gncscmmod_DATA:.scm=.go)
gncscmcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@
gncscmcache_DATA = $(gncscm_DATA:.scm=.go)
endif
noinst_DATA = .scm-links
clean-local:

View File

@ -22,12 +22,9 @@
(use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing.
(use-modules (gnucash gnc-module))
(cond-expand
(guile-2
(eval-when
(eval-when
(compile load eval expand)
(load-extension "libgncmod-gnome-utils" "scm_init_sw_gnome_utils_module")))
(else ))
(load-extension "libgncmod-gnome-utils" "scm_init_sw_gnome_utils_module"))
(use-modules (sw_gnome_utils))
(gnc:module-load "gnucash/app-utils" 0)

View File

@ -152,13 +152,6 @@ if BUILDING_FROM_VCS
swig-gnome.c: gnome.i dialog-progress.h ${top_srcdir}/common/base-typemaps.i
$(SWIG) -guile -Linkage module \
-I${top_srcdir}/common -o $@ $<
if ! OS_WIN32
if ! SWIG_DIST_FAIL
if ! `grep "define scm_from_utf8_string" $@ > /dev/null 2>&1`; then \
patch $@ $(top_srcdir)/common/swig-utf8.patch; \
fi
endif
endif
endif
EXTRA_DIST = \

View File

@ -57,13 +57,6 @@ swig-gnc-html.c: gnc-html.i gnc-html.h \
${top_srcdir}/common/base-typemaps.i
$(SWIG) -guile -Linkage module \
-I${top_srcdir}/common -o $@ $<
if ! OS_WIN32
if ! SWIG_DIST_FAIL
if ! `grep "define scm_from_utf8_string" $@ > /dev/null 2>&1`; then \
patch $@ $(top_srcdir)/common/swig-utf8.patch; \
fi
endif
endif
endif
EXTRA_DIST = \

View File

@ -98,7 +98,6 @@ if ! OS_WIN32
touch .scm-links
endif
if GNC_HAVE_GUILE_2
GUILE_COMPILE_ENV = \
--gnc-module-dir ${top_builddir}/libgnucash/engine \
--guile-load-dir ${top_builddir}/libgnucash/app-utils \
@ -134,7 +133,6 @@ gncscmmodcache_DATA = $(gncscmmod_DATA:.scm=.go)
gncscmcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/qif-import
gncscmcache_DATA = $(gncscm_DATA:.scm=.go)
endif
clean-local:
$(RM) -rf gnucash qif-import

View File

@ -30,13 +30,9 @@
;; We do this initialization here because src/gnome isn't a real module.
;; Note: Guile 2 needs to find the symbols from the extension at compile time already
(cond-expand
(guile-2
(eval-when
(eval-when
(compile load eval expand)
(load-extension "libgnc-gnome" "scm_init_sw_gnome_module")))
(else
(load-extension "libgnc-gnome" "scm_init_sw_gnome_module")))
(load-extension "libgnc-gnome" "scm_init_sw_gnome_module"))
(use-modules (sw_gnome))

View File

@ -46,7 +46,6 @@ if ! OS_WIN32
touch .scm-links
endif
if GNC_HAVE_GUILE_2
GUILE_COMPILE_ENV = \
--gnc-module-dir ${top_builddir}/libgnucash/app-utils \
--gnc-module-dir ${top_builddir}/libgnucash/engine \
@ -81,7 +80,6 @@ GUILE_COMPILE_ENV = \
gncscmmodcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash/report
gncscmmodcache_DATA = $(gncscmmod_DATA:.scm=.go)
endif
clean-local:
$(RM) -rf gnucash

View File

@ -39,10 +39,7 @@
(use-modules (gnucash report eguile-utilities))
(use-modules (ice-9 regex)) ; for regular expressions
(cond-expand
(guile-2
(use-modules (ice-9 local-eval))) ; for the-environment
(else ))
(use-modules (ice-9 local-eval)) ; for the-environment
(use-modules (srfi srfi-13)) ; for extra string functions
(gnc:module-load "gnucash/report/report-system" 0)

View File

@ -16,10 +16,7 @@
(define-module (gnucash report receipt))
(cond-expand
(guile-2
(use-modules (ice-9 local-eval))) ; for the-environment
(else ))
(use-modules (ice-9 local-eval)) ; for the-environment
(use-modules (gnucash main))
(use-modules (gnucash gnc-module))
(use-modules (gnucash gettext))

View File

@ -24,10 +24,7 @@
; (see http://wiki.gnucash.org/wiki/Custom_Reports )
(define-module (gnucash report taxinvoice))
(cond-expand
(guile-2
(use-modules (ice-9 local-eval))) ; for the-environment
(else ))
(use-modules (ice-9 local-eval)) ; for the-environment
(use-modules (gnucash main))
(use-modules (gnucash gnc-module))
(use-modules (gnucash gettext))

View File

@ -51,7 +51,6 @@ if ! OS_WIN32
touch .scm-links
endif
if GNC_HAVE_GUILE_2
GUILE_COMPILE_ENV = \
--gnc-module-dir ${top_builddir}/libgnucash/app-utils \
--gnc-module-dir ${top_builddir}/libgnucash/engine \
@ -91,7 +90,6 @@ gncscmmodcache_DATA = $(gncscmmod_DATA:.scm=.go)
gncscmrptcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash/report/locale-specific
gncscmrptcache_DATA = $(gncscmrpt_DATA:.scm=.go)
endif
clean-local:
$(RM) -rf gnucash

View File

@ -97,12 +97,9 @@
(use-modules (gnucash gnc-module))
(use-modules (gnucash gettext))
(cond-expand
(guile-2
(eval-when
(eval-when
(compile load eval expand)
(load-extension "libgncmod-gnome-utils" "scm_init_sw_gnome_utils_module")))
(else ))
(load-extension "libgncmod-gnome-utils" "scm_init_sw_gnome_utils_module"))
(use-modules (sw_gnome_utils)) ;; to get to gnc-error-dialog
(use-modules (gnucash printf))

View File

@ -51,13 +51,6 @@ if BUILDING_FROM_VCS
swig-report-gnome.c: report-gnome.i ${top_srcdir}/common/base-typemaps.i
$(SWIG) -guile -Linkage module \
-I${top_srcdir}/common -o $@ $<
if ! OS_WIN32
if ! SWIG_DIST_FAIL
if ! `grep "define scm_from_utf8_string" $@ > /dev/null 2>&1`; then \
patch $@ $(top_srcdir)/common/swig-utf8.patch; \
fi
endif
endif
endif
gncscmmoddir = ${GNC_SCM_INSTALL_DIR}/gnucash/report
@ -103,7 +96,6 @@ if ! OS_WIN32
touch .scm-links
endif
if GNC_HAVE_GUILE_2
GUILE_COMPILE_ENV = \
--gnc-module-dir ${top_builddir}/libgnucash/app-utils \
--gnc-module-dir ${top_builddir}/libgnucash/engine \
@ -136,7 +128,6 @@ GUILE_COMPILE_ENV = \
gncscmmodcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash/report
gncscmmodcache_DATA = $(gncscmmod_DATA:.scm=.go)
endif
clean-local:
rm -rf gnucash

View File

@ -33,13 +33,10 @@
(use-modules (gnucash printf))
(cond-expand
(guile-2
(eval-when
(eval-when
(compile load eval expand)
(load-extension "libgncmod-gnome-utils" "scm_init_sw_gnome_utils_module")
(load-extension "libgncmod-report-gnome" "scm_init_sw_report_gnome_module")))
(else ))
(load-extension "libgncmod-report-gnome" "scm_init_sw_report_gnome_module"))
(use-modules (sw_report_gnome))
(gnc:module-load "gnucash/gnome-utils" 0)

View File

@ -9,13 +9,7 @@ exec ${GUILE} -s "$0"
(debug-set! maxdepth 100000))
(display " testing report module load ... ")
(cond-expand
(guile-2 )
(else
;; Syncase is deprecated and redundant in guile 2
(use-modules (ice-9 syncase))))
(use-modules (gnucash gnc-module))
(gnc:module-system-init)
(setenv "GNC_UNINSTALLED" "1")

View File

@ -27,13 +27,6 @@ if BUILDING_FROM_VCS
swig-report-system.c: report-system.i ${top_srcdir}/common/base-typemaps.i
$(SWIG) -guile -Linkage module \
-I${top_srcdir}/common -o $@ $<
if ! OS_WIN32
if ! SWIG_DIST_FAIL
if ! `grep "define scm_from_utf8_string" $@ > /dev/null 2>&1`; then \
patch $@ $(top_srcdir)/common/swig-utf8.patch; \
fi
endif
endif
endif
AM_CPPFLAGS = \
@ -105,7 +98,6 @@ if ! OS_WIN32
touch .scm-links
endif
if GNC_HAVE_GUILE_2
GUILE_COMPILE_ENV = \
--gnc-module-dir ${top_builddir}/libgnucash/app-utils \
--gnc-module-dir ${top_builddir}/libgnucash/engine \
@ -143,7 +135,6 @@ gncmodscmcache_DATA = $(gncmodscm_DATA:.scm=.go)
gncscmcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@
gncscmcache_DATA = $(gncscm_DATA:.scm=.go)
endif
noinst_DATA = .scm-links

View File

@ -85,10 +85,7 @@
(use-modules (ice-9 regex)) ; for regular expressions
(use-modules (ice-9 rdelim)) ; for read-line
(cond-expand
(guile-2
(use-modules (ice-9 local-eval))) ; for the-environment
(else ))
(use-modules (ice-9 local-eval)) ; for the-environment
(use-modules (gnucash printf))
(use-modules (gnucash app-utils)) ; for _

View File

@ -32,15 +32,8 @@
(use-modules (gnucash core-utils))
(gnc:module-load "gnucash/report/report-system" 0)
(gnc:module-load "gnucash/app-utils" 0)
; Syncase is deprecated and redundant in guile 2
(cond-expand
(guile-2 )
(else
(use-modules (ice-9 syncase)))) ; for define-syntax
;(use-modules (srfi srfi-13)) ; for extra string functions
(define-public (fmtnumber n)
;; Format a number (integer or real) into something printable
(number->string (if (integer? n)

View File

@ -24,12 +24,9 @@
(use-modules (gnucash app-utils))
(use-modules (gnucash printf))
(use-modules (gnucash gettext))
(cond-expand
(guile-2
(eval-when
(eval-when
(compile load eval expand)
(load-extension "libgncmod-report-system" "scm_init_sw_report_system_module")))
(else ))
(load-extension "libgncmod-report-system" "scm_init_sw_report_system_module"))
(use-modules (sw_report_system))
;; Terminology in this file:

View File

@ -6,11 +6,6 @@
(display " testing report module load ... ")
(setenv "GNC_UNINSTALLED" "1")
(cond-expand
(guile-2 )
(else
;; Syncase is deprecated and redundant in guile 2
(use-modules (ice-9 syncase))))
(use-modules (gnucash gnc-module))
(gnc:module-system-init)

View File

@ -58,7 +58,6 @@ if ! OS_WIN32
touch .scm-links
endif
if GNC_HAVE_GUILE_2
GUILE_COMPILE_ENV = \
--gnc-module-dir ${top_builddir}/libgnucash/app-utils \
--gnc-module-dir ${top_builddir}/libgnucash/engine \
@ -94,7 +93,6 @@ gncscmmodcache_DATA = $(gncscmmod_DATA:.scm=.go)
gncscmrptcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash/report/standard-reports
gncscmrptcache_DATA = $(gncscmrpt_DATA:.scm=.go)
endif
clean-local:
$(RM) -rf gnucash

View File

@ -26,12 +26,8 @@
;; otherwise the N_ syntax-rule won't be found at compile time
;; causing the test to fail
;; That's what the wrapper below is meant for:
(cond-expand
(guile-2
(define-syntax-rule (begin-for-syntax form ...)
(eval-when (load compile eval expand) (begin form ...))))
(else
(define begin-for-syntax begin)))
(define-syntax-rule (begin-for-syntax form ...)
(eval-when (load compile eval expand) (begin form ...)))
(begin-for-syntax (gnc:module-load "gnucash/report/report-system" 0))
(use-modules (gnucash engine))

View File

@ -62,7 +62,6 @@ if ! OS_WIN32
touch .scm-links
endif
if GNC_HAVE_GUILE_2
GUILE_COMPILE_ENV = \
--gnc-module-dir ${top_builddir}/libgnucash/app-utils \
--gnc-module-dir ${top_builddir}/libgnucash/engine \
@ -97,7 +96,6 @@ GUILE_COMPILE_ENV = \
gncscmmodcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash/report
gncscmmodcache_DATA = $(gncscmmod_DATA:.scm=.go)
endif
clean-local:
$(RM) -rf gnucash

View File

@ -28,7 +28,6 @@ if ! OS_WIN32
touch .scm-links
endif
if GNC_HAVE_GUILE_2
GUILE_COMPILE_ENV = \
--gnc-module-dir ${top_builddir}/libgnucash/app-utils \
--gnc-module-dir ${top_builddir}/libgnucash/engine \
@ -61,7 +60,6 @@ GUILE_COMPILE_ENV = \
gncscmmodcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash/report
gncscmmodcache_DATA = $(gncscmmod_DATA:.scm=.go)
endif
clean-local:
$(RM) -rf gnucash

View File

@ -31,12 +31,9 @@
(use-modules (gnucash app-utils))
(use-modules (gnucash gnc-module))
(use-modules (gnucash gettext))
(cond-expand
(guile-2
(eval-when
(eval-when
(compile load eval expand)
(load-extension "libgncmod-report-system" "scm_init_sw_report_system_module")))
(else ))
(load-extension "libgncmod-report-system" "scm_init_sw_report_system_module"))
(use-modules (sw_report_system))
(use-modules (gnucash printf))

View File

@ -27,12 +27,9 @@
(use-modules (gnucash core-utils)) ; for gnc:version
(use-modules (gnucash gettext))
(use-modules (gnucash gnc-module))
(cond-expand
(guile-2
(eval-when
(eval-when
(compile load eval expand)
(load-extension "libgncmod-report-system" "scm_init_sw_report_system_module")))
(else ))
(load-extension "libgncmod-report-system" "scm_init_sw_report_system_module"))
(use-modules (sw_report_system))
(gnc:module-load "gnucash/report/report-system" 0)

View File

@ -105,13 +105,7 @@ if BUILDING_FROM_VCS
swig-app-utils-guile.c: app-utils.i ${top_srcdir}/common/base-typemaps.i
$(SWIG) -guile -Linkage module \
-I${top_srcdir}/common -o $@ $<
if ! OS_WIN32
if ! SWIG_DIST_FAIL
if ! `grep "define scm_from_utf8_string" $@ > /dev/null 2>&1`; then \
patch $@ $(top_srcdir)/common/swig-utf8.patch; \
fi
endif
endif
swig-app-utils-python.c: app-utils.i ${top_srcdir}/common/base-typemaps.i
$(SWIG) -python -Wall -Werror \
-I${GLIB_CFLAGS} -I${top_srcdir}/common -o $@ $<
@ -199,7 +193,6 @@ if ! OS_WIN32
touch .scm-links
endif
if GNC_HAVE_GUILE_2
GUILE_COMPILE_ENV = \
--gnc-module-dir ${top_builddir}/libgnucash/engine \
--guile-load-dir ${top_builddir}/libgnucash/app-utils \
@ -223,7 +216,6 @@ gncscmmodcache_DATA = $(gncscmmod_DATA:.scm=.go)
gncscmcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@
gncscmcache_DATA = $(gncscm_DATA:.scm=.go)
endif
clean-local:
rm -rf gnucash

View File

@ -16,12 +16,9 @@
;; Boston, MA 02110-1301, USA gnu@gnu.org
(define-module (gnucash app-utils))
(cond-expand
(guile-2
(eval-when
(eval-when
(compile load eval expand)
(load-extension "libgncmod-app-utils" "scm_init_sw_app_utils_module")))
(else ))
(load-extension "libgncmod-app-utils" "scm_init_sw_app_utils_module"))
(use-modules (sw_app_utils))
(use-modules (srfi srfi-1))
(use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing.
@ -29,13 +26,9 @@
(use-modules (gnucash gettext))
;; Guile 2 needs to find the symbols from the c module at compile time already
(cond-expand
(guile-2
(eval-when
(eval-when
(compile load eval expand)
(gnc:module-load "gnucash/engine" 0)))
(else
(gnc:module-load "gnucash/engine" 0)))
(gnc:module-load "gnucash/engine" 0))
;; gettext.scm
(re-export gnc:gettext)

View File

@ -18,16 +18,11 @@
(define-module (gnucash gettext))
;; Load a few different modules depending on the version of guile
(cond-expand
(guile-2
;; Our app-utils gnc module must be evaluated at compile time
;; Without it sw_app_utils can't be evaluated below
(eval-when
;; Our app-utils gnc module must be evaluated at compile time
;; Without it sw_app_utils can't be evaluated below
(eval-when
(compile load eval expand)
(load-extension "libgncmod-app-utils" "scm_init_sw_app_utils_module")))
(else
;; Syncase is deprecated and redundant in guile 2
(use-modules (ice-9 syncase))))
(load-extension "libgncmod-app-utils" "scm_init_sw_app_utils_module"))
(use-modules (sw_app_utils))
;; gettext functions
@ -43,4 +38,4 @@
(export gnc:gettext)
(export _)
(export N_)
(export N_)

View File

@ -25,13 +25,9 @@
(use-modules (gnucash core-utils))
;(use-modules (gnucash gnc-module))
;; Guile 2 needs to find the symbols from the c module at compile time already
;(cond-expand
; (guile-2
; (eval-when
; (compile load eval)
; (load-extension "libgnc-core-utils" "scm_init_sw_core_utils_module")))
; (else
; (load-extension "libgnc-core-utils" "scm_init_sw_core_utils_module")))
;(eval-when
; (compile load eval)
; (load-extension "libgnc-core-utils" "scm_init_sw_core_utils_module"))
;(use-modules (sw_core_utils))
(define (run-migration-internal)
@ -217,4 +213,4 @@
<df:dateformat><df:name>locale</df:name><df:index>4</df:index></df:dateformat>
</df:dateformats>
</xsl:stylesheet>
</xsl:stylesheet>

View File

@ -199,13 +199,6 @@
(define (gnc:value->string value)
(let ((result (call-with-output-string
(lambda (port) (write value port)))))
;; Guile 1.8 has a bug that it serializes a space in a symbol to "\ "
;; but can't deserialize this back to a symbol afterwards. Stripping the
;; "\" appears to work around this (see gnucash bug 721654 which lead to this issue)
(cond-expand
(guile-2 )
(else (set! result (regexp-substitute/global #f "\\\\ " result 'pre " " 'post))))
result))
(define (gnc:make-string-option

View File

@ -7,12 +7,8 @@
;; otherwise the N_ syntax-rule won't be found at compile time
;; causing the test to fail
;; That's what the wrapper below is meant for:
(cond-expand
(guile-2
(define-syntax-rule (begin-for-syntax form ...)
(eval-when (load compile eval) (begin form ...))))
(else
(define begin-for-syntax begin)))
(define-syntax-rule (begin-for-syntax form ...)
(eval-when (load compile eval) (begin form ...)))
(begin-for-syntax (define loaded-module (gnc:module-load "gnucash/app-utils" 0)))
(if loaded-module

View File

@ -132,11 +132,6 @@ int
main (int argc, char **argv)
{
g_setenv ("GNC_UNINSTALLED", "1", TRUE);
/* When built with clang, guile-1.8.8's scm_c_eval_string truncates all
* integer values to int32, which causes this test to fail.
*/
#if !(defined(__clang__)) || defined(HAVE_GUILE20) || defined(HAVE_GUILE22)
scm_boot_guile (argc, argv, main_helper, NULL);
#endif
return 0;
}

View File

@ -42,13 +42,7 @@ if BUILDING_FROM_VCS
swig-core-utils-guile.c: core-utils.i ${top_srcdir}/common/base-typemaps.i
$(SWIG) -guile -Linkage module \
-I${top_srcdir}/common -o $@ $<
if ! OS_WIN32
if ! SWIG_DIST_FAIL
if ! `grep "define scm_from_utf8_string" $@ > /dev/null 2>&1`; then \
patch $@ $(top_srcdir)/common/swig-utf8.patch; \
fi
endif
endif
swig-core-utils-python.c: core-utils.i ${top_srcdir}/common/base-typemaps.i
$(SWIG) -python -Wall -Werror \
-I${GLIB_CFLAGS} -I${top_srcdir}/common -I${srcdir} -o $@ $<
@ -107,7 +101,6 @@ if ! OS_WIN32
touch .scm-links
endif
if GNC_HAVE_GUILE_2
GUILE_COMPILE_ENV = \
--library-dir ${top_builddir}/libgnucash/core-utils
@ -119,7 +112,6 @@ GUILE_COMPILE_ENV = \
gncscmmodcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash
gncscmmodcache_DATA = $(gncscmmod_DATA:.scm=.go)
endif
noinst_DATA = .scm-links
BUILT_SOURCES = gncla-dir.h gnc-version.h

View File

@ -27,13 +27,9 @@
(define-module (gnucash core-utils))
;; Guile 2 needs to find the symbols from the extension at compile time already
(cond-expand
(guile-2
(eval-when
(eval-when
(compile load eval expand)
(load-extension "libgnc-core-utils" "scm_init_sw_core_utils_module")))
(else
(load-extension "libgnc-core-utils" "scm_init_sw_core_utils_module")))
(load-extension "libgnc-core-utils" "scm_init_sw_core_utils_module"))
(use-modules (sw_core_utils))

View File

@ -297,33 +297,12 @@ gchar *gnc_scm_strip_comments (SCM scm_text)
splits = g_strsplit(raw_text, "\n", -1);
for (i = j = 0; splits[i]; i++)
{
gchar *haystack, *needle;
if ((splits[i][0] == ';') || (splits[i][0] == '\0'))
{
g_free(splits[i]);
continue;
}
/* Work around a bug in guile 1.8 that escapes spaces
* in a symbol printed on a string port. We don't
* want this, because this string can't be properly
* converted back into a symbol later on. */
haystack = splits [i];
needle = g_strstr_len (haystack, -1, "\\ ");
while (needle)
{
gchar *new_haystack = NULL;
gsize prefix_size = needle - haystack;
gchar *prefix = g_strndup (haystack, prefix_size);
needle++;
new_haystack = g_strconcat (prefix, needle, NULL);
g_free (prefix);
g_free (haystack);
haystack = new_haystack;
needle = g_strstr_len (haystack, -1, "\\ ");
}
splits[j++] = haystack;
splits[j++] = splits [i];
}
splits[j] = NULL;

View File

@ -275,7 +275,6 @@ if ! OS_WIN32
touch .scm-links
endif
if GNC_HAVE_GUILE_2
GUILE_COMPILE_ENV = \
--guile-load-dir ${top_builddir}/libgnucash/gnc-module \
--library-dir ${top_builddir}/libgnucash/engine \
@ -293,7 +292,6 @@ gncscmmodcache_DATA = $(gncscmmod_DATA:.scm=.go)
gncscmcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@
gncscmcache_DATA = $(gncscm_DATA:.scm=.go)
endif
noinst_DATA = .scm-links
@ -303,13 +301,6 @@ swig-engine.c: engine.i $(top_srcdir)/common/base-typemaps.i \
$(gncinclude_HEADERS) $(noinst_HEADERS)
$(SWIG) -guile -Linkage module \
-I${top_srcdir}/common -o $@ $<
if ! OS_WIN32
if ! SWIG_DIST_FAIL
if ! `grep "define scm_from_utf8_string" $@ > /dev/null 2>&1`; then \
patch $@ $(top_srcdir)/common/swig-utf8.patch; \
fi
endif
endif
endif

View File

@ -19,12 +19,9 @@
(define-module (gnucash engine))
(cond-expand
(guile-2
(eval-when
(eval-when
(compile load eval expand)
(load-extension "libgncmod-engine" "scm_init_sw_engine_module")))
(else ))
(load-extension "libgncmod-engine" "scm_init_sw_engine_module"))
(use-modules (sw_engine))
(export GNC-RND-FLOOR)

View File

@ -33,13 +33,6 @@ if BUILDING_FROM_VCS
swig-gnc-module.c: gnc-module.i ${top_srcdir}/common/base-typemaps.i
$(SWIG) -guile -Linkage module \
-I${top_srcdir}/common -o $@ $<
if ! OS_WIN32
if ! SWIG_DIST_FAIL
if ! `grep "define scm_from_utf8_string" $@ > /dev/null 2>&1`; then \
patch $@ $(top_srcdir)/common/swig-utf8.patch; \
fi
endif
endif
endif
EXAMPLE_EXTRA_DIST = \
@ -79,7 +72,6 @@ if ! OS_WIN32
touch .scm-links
endif
if GNC_HAVE_GUILE_2
GUILE_COMPILE_ENV = \
--library-dir ${top_builddir}/libgnucash/gnc-module \
--library-dir ${top_builddir}/libgnucash/core-utils
@ -92,7 +84,6 @@ GUILE_COMPILE_ENV = \
gncscmmodcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash
gncscmmodcache_DATA = $(gncscmmod_DATA:.scm=.go)
endif
clean-local:
rm -rf gnucash

View File

@ -28,13 +28,9 @@
(define-module (gnucash gnc-module))
;; Guile 2 needs to find the symbols from the extension at compile time already
(cond-expand
(guile-2
(eval-when
(eval-when
(compile load eval expand)
(load-extension "libgnc-module" "scm_init_sw_gnc_module_module")))
(else
(load-extension "libgnc-module" "scm_init_sw_gnc_module_module")))
(load-extension "libgnc-module" "scm_init_sw_gnc_module_module"))
(use-modules (sw_gnc_module))
@ -52,9 +48,5 @@
(export gnc:module-begin-syntax)
;; Guile 2 needs to load external modules at compile time
(cond-expand
(guile-2
(define-syntax-rule (gnc:module-begin-syntax form ...)
(eval-when (load compile eval expand) (begin form ...))))
(else
(define gnc:module-begin-syntax begin)))
(define-syntax-rule (gnc:module-begin-syntax form ...)
(eval-when (load compile eval expand) (begin form ...)))

View File

@ -25,13 +25,6 @@ libgncmodbar_la_LIBADD=libbar.la \
if BUILDING_FROM_VCS
swig-bar.c: bar.i
$(SWIG) -guile -Linkage module -o $@ $<
if ! OS_WIN32
if ! SWIG_DIST_FAIL
if ! `grep "define scm_from_utf8_string" $@ > /dev/null 2>&1`; then \
patch $@ $(top_srcdir)/common/swig-utf8.patch; \
fi
endif
endif
endif
EXTRA_DIST = \

View File

@ -29,13 +29,6 @@ libgncmodbaz_la_LIBADD = \
if BUILDING_FROM_VCS
swig-baz.c: baz.i
$(SWIG) -guile -Linkage module -o $@ $<
if ! OS_WIN32
if ! SWIG_DIST_FAIL
if ! `grep "define scm_from_utf8_string" $@ > /dev/null 2>&1`; then \
patch $@ $(top_srcdir)/common/swig-utf8.patch; \
fi
endif
endif
endif
EXTRA_DIST = \

View File

@ -31,13 +31,6 @@ EXTRA_DIST = \
if BUILDING_FROM_VCS
swig-foo.c: foo.i
$(SWIG) -guile -Linkage module -o $@ $<
if ! OS_WIN32
if ! SWIG_DIST_FAIL
if ! `grep "define scm_from_utf8_string" $@ > /dev/null 2>&1`; then \
patch $@ $(top_srcdir)/common/swig-utf8.patch; \
fi
endif
endif
endif
BUILT_SOURCES = swig-foo.c

View File

@ -14,11 +14,7 @@ SET (scm_SCHEME_4
# FIXME: ${BUILD_CONFIG_SCM} needs a rule to cause it to be generated, I think.
IF (HAVE_GUILE1)
GNC_CONFIGURE(build-config.scm.in build-config.scm)
ELSE()
GNC_CONFIGURE2(build-config-scm build-config.scm.in build-config.scm)
ENDIF()
GNC_CONFIGURE2(build-config-scm build-config.scm.in build-config.scm)
# CONFIGURE_FILE(build-config.scm.in ${BUILD_CONFIG_SCM})

View File

@ -41,7 +41,6 @@ if ! OS_WIN32
touch .scm-links
endif
if GNC_HAVE_GUILE_2
GUILE_COMPILE_ENV = \
--guile-load-dir ${top_builddir}/libgnucash/core-utils \
--guile-load-dir ${top_builddir}/libgnucash/gnc-module \
@ -59,7 +58,6 @@ gncscmmodcache_DATA = $(gncscmmod_DATA:.scm=.go)
gncscmcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@
gncscmcache_DATA = $(gncscm_DATA:.scm=.go)
endif
clean-local:
$(RM) -rf gnucash

View File

@ -19,14 +19,12 @@ if ! OS_WIN32
touch .scm-links
endif
if GNC_HAVE_GUILE_2
%.go : %.scm .scm-links
$(GUILD) compile \
-o $@ $<
gncscmcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/gnumeric
gncscmcache_DATA = $(gncscm_DATA:.scm=.go)
endif
noinst_DATA = .scm-links

View File

@ -18,11 +18,6 @@
(define-module (gnucash main)
#:use-module (gnucash printf))
;; This is to silence warnings with guile-1.8:
(if (and (>= (string->number (major-version)) 1)
(>= (string->number (minor-version)) 8))
(default-duplicate-binding-handler 'last))
;; Turn off the scheme compiler's "possibly unbound variable" warnings.
;; In guile 2.0 we get nearly 7500 of them loading the scheme files.
;; This is the default value for auto-compilation-options without "unbound-variable".

View File

@ -44,7 +44,6 @@ if ! OS_WIN32
touch .scm-links
endif
if GNC_HAVE_GUILE_2
GUILE_COMPILE_ENV = \
--gnc-module-dir ${top_builddir}/libgnucash/engine \
--guile-load-dir ${top_builddir}/libgnucash/app-utils \
@ -68,7 +67,6 @@ gncscmmodcache_DATA = $(gncscmmod_DATA:.scm=.go)
gncscmcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@
gncscmcache_DATA = $(gncscm_DATA:.scm=.go)
endif
clean-local:
$(RM) -rf gnucash

View File

@ -20,13 +20,10 @@
(define-module (gnucash tax de_DE))
(use-modules (gnucash gnc-module))
(cond-expand
(guile-2
(eval-when
(eval-when
(compile load eval expand)
(load-extension "libgncmod-engine" "scm_init_sw_engine_module")
(load-extension "libgncmod-app-utils" "scm_init_sw_app_utils_module")))
(else ))
(load-extension "libgncmod-app-utils" "scm_init_sw_app_utils_module"))
(use-modules (sw_app_utils))
(use-modules (sw_engine))
(use-modules (gnucash app-utils))