gnucash master: Multiple changes pushed
John Ralls
jralls at code.gnucash.org
Tue Feb 28 18:44:19 EST 2023
Updated via https://github.com/Gnucash/gnucash/commit/e9f6bf7a (commit)
via https://github.com/Gnucash/gnucash/commit/be41bde5 (commit)
via https://github.com/Gnucash/gnucash/commit/7cae61d9 (commit)
from https://github.com/Gnucash/gnucash/commit/675d8941 (commit)
commit e9f6bf7a5c108836633cd974a9d4db98ec9bfbfd
Merge: 675d89412 be41bde58
Author: John Ralls <jralls at ceridwen.us>
Date: Tue Feb 28 15:25:08 2023 -0800
Merge Richard Cohen's fix-scheme-tests into master.
commit be41bde58aeb245fc59a0b1e85d850fc6e51762f
Author: Richard Cohen <richard at daijobu.co.uk>
Date: Sun Feb 26 11:42:35 2023 +0000
Add missing MAKE_LINKS, and the local scm directory to %load-path
Before this change, "make check" would fail after
rm -rf ${build}/share/guile/site/*/gnucash/
diff --git a/bindings/guile/CMakeLists.txt b/bindings/guile/CMakeLists.txt
index f95f78b02..cd130ca84 100644
--- a/bindings/guile/CMakeLists.txt
+++ b/bindings/guile/CMakeLists.txt
@@ -127,7 +127,8 @@ endif()
gnc_add_scheme_targets(scm-core-utils
SOURCES "${core_utils_SCHEME}"
OUTPUT_DIR ${GUILE_OUTPUT_DIR}
- DEPENDS "${GUILE_DEPENDS}")
+ DEPENDS "${GUILE_DEPENDS}"
+ MAKE_LINKS)
set (engine_SCHEME_0
gnc-numeric.scm
@@ -162,12 +163,14 @@ gnc_add_scheme_targets(scm-engine-0
gnc_add_scheme_targets(scm-engine-1
SOURCES "${engine_SCHEME_1}"
OUTPUT_DIR gnucash
- DEPENDS "scm-core-utils;scm-engine-0;${GUILE_DEPENDS}")
+ DEPENDS "scm-core-utils;scm-engine-0;${GUILE_DEPENDS}"
+ MAKE_LINKS)
gnc_add_scheme_targets(scm-engine-2
SOURCES "${engine_SCHEME_2}"
OUTPUT_DIR gnucash
- DEPENDS "scm-engine-1;${GUILE_DEPENDS}")
+ DEPENDS "scm-engine-1;${GUILE_DEPENDS}"
+ MAKE_LINKS)
gnc_add_scheme_targets(scm-options
diff --git a/common/cmake_modules/GncAddTest.cmake b/common/cmake_modules/GncAddTest.cmake
index 6ee6aa62b..0bd7183cd 100644
--- a/common/cmake_modules/GncAddTest.cmake
+++ b/common/cmake_modules/GncAddTest.cmake
@@ -32,7 +32,7 @@ function(get_guile_env)
list(APPEND env "GUILE=${GUILE_EXECUTABLE}")
set(guile_load_paths "")
- #list(APPEND guile_load_paths "${CMAKE_BINARY_DIR}/${GUILE_REL_SITEDIR}")
+ 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/CMakeLists.txt b/gnucash/gnome-utils/CMakeLists.txt
index 014431974..7839eb27b 100644
--- a/gnucash/gnome-utils/CMakeLists.txt
+++ b/gnucash/gnome-utils/CMakeLists.txt
@@ -267,7 +267,8 @@ gnc_add_scheme_targets(scm-gnome-utils-1
gnc_add_scheme_targets(scm-gnome-utils-2
SOURCES gnome-utils.scm
OUTPUT_DIR gnucash
- DEPENDS "scm-gnome-utils-1")
+ DEPENDS "scm-gnome-utils-1"
+ MAKE_LINKS)
add_custom_target(scm-gnome-utils ALL DEPENDS scm-gnome-utils-2 scm-gnome-utils-1)
diff --git a/gnucash/html/CMakeLists.txt b/gnucash/html/CMakeLists.txt
index 1ac6a9fe0..acd8ea0b5 100644
--- a/gnucash/html/CMakeLists.txt
+++ b/gnucash/html/CMakeLists.txt
@@ -41,7 +41,8 @@ set(GUILE_DEPENDS gnc-html gnucash-guile scm-core-utils)
gnc_add_scheme_targets(scm-gnc-html
SOURCES "${gnc_html_SCHEME}"
OUTPUT_DIR ${GUILE_OUTPUT_DIR}
- DEPENDS "${GUILE_DEPENDS}")
+ DEPENDS "${GUILE_DEPENDS}"
+ MAKE_LINKS)
set_dist_list(html_DIST CMakeLists.txt ${html_HEADERS} ${html_SOURCES} gnc-html.i ${html_EXTRA_DIST} html.scm)
diff --git a/gnucash/report/CMakeLists.txt b/gnucash/report/CMakeLists.txt
index 3e33038b0..25331a1d8 100644
--- a/gnucash/report/CMakeLists.txt
+++ b/gnucash/report/CMakeLists.txt
@@ -108,12 +108,14 @@ gnc_add_scheme_targets(scm-report-2
gnc_add_scheme_targets(scm-report-eguile-parts
SOURCES "${report_eguile_parts_SCHEME}"
OUTPUT_DIR "gnucash/eguile"
- DEPENDS scm-report-2)
+ DEPENDS scm-report-2
+ MAKE_LINKS)
gnc_add_scheme_targets(scm-report-eguile
SOURCES "${report_eguile_SCHEME}"
OUTPUT_DIR "gnucash"
- DEPENDS scm-report-eguile-parts)
+ DEPENDS scm-report-eguile-parts
+ MAKE_LINKS)
add_custom_target(scm-report ALL DEPENDS scm-report-2 scm-report-eguile)
diff --git a/libgnucash/tax/CMakeLists.txt b/libgnucash/tax/CMakeLists.txt
index e0ffe9df7..945bc7b8c 100644
--- a/libgnucash/tax/CMakeLists.txt
+++ b/libgnucash/tax/CMakeLists.txt
@@ -56,7 +56,8 @@ gnc_add_scheme_targets(scm-tax-us-2
gnc_add_scheme_targets(scm-tax-us-3
SOURCES "${gncmod_tax_us_SCHEME_3}"
OUTPUT_DIR "gnucash/locale/us"
- DEPENDS "scm-tax-us-2;${GUILE_DEPENDS}")
+ DEPENDS "scm-tax-us-2;${GUILE_DEPENDS}"
+ MAKE_LINKS)
gnc_add_scheme_targets(scm-tax-de_DE-1
SOURCES "${gncmod_tax_de_DE_SCHEME_1}"
commit 7cae61d97a495b1280a4c17686cb9d6c3c4f142f
Author: Richard Cohen <richard at daijobu.co.uk>
Date: Thu Feb 23 21:53:03 2023 +0000
Make the scheme tests fail immediately if they load an external gnucash file
This would be a mistake in the build, but can happen if there
is already a gnucash installed in the standard guile load path.
diff --git a/common/cmake_modules/GncAddTest.cmake b/common/cmake_modules/GncAddTest.cmake
index e5043bff3..6ee6aa62b 100644
--- a/common/cmake_modules/GncAddTest.cmake
+++ b/common/cmake_modules/GncAddTest.cmake
@@ -109,7 +109,17 @@ endfunction()
function(gnc_add_scheme_test _TARGET _SOURCE_FILE)
add_test(${_TARGET} ${CMAKE_COMMAND} -E env
- ${GUILE_EXECUTABLE} --debug -c "(load-from-path \"${_TARGET}\")(exit (run-test))"
+ ${GUILE_EXECUTABLE} --debug -c "
+ (set! %load-hook
+ (lambda (filename)
+ (when (and filename
+ (string-contains filename \"${GUILE_REL_SITEDIR}\")
+ (not (string-prefix? \"${CMAKE_BINARY_DIR}\" filename)))
+ (format #t \"%load-path = ~s~%\" %load-path)
+ (format #t \"%load-compiled-path = ~s~%\" %load-compiled-path)
+ (error \"Loading guile/site file from outside build tree!\" filename))))
+ (load-from-path \"${_TARGET}\")
+ (exit (run-test))"
)
get_guile_env()
set_tests_properties(${_TARGET} PROPERTIES ENVIRONMENT "${GUILE_ENV};${ARGN}")
Summary of changes:
bindings/guile/CMakeLists.txt | 9 ++++++---
common/cmake_modules/GncAddTest.cmake | 14 ++++++++++++--
gnucash/gnome-utils/CMakeLists.txt | 3 ++-
gnucash/html/CMakeLists.txt | 3 ++-
gnucash/report/CMakeLists.txt | 6 ++++--
libgnucash/tax/CMakeLists.txt | 3 ++-
6 files changed, 28 insertions(+), 10 deletions(-)
More information about the gnucash-changes
mailing list