gnucash unstable: Multiple changes pushed

Geert Janssens gjanssens at code.gnucash.org
Fri Jan 26 13:01:47 EST 2018


Updated	 via  https://github.com/Gnucash/gnucash/commit/ec3ca043 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/18feaa16 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/00396db5 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/0f4a72b4 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/85bfbd8e (commit)
	 via  https://github.com/Gnucash/gnucash/commit/1b02517e (commit)
	 via  https://github.com/Gnucash/gnucash/commit/f6ae9868 (commit)
	from  https://github.com/Gnucash/gnucash/commit/dfa9c526 (commit)



commit ec3ca0430af4690f59ed04028f787215ff7a1c10
Author: Geert Janssens <geert at kobaltwit.be>
Date:   Fri Jan 26 17:39:25 2018 +0100

    Fix test-cashflow-barchart.scm for guile 2.2
    
    At the same time enable guile 2.2 for our arch ci test
    so gnucash gets ci testing with that version as well

diff --git a/gnucash/report/report-system/html-barchart.scm b/gnucash/report/report-system/html-barchart.scm
index 6ef3c2d..75ef17e 100644
--- a/gnucash/report/report-system/html-barchart.scm
+++ b/gnucash/report/report-system/html-barchart.scm
@@ -452,7 +452,7 @@
                    },
                    series: series,
                    axesDefaults: {
-                   },        
+                   },
                    grid: {
                    },
                    axes: {
diff --git a/gnucash/report/standard-reports/test/test-cashflow-barchart.scm b/gnucash/report/standard-reports/test/test-cashflow-barchart.scm
index 12cfd5b..156f48f 100644
--- a/gnucash/report/standard-reports/test/test-cashflow-barchart.scm
+++ b/gnucash/report/standard-reports/test/test-cashflow-barchart.scm
@@ -35,6 +35,8 @@
 (use-modules (ice-9 streams))
 (use-modules (srfi srfi-1))
 
+;; Explicitly set locale to make the report output predictable
+(setlocale LC_ALL "C")
 
 (define (run-test)
   (logging-and (test-in-txn)
diff --git a/util/ci/arch-docker b/util/ci/arch-docker
index dc5c947..e870796 100644
--- a/util/ci/arch-docker
+++ b/util/ci/arch-docker
@@ -1,5 +1,5 @@
 from base/archlinux
-run pacman -Syu --quiet --noconfirm gcc cmake make boost python2 pkg-config guile2.0 guile git ninja gtest gmock sqlite3 webkit2gtk swig gwenhywfar aqbanking intltool libxslt postgresql-libs libmariadbclient libdbi libdbi-drivers > /dev/null
+run pacman -Syu --quiet --noconfirm gcc cmake make boost python2 pkg-config guile git ninja gtest gmock sqlite3 webkit2gtk swig gwenhywfar aqbanking intltool libxslt postgresql-libs libmariadbclient libdbi libdbi-drivers > /dev/null
 run echo en_US.UTF-8 UTF-8 >> /etc/locale.gen
 run echo en_GB.UTF-8 UTF-8 >> /etc/locale.gen
 run echo fr_FR.UTF-8 UTF-8 >> /etc/locale.gen

commit 18feaa16a79b43828baecb46367887e282e065a1
Author: Geert Janssens <geert at kobaltwit.be>
Date:   Fri Jan 26 18:15:56 2018 +0100

    Remove support code to load qof backend in autotools based build environment

diff --git a/libgnucash/engine/qof-backend.cpp b/libgnucash/engine/qof-backend.cpp
index b954ec8..e1a646f 100644
--- a/libgnucash/engine/qof-backend.cpp
+++ b/libgnucash/engine/qof-backend.cpp
@@ -83,44 +83,6 @@ QofBackend::get_message ()
     return std::move(m_error_msg);
 }
 
-/* Helper function that returns a directory from which the requested module
- * can be loaded. This is needed because the location of the modules
- * depends on
- * - whether we're running in an installed environment or the build environment
- * - the operating system
- * - (in the build environment) which build system is used
- *
- * Note parameter rel_path is only used when invoked in the build environment
- * and even then only for autotools builds because each backend module is likely
- * to reside in its own directory in that configuration. At install time or in a
- * cmake build it is assumed all backend modules reside in one single directory.
- */
-static char* get_default_module_dir(const char* rel_path)
-{
-    gchar *pkglibdir;
-    const gchar *builddir = g_getenv ("GNC_BUILDDIR");
-    gboolean uninstalled = (g_getenv ("GNC_UNINSTALLED") != NULL
-                            && builddir != NULL);
-
-    if (uninstalled)
-    {
-#ifdef CMAKE_BUILD
-        pkglibdir = gnc_path_get_pkglibdir ();
-#else
-        if (rel_path)
-            pkglibdir = g_build_path (G_DIR_SEPARATOR_S, builddir,
-                                      "libgnucash", "backend", rel_path, ".libs", NULL);
-        else
-            pkglibdir = g_build_path (G_DIR_SEPARATOR_S, builddir,
-                                      "libgnucash", "backend", ".libs", NULL);
-#endif
-    }
-    else
-        pkglibdir = gnc_path_get_pkglibdir ();
-
-    return pkglibdir;
-}
-
 bool
 QofBackend::register_backend(const char* directory, const char* module_name)
 {
@@ -130,9 +92,9 @@ QofBackend::register_backend(const char* directory, const char* module_name)
         return false;
     }
 
-    auto absdir = g_strdup(directory);
+    auto absdir = directory;
     if (!absdir || !g_path_is_absolute(absdir))
-        absdir = get_default_module_dir(directory);
+        absdir = gnc_path_get_pkglibdir ();
     auto fullpath = g_module_build_path (absdir, module_name);
 /* Darwin modules can have either .so or .dylib for a suffix */
     if (!g_file_test (fullpath, G_FILE_TEST_EXISTS) &&
@@ -143,7 +105,6 @@ QofBackend::register_backend(const char* directory, const char* module_name)
         fullpath = g_build_filename (absdir, modname, NULL);
         g_free (modname);
     }
-    g_free (absdir);
     auto backend = g_module_open (fullpath, G_MODULE_BIND_LAZY);
     g_free (fullpath);
     if (!backend)

commit 00396db5607a32edeefc1d89c8d1339aeaa55dbc
Author: Geert Janssens <geert at kobaltwit.be>
Date:   Fri Jan 26 18:02:00 2018 +0100

    Remove the .in extension from test-real-data.sh and stop configuring it for autotools
    
    We have dropped support for autotools and cmake invokes this script using /bin/bash <script>
    So the exact shebang value is not relevant any more

diff --git a/common/cmake_modules/MakeDistFiles.cmake b/common/cmake_modules/MakeDistFiles.cmake
index 675ac32..68aa8b3 100644
--- a/common/cmake_modules/MakeDistFiles.cmake
+++ b/common/cmake_modules/MakeDistFiles.cmake
@@ -43,7 +43,6 @@ SET(COPY_FROM_BUILD
   doc/gnucash.1
   libgnucash/app-utils/swig-app-utils-guile.c
   libgnucash/app-utils/swig-app-utils-python.c
-  libgnucash/backend/xml/test/test-real-data.sh
   gnucash/gnucash.rc
   libgnucash/core-utils/gnc-vcs-info.h
   libgnucash/core-utils/swig-core-utils-guile.c
diff --git a/libgnucash/backend/xml/test/CMakeLists.txt b/libgnucash/backend/xml/test/CMakeLists.txt
index e74de22..0f98769 100644
--- a/libgnucash/backend/xml/test/CMakeLists.txt
+++ b/libgnucash/backend/xml/test/CMakeLists.txt
@@ -61,15 +61,10 @@ SET_LOCAL_DIST(test_backend_xml_DIST_local CMakeLists.txt grab-types.pl
   test-dom-parser1.cpp test-file-stuff.cpp test-file-stuff.h test-kvp-frames.cpp
   test-load-backend.cpp test-load-example-account.cpp  test-load-xml2.cpp
   test-save-in-lang.cpp test-string-converters.cpp test-xml2-is-file.cpp
-  test-xml-account.cpp test-real-data.sh.in test-xml-commodity.cpp
+  test-xml-account.cpp test-real-data.sh test-xml-commodity.cpp
   test-xml-pricedb.cpp test-xml-transaction.cpp)
 SET(test_backend_xml_DIST ${test_backend_xml_DIST_local} ${test_backend_xml_test_files_DIST} PARENT_SCOPE)
 
-# The test test-dom-parser1.c is not run by 
-
-# This line for autotools
-CONFIGURE_FILE(test-real-data.sh.in test-real-data.sh)
-
 ADD_XML_TEST(test-date-converting "${test_backend_xml_base_SOURCES};test-date-converting.cpp")
 ADD_XML_TEST(test-dom-converters1 "${test_backend_xml_base_SOURCES};test-dom-converters1.cpp")
 ADD_XML_TEST(test-kvp-frames      "${test_backend_xml_base_SOURCES};test-kvp-frames.cpp")
@@ -77,7 +72,7 @@ ADD_XML_TEST(test-load-backend  test-load-backend.cpp)
 ADD_XML_TEST(test-load-xml2 test-load-xml2.cpp
   GNC_TEST_FILES=${CMAKE_CURRENT_SOURCE_DIR}/test-files/xml2
 )
-# Not run in autotools.
+# FIXME Why is this test not run/running ?
 #ADD_XML_TEST(test-save-in-lang test-save-in-lang.cpp
 #  GNC_TEST_FILES=${CMAKE_CURRENT_SOURCE_DIR}/test-files/xml2
 #)
@@ -108,6 +103,6 @@ SET(test-real-data-env
 )
 ADD_TEST(NAME test-real-data
    COMMAND ${CMAKE_COMMAND_TMP}
-    ${SHELL} ${CMAKE_CURRENT_SOURCE_DIR}/test-real-data.sh.in
+    ${SHELL} ${CMAKE_CURRENT_SOURCE_DIR}/test-real-data.sh
 )
 SET_TESTS_PROPERTIES(test-real-data PROPERTIES ENVIRONMENT "${test-real-data-env}")
diff --git a/libgnucash/backend/xml/test/test-real-data.sh.in b/libgnucash/backend/xml/test/test-real-data.sh
similarity index 98%
rename from libgnucash/backend/xml/test/test-real-data.sh.in
rename to libgnucash/backend/xml/test/test-real-data.sh
index 49e757b..de2a347 100755
--- a/libgnucash/backend/xml/test/test-real-data.sh.in
+++ b/libgnucash/backend/xml/test/test-real-data.sh
@@ -1,4 +1,4 @@
-#!@SHELL@
+#!/bin/bash
 
 #set -e
 

commit 0f4a72b49f766f861bc4e791f1c842a52f3cc524
Author: Geert Janssens <geert at kobaltwit.be>
Date:   Fri Jan 26 16:09:33 2018 +0100

    Remove unused file

diff --git a/libgnucash/backend/dbi/CMakeLists.txt b/libgnucash/backend/dbi/CMakeLists.txt
index b3bb506..0ec2d39 100644
--- a/libgnucash/backend/dbi/CMakeLists.txt
+++ b/libgnucash/backend/dbi/CMakeLists.txt
@@ -2,8 +2,6 @@
 
 ADD_SUBDIRECTORY(test)
 
-# Source file gncmod-backend-dbi.c does not appear to be use in Makefile.in, so not included here.
-
 SET (backend_dbi_SOURCES
   gnc-backend-dbi.cpp
   gnc-dbisqlresult.cpp
diff --git a/libgnucash/backend/dbi/gncmod-backend-dbi.c b/libgnucash/backend/dbi/gncmod-backend-dbi.c
deleted file mode 100644
index 87846e0..0000000
--- a/libgnucash/backend/dbi/gncmod-backend-dbi.c
+++ /dev/null
@@ -1,83 +0,0 @@
-/*********************************************************************
- * gncmod-backend-dbi.c
- * module definition/initialization for the dbi backend module
- *
- *  @author Copyright (c) 2006-2008 Phil Longstaff <plongstaff at rogers.com>
- *********************************************************************/
-/********************************************************************\
- * 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 at gnu.org                   *
- *                                                                  *
-\********************************************************************/
-
-
-#include <stdio.h>
-#include <gmodule.h>
-/* #include <glib-gobject.h> */
-
-#include "gnc-module.h"
-#include "gnc-module-api.h"
-
-/* version of the gnc module system interface we require */
-int gnc_module_system_interface = 0;
-
-/* module versioning uses libtool semantics. */
-int gnc_module_current  = 0;
-int gnc_module_revision = 0;
-int gnc_module_age      = 0;
-
-
-static GNCModule engine;
-
-gchar*
-gnc_module_path (void)
-{
-    return g_strdup ("gnucash/backend/dbi");
-}
-
-gchar*
-gnc_module_description (void)
-{
-    return g_strdup ("The DBI/SQL backend for GnuCash");
-}
-
-int
-gnc_module_init (int refcount)
-{
-    engine = gnc_module_load ("gnucash/engine", 0);
-    if (!engine) return FALSE;
-
-    return TRUE;
-}
-
-int
-gnc_module_end (int refcount)
-{
-    int unload = TRUE;
-
-    if (engine != NULL)
-    {
-        unload = gnc_module_unload (engine);
-    }
-
-    if (refcount == 0)
-    {
-        engine = NULL;
-    }
-
-    return unload;
-}
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
index 0051314..591e9a2 100644
--- a/po/POTFILES.skip
+++ b/po/POTFILES.skip
@@ -1,6 +1,5 @@
 # These are files that we don't want to translate, because they are
 # not distributed.
-libgnucash/backend/dbi/gncmod-backend-dbi.c
 libgnucash/backend/xml/gncmod-backend-xml.c
 libgnucash/backend/xml/gncmod-backend-xml.cpp
 gnucash/gnome-utils/gnc-tree-model-selection.c

commit 85bfbd8e8258e9ff5d7840dc3577b8d9efdd38c4
Author: Geert Janssens <geert at kobaltwit.be>
Date:   Fri Jan 26 16:06:29 2018 +0100

    Some minor cleanups after the autotools removal
    
    This includes removal of the now unused make-gnucash-potfiles.in,
    checking for CMakeLists.txt rather than Makefile.am in gnc-vcs-info,
    upating the HACKING file,
    and generally updating references to autotools.
    
    I have kept "Makefile.*" exclude patterns in our CMakeLists.txt files
    because they may still be lingering in the source directory from
    previous autogen.sh runs. At some point these should probably be
    removed as well still, together with the gitignore references to them.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index dc05e39..92a4818 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -765,8 +765,8 @@ ADD_SUBDIRECTORY(cmake)
 SET(PACKAGE_PREFIX "${PACKAGE}-${PACKAGE_VERSION}")
 SET(DIST_FILE "${PACKAGE_PREFIX}.tar")
 
-SET(toplvl_DIST_local ${gnucash_DOCS} ChangeLog.2015 ChangeLog.2016
-  CMakeLists.txt make-gnucash-potfiles.in README)
+SET(toplvl_DIST_local ${gnucash_DOCS}
+  CMakeLists.txt README)
 
 
 SET_LOCAL_DIST(toplvl_DIST ${toplvl_DIST_local})
@@ -809,7 +809,6 @@ ADD_CUSTOM_COMMAND(OUTPUT ${DIST_FILE}.gz ${DIST_FILE}.bz2
            -D BUILD_SOURCE_DIR=${BUILD_SOURCE_DIR}
            -D BUILDING_FROM_VCS=${BUILDING_FROM_VCS}
            -D SHELL=${SHELL}
-           -D AUTOTOOLS_IN_DIST=${AUTOTOOLS_IN_DIST}
            -D WITH_GNUCASH=${WITH_GNUCASH}
            -P ${CMAKE_SOURCE_DIR}/common/cmake_modules/MakeDist.cmake
 
diff --git a/HACKING b/HACKING
index 24b8ed6..934ed8b 100644
--- a/HACKING
+++ b/HACKING
@@ -73,13 +73,24 @@ August 22, 2000
 TIPS AND HINTS
 ==============
 
+Building GnuCash in-tree
+------------------------
+This is generally discouraged. You should always use a separate build directory,
+preferably outside of the source directory. If you really want a build directory
+inside your source directory, make it a hidden one (starting with a '.'), to
+keep intltool from incorrectly picking up translatable strings from the build directory.
+
 Starting GnuCash from the build tree
 ------------------------------------
-This is known to not work very well.  Instead, `--prefix` your build into /opt/gnc/svn/ (or some such).
+This should mostly work, but there may be corner cases where it behaves differently from
+running gnucash from the target installation directory. You can tell cmake which
+install directory to use via the command line switch '-DCMAKE_INSTALL_PREFIX='
+Don't use '/usr' or '/usr/local' unless you're a package maintainer for a distro.
+Instead choose /opt/gnc/git/ or even $HOME/gnc/git (or something similar).
 
 Getting Trace Messages From GnuCash
 -----------------------------------
-See the doxygen comments in src/engine/qoflog.h (and .c)
+See the doxygen comments in libgnucash/engine/qoflog.h (and .c)
 
 Starting GnuCash in GDB
 -----------------------
@@ -87,10 +98,6 @@ To run gdb on an installed version of gnucash (installed in /opt/gnc/unstable:)
 
     % gdb /opt/gnc/unstable/bin/gnucash
 
-OS X/Quartz developers can't run gnucash in gdb this way. They should instead use:
-
-    % /opt/gnc/unstable/bin/gnucash-gdb
-
 You'll also probably want to know about these:
 
     gdb> catch fork
@@ -116,15 +123,17 @@ jsled does not need the above with emacs-22, thankfully.  It was getting quite t
 
 Using Electric Fence with GnuCash
 ---------------------------------
-    % configure --enable-efence
-(except this doesn't actually enable efence :-( need to hack
-configure.in and add $LIBS = -lefence and re-run ./autogen.sh)
+There are currently no rules in our build system to build and run gnucash
+or unit tests with Electric Fence.
 
-Don't know why, efence does not currently work with gnucash:
-I get a bunch of errors:
-   warning: Cannot initialize thread debugging library: unknown thread_db error '22'
+I should probably be relatively straightforward to add this as all it
+needs is to link with libefence.so (-lefence).
 
-If you know how to fix this, please update these instructions.
+Fedora 27 ships an ElectricFence package containing that libary and also
+an exectuable 'ef' to run an arbitrary program with Electric Fence
+guarding enabled. I have given it a quick spin on gnucash but it immediatly
+crashes. I haven't investigated whether this is because I should first have
+linked gnucash with -lefence or because a real problem in GnuCash code.
 
 
 Using Valgrind with GnuCash
@@ -157,6 +166,7 @@ These commands may be useful to find out the library that actually
 exported a particular symbol, and to check which import symbol one
 particular library depends upon and where they are imported
 from. Run these from the top-level of the build tree.
+Note "lib64" below should be "lib" for a 32-bit build.
 
 # Create a table of all exported symbols and where they come from
 nm -A `find . -name '*.so'` | grep ' T ' | \
@@ -164,26 +174,26 @@ nm -A `find . -name '*.so'` | grep ' T ' | \
 
 # For a particular library, check symbol import requirements, 
 # listing all symbols (needs the file from above)
-A=src/gnc-module/.libs/libgw-gnc-module.so && echo "$A requirements:" \
+A=lib64/libgnc-module.so && echo "$A requirements:" \
   && nm $A | grep ' U ' | sed 's/^.* \([^ ]*\)$/\1/' | \
   grep -wFf- exportedsymbols
 
 # For a particular library, check import requirements, 
 # summarized by library
-A=src/gnc-module/.libs/libgw-gnc-module.so && echo "$A requirements:" \
+A=lib64/libgnc-module.so && echo "$A requirements:" \
   && nm $A | grep ' U ' | sed 's/^.* \([^ ]*\)$/\1/' | \
   grep -wFf- exportedsymbols | cut -d: -f1 | sort | uniq
 
 # For a particular library, check import requirements, 
-# summarized by library, formatted for Makefile.am
-A=src/gnc-module/.libs/libgw-gnc-module.so && echo "$A requirements:" \
+# summarized by library, formatted for a cmake TARGET_LINK_LIBRARIES command
+A=lib64/libgnc-gnome.so && echo "$A target link libraries:" \
   && nm $A | grep ' U ' | sed 's/^.* \([^ ]*\)$/\1/' | \
   grep -wFf- exportedsymbols | cut -d: -f1 | sort | uniq | \
-  sed 's!.libs/!!' | sed 's/.so$/.la \\/' | sed 's!^.!  \${top_builddir}!'
+  sed 's!.*/lib!  !' | sed 's/.so$//'
 
 # List all import requirements summarized by library for a full
 # recursive directory tree
-for A in `find src/business/business-core -name '*.so'`; do \
+for A in `find lib64 -name '*.so'`; do \
   echo -e "\n##$A requirements:" && nm $A | grep ' U ' | \
   sed 's/^.* \([^ ]*\)$/\1/' | grep -wFf- exportedsymbols | \
   cut -d: -f1 | sort | uniq; done
@@ -196,6 +206,10 @@ source tree.  This project can be used with XCode on a Macintosh to debug
 GnuCash.  It is not set up to build GnuCash, but only to debug it. Building must
 be done using the normal command line tools.
 
+Note this XCode project has not been updated since the big directory restructuring
+preceding the 2.7.1 release. So it will currently not find source files where
+it's expecting them.
+
 This project is designed to be used with the X Window version of GnuCash, not
 the native Quartz version.  To use it you must build and install GnuCash into
 directories "build" and "install" parallel to the source directory.  Furthermore
diff --git a/README b/README
index ed24e0e..27f5513 100644
--- a/README
+++ b/README
@@ -207,8 +207,6 @@ http://wiki.gnucash.org/wiki/Locale_Settings
 Building & Installing
 ---------------------
 
-(For additional build system details, see doc/README.build-system.)
-
 GnuCash uses CMake to handle the build process. Details are available
 in cmake/README_CMAKE.txt (If you are building directly from Git, read
 the README.git file for more instructions.) 
diff --git a/cmake/README_CMAKE.txt b/cmake/README_CMAKE.txt
index 07d7b1b..9986f8f 100644
--- a/cmake/README_CMAKE.txt
+++ b/cmake/README_CMAKE.txt
@@ -13,7 +13,7 @@ Some advantages of using CMake:
 
  * The build time on Windows drops from around an hour to just a few
    minutes.
-   
+
  * CMake supports the generation of build files for several IDEs
    such as Xcode, Eclipse, KDevelop and others. The open source Qt
    Creator and the commercial CLion C/C++ IDE from JetBrains can use
@@ -25,7 +25,7 @@ Some advantages of using CMake:
 This setup also uses the http://www.ninja-build.org[Ninja] build
 system to enable fast and parallel builds on Windows. (On POSIX
 systems [OS X, Linux, FreeBSD, etc.] Ninja does not seem significantly
-faster that using the default Makefile generator to me.)
+faster than using the default Makefile generator to me.)
 
 == Scope
 
@@ -62,8 +62,7 @@ Limitations include:
 
 The CMake setup does not support building and installing dependencies
 (although it probably could some day). So you need to have the
-dependencies available, most likely by having run the existing
-Autotools build at least once. Various resources on the GnuCash wiki
+dependencies available. Various resources on the GnuCash wiki
 will have advice on how to do this.
 
 You will need to have CMake and optionally Ninja installed, either
diff --git a/common/cmake_modules/MakeDistCheck.cmake b/common/cmake_modules/MakeDistCheck.cmake
index c172b07..05d019c 100644
--- a/common/cmake_modules/MakeDistCheck.cmake
+++ b/common/cmake_modules/MakeDistCheck.cmake
@@ -50,7 +50,6 @@ FUNCTION(RUN_DIST_CHECK PACKAGE_PREFIX EXT)
               -D CMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
               -D CMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}
               -D CMAKE_INSTALL_PREFIX=../${INSTALL_DIR}
-              -D AUTOTOOLS_IN_DIST=${AUTOTOOLS_IN_DIST}
               ../${PACKAGE_PREFIX}
             WORKING_DIRECTORY ${BUILD_DIR}
             ERROR_MSG "CMake configure command failed."
diff --git a/common/cmake_modules/MakeDistFiles.cmake b/common/cmake_modules/MakeDistFiles.cmake
index 2fb80db..675ac32 100644
--- a/common/cmake_modules/MakeDistFiles.cmake
+++ b/common/cmake_modules/MakeDistFiles.cmake
@@ -41,7 +41,6 @@ ENDFUNCTION()
 SET(COPY_FROM_BUILD
   ChangeLog
   doc/gnucash.1
-  libgnucash/app-utils/migratable-prefs.xml
   libgnucash/app-utils/swig-app-utils-guile.c
   libgnucash/app-utils/swig-app-utils-python.c
   libgnucash/backend/xml/test/test-real-data.sh
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index 5f86e5e..caced19 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -18,7 +18,7 @@ SET(doc_DATA
 
 SET(doc_noinst_DATA
         build-aix.txt build-solaris.txt CMakeLists.txt gnc-fq-dump.1 gnc-fq-helper.1 gnucash.1.in gtkrc-2.0.gnucash
-        misc-notes.txt README.build-system README.HBCI README.OFX README.translator.txt tip_of_the_day.list.in
+        misc-notes.txt README.HBCI README.OFX README.translator.txt tip_of_the_day.list.in
         TRANSLATION_HOWTO)
 
 INSTALL(FILES ${doc_DATA} DESTINATION  ${CMAKE_INSTALL_DATADIR}/doc/gnucash)
diff --git a/doc/README.build-system b/doc/README.build-system
deleted file mode 100644
index dc3dfb3..0000000
--- a/doc/README.build-system
+++ /dev/null
@@ -1,83 +0,0 @@
--*-text-*-
-
-===========================================================================
-Automake
-
-GnuCash uses automake to handle the build process.  Make sure you
-understand what automake provides/requires before you add anything
-particularly fancy to the Makefile.am files.
-
-Most of the time, a "make" or "make install" will automatically DTRT
-and regenerate Makefiles or Makefile.ins, re-run configure, regenerate
-configure from configure.in, etc. whenever needed.  However, it is
-possible, if you make a mistake when working on the Makefile.am's to
-leave yourself in a situation where automake won't work because a
-Makefile is broken.  To fix this, just run:
-
- ./autogen.sh
- ./configure <your usual options>
-
-That should sledgehammer the problem bit back into place.
-
-===========================================================================
-Adding files to AC_OUTPUT in configure.in.
-
-Please do not add any non-makefiles to AC_OUTPUT unless you're
-*absolutely* sure that it's safe and necessary to do so.  If you're
-not sure, then please use the "generation with sed by hand approach"
-that we use for other non-makefiles like src/scm/bootstrap.scm.  See
-src/scm/bootstrap.scm.in and src/scm/Makefile.in for details.
-
-The reasoning behind this is that there are often variables that
-autoconf uses and replaces via the @@ mechanism that are recursively
-defined in terms of other variables.  For example, @datadir@ might
-expand into $prefix/share, which itself contains an unexpanded
-variable.  Unless the @datadir@ replacement is performed on a file
-that will eventually be processed by make, there's no guarantee that
-the variable will *ever* be fully expanded and then your code will
-break.
-
-To get around this, we handle all non-makefiles (with a few notable
-exceptions) manually with sed.  For example, we have
-src/scm/bootstrap.scm.in which is processed in src/scm/Makefile.in
-according to the following rule:
-
-  bootstrap.scm: bootstrap.scm.in
-        rm -f $@.tmp
-        sed < $@.in > $@.tmp \
-            -e 's:[@]VERSION[@]:${VERSION}:g' \
-            -e 's:[@]GNC_CONFIGDIR[@]:${GNC_SHAREDIR}:g' \
-            -e 's:[@]GNC_SHAREDIR[@]:${GNC_CONFIGDIR}:g'
-        chmod +x $@.tmp
-        mv $@.tmp $@
-
-This approach guarantees that the variables referred to will be
-properly expanded at the right times.
-
-Note that on OSX, you MUST have the GNU version of sed installed
-via fink - the BSD version installed by default will not work with
-some of the substitution operators used in the gnucash build.
-
-The only non-Makefiles files that must be handled directly by
-AC_OUTPUT are files that refer to variables that, when expanded, may
-have makefile-hostile characters like '#' in them like
-INCLUDE_LOCALE_H.  These may need to be replaced directly in the
-relevant file via AC_OUTPUT since going through a makefile would break
-the makefile when it interprets the '#' as the beginning of a comment.
-You'd have something like this:
-
-  FOO = "#include <locale.h>"
-
-If you end up in a situation where you need to refer to both these
-makefile-hostile variables and non-makefile hostile variables in the
-same file, please restructure things (breaking the file up if
-necessary) so that only the makefile hostile variables are in the
-files being handled by AC_OUTPUT directly.
-
-===========================================================================
-
-It is not safe to use $prefix in configure.in for anything other than
-an unexpanded reference.  If the user doesn't specify a --prefix, then
-it'll be set to NONE until the end of the configure process.
-
-===========================================================================
diff --git a/gnucash/import-export/aqb/test/test-aqb.c b/gnucash/import-export/aqb/test/test-aqb.c
index 0dda117..fe6d1f8 100644
--- a/gnucash/import-export/aqb/test/test-aqb.c
+++ b/gnucash/import-export/aqb/test/test-aqb.c
@@ -21,8 +21,6 @@
 \********************************************************************/
 
 
-/* This is a template test program. Copy it to the test sudirectory and rename it test_modulename.c. (Use the same modulename that you gave Makefile.am in the same directory.
-Write and link other test files */
 #include <glib.h>
 #include <config.h>
 #include <qof.h>
diff --git a/gnucash/report/locale-specific/us/test/CMakeLists.txt b/gnucash/report/locale-specific/us/test/CMakeLists.txt
index 4b84631..8a5c0c3 100644
--- a/gnucash/report/locale-specific/us/test/CMakeLists.txt
+++ b/gnucash/report/locale-specific/us/test/CMakeLists.txt
@@ -5,7 +5,7 @@ GNC_ADD_TEST(test-link-module-report-locale-specific-us test-link-module.c
   LOCALE_SPECIFIC_US_TEST_INCLUDE_DIRS LOCALE_SPECIFIC_US_TEST_LIBS
 )
 
-# This test not run in the autotools build.
+# FIXME why is this not run/running?
 #SET(GUILE_DEPENDS
 #  gncmod-app-utils
 #  gnc-core-utils
diff --git a/gnucash/report/report-system/test/CMakeLists.txt b/gnucash/report/report-system/test/CMakeLists.txt
index 536f4f0..d9c8848 100644
--- a/gnucash/report/report-system/test/CMakeLists.txt
+++ b/gnucash/report/report-system/test/CMakeLists.txt
@@ -14,7 +14,7 @@ SET(scm_test_report_system_SOURCES
   test-collectors.scm
   test-list-extras.scm
   test-report-utilities.scm
-# test-test-extras.scm ;;Not run in autotools
+# test-test-extras.scm ;;FIXME why is this not run
   )
 
 GNC_ADD_SCHEME_TESTS(${scm_test_report_system_SOURCES})
diff --git a/libgnucash/app-utils/CMakeLists.txt b/libgnucash/app-utils/CMakeLists.txt
index 9f21331..bd8accd 100644
--- a/libgnucash/app-utils/CMakeLists.txt
+++ b/libgnucash/app-utils/CMakeLists.txt
@@ -147,8 +147,6 @@ SET(MIGRATABLE_PREFS_XML ${DATADIR_BUILD}/gnucash/migratable-prefs.xml)
 FILE(COPY make-prefs-migration-script.xsl DESTINATION ${DATADIR_BUILD}/gnucash)
 
 CONFIGURE_FILE(migratable-prefs.xml.in ${MIGRATABLE_PREFS_XML})
-# This configure_file is to generate the file for autotools
-CONFIGURE_FILE(migratable-prefs.xml.in migratable-prefs.xml)
 
 INSTALL(FILES ${MIGRATABLE_PREFS_XML} DESTINATION  ${CMAKE_INSTALL_DATADIR}/gnucash)
 INSTALL(FILES make-prefs-migration-script.xsl DESTINATION  ${CMAKE_INSTALL_DATADIR}/gnucash)
diff --git a/libgnucash/app-utils/test/CMakeLists.txt b/libgnucash/app-utils/test/CMakeLists.txt
index 54b9fd6..e103b1f 100644
--- a/libgnucash/app-utils/test/CMakeLists.txt
+++ b/libgnucash/app-utils/test/CMakeLists.txt
@@ -20,7 +20,7 @@ ENDMACRO()
 ADD_APP_UTILS_TEST(test-exp-parser test-exp-parser.c)
 GNC_ADD_TEST_WITH_GUILE(test-link-module-app-utils test-link-module APP_UTILS_TEST_INCLUDE_DIRS APP_UTILS_TEST_LIBS)
 ADD_APP_UTILS_TEST(test-print-parse-amount test-print-parse-amount.cpp)
-# This test not run in autotools build.
+# FIXME Why is this test not run ?
 #GNC_ADD_TEST_WITH_GUILE(test-print-queries test-print-queries.cpp APP_UTILS_TEST_INCLUDE_DIRS APP_UTILS_TEST_LIBS)
 GNC_ADD_TEST_WITH_GUILE(test-scm-query-string test-scm-query-string.cpp
   APP_UTILS_TEST_INCLUDE_DIRS APP_UTILS_TEST_LIBS
diff --git a/libgnucash/scm/main.scm b/libgnucash/scm/main.scm
index 178f33d..69f74db 100644
--- a/libgnucash/scm/main.scm
+++ b/libgnucash/scm/main.scm
@@ -50,7 +50,7 @@
 (export gnc:debug)
 (export gnc:safe-strcmp) ;; only used by aging.scm atm...
 
-;; Get the Makefile.am/configure.in generated variables.
+;; Get the cmake generated variables.
 (load-from-path "build-config")
 
 ;; Do this stuff very early -- but other than that, don't add any
diff --git a/libgnucash/tax/us/test/CMakeLists.txt b/libgnucash/tax/us/test/CMakeLists.txt
index bb91e00..35deda7 100644
--- a/libgnucash/tax/us/test/CMakeLists.txt
+++ b/libgnucash/tax/us/test/CMakeLists.txt
@@ -5,7 +5,7 @@ GNC_ADD_TEST(test-link-module-tax-us test-link-module.c
   TAX_US_TEST_INCLUDE_DIRS TAX_US_TEST_LIBS
 )
 
-# This test not run in autotools build.
+# FIXME why is this test not run ?
 #SET(GUILE_DEPENDS
 #  gnc-core-utils
 #  gnc-module
diff --git a/make-gnucash-potfiles.in b/make-gnucash-potfiles.in
deleted file mode 100644
index feed1f5..0000000
--- a/make-gnucash-potfiles.in
+++ /dev/null
@@ -1,83 +0,0 @@
-#!@PERL@ -w
-# -*- perl -*-
-#
-# This perl script is used to make po/POTFILES.in, the list
-# of files to be searched for translatable strings.
-#
-# It will exclude any files listed in po/POTFILES.skip, po/POTFILES.ignore
-# or that match the regexp patterns listed in @ignorepatterns.
-#
-# Author: Dave Peticolas <dave at krondo.com>
-
-use strict;
-use File::Basename;
-
-# Note: These are perl regexp patterns, *not* normal shell wildcards!
-my @ignorepatterns = ('gw-', 'test', 'experimental', 'python-bindings', 'swig-.*\.c');
-my (@skipped_files, @ignored_files);
-open(IN, "< @SRCDIR@/po/POTFILES.skip");
-while (<IN>) {
-    push @skipped_files, $_ unless $_ =~ /^\#/;
-}
-close IN;
-open(IN, "< @SRCDIR@/po/POTFILES.ignore");
-while (<IN>) {
-    push @ignored_files, $_ unless $_ =~ /^\#/;
-}
-close IN;
-
-# Sort filenames in POTFILES.in in a consistent way
-# This reduces the amount of clutter in our version manangement system
-# The files will be sorted
-# * per directory
-# * case-insensitive
-# * ignoring punctuation (-,_,.)
-#
-# This sort function has been extracted into a separate file (util/elegant-sort.pl)
-# in order to use the same algorithm in both cmake and autools based builds
-
-my @possible_files = `cd @SRCDIR@ && \\
-                      find bindings borrowed common libgnucash gnucash -name '*.c' \\
-                      -o -name '*.cpp' -o -name '*.glade' \\
-                      -o -name '*.desktop.in' -o -name '*.keys.in' \\
-                      -o -name '*.gschema.xml.in.in' -o -name '*.scm' \\
-                      | util/elegant-sort.pl`;
-## For perl files add the following:
-# -o -name '*.pl'
-
-print "# This is a list of files which contain translatable strings.\n";
-print "# This file was generated by ../make-gnucash-potfiles.\n";
-
-my %ignores;
-foreach my $file (@possible_files) {
-    chomp($file);
-    my ($name, $path) = fileparse($file);
-    $path =~ s/^\.\///;
-
-    foreach my $pat (@ignorepatterns, @skipped_files, @ignored_files) {
-        chomp($pat);
-        next unless $pat;
-
-        if ($file =~ m/$pat/ || $name =~ m/$pat/ || $path =~ m/$pat/) {
-            $ignores{$path . $name} = 1;
-        }
-    }
-    next if $ignores{$path . $name};
-
-    # Ignore unreadable files, e.g. dangling symlinks
-    next unless (-r "@SRCDIR@/" . $path . $name);
-
-    # Force parse type for gsettings files
-    my $type = "";
-    if ($file =~ m/.gschema.xml.in.in/ ){
-        $type = "[type: gettext/gsettings]";
-    }
-
-    print $type . $path . $name . "\n";
-}
-
-# These are manually added, because they're not picked up by the generation script
-print "gnucash/gnome/gnucash.appdata.xml.in\n";
-print "gnucash/gnome/gnucash.desktop.in.in\n";
-print "libgnucash/engine/qofbookslots.h\n";
-print "doc/tip_of_the_day.list.in\n";
diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt
index 21139a9..457a21c 100644
--- a/po/CMakeLists.txt
+++ b/po/CMakeLists.txt
@@ -101,9 +101,9 @@ FUNCTION(MAKE_GNUCASH_POTFILES)
   ENDFOREACH()
 
 
-  # CMake sorting different from UNIX sorting. Sort the files
-  # here so it is easier for me to compare to the autotools
-  # generated POTFILES.in
+  # CMake sorting is different from UNIX sorting. Use perl to
+  # sort POTFILES.in universally. This may no longer be needed
+  # now we have dropped autotools support.
   STRING(REPLACE ";" "\n" SORT_IN "${FILES}")
   SET(SORT_IN "${SORT_IN}\n")
   FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/POTFILES.in.in "${SORT_IN}")
@@ -118,7 +118,7 @@ FUNCTION(MAKE_GNUCASH_POTFILES)
   # intltool-update insists that this file be in the source directory. :-(
   SET(POTFILES_IN_PATH ${CMAKE_CURRENT_BINARY_DIR}/POTFILES.in)
   FILE(WRITE ${POTFILES_IN_PATH} "# This is a list of files which contain translatable strings.
-# This file was generated by ../make-gnucash-potfiles.
+# This file was autogenerated by cmake.
 ")
 
   FOREACH(path ${POTFILES})
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 5226d5f..73fdcc1 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,5 +1,5 @@
 # This is a list of files which contain translatable strings.
-# This file was generated by ../make-gnucash-potfiles.
+# This file was autogenerated by cmake.
 borrowed/goffice/go-charmap-sel.c
 borrowed/goffice/go-glib-extras.c
 borrowed/goffice/go-optionmenu.c
diff --git a/util/ci/afterfailure b/util/ci/afterfailure
index c71f7c7..dd065c1 100755
--- a/util/ci/afterfailure
+++ b/util/ci/afterfailure
@@ -5,17 +5,6 @@ if [[ "$BUILDTYPE" == "cmake-make" ]] || [[ "$BUILDTYPE" == "cmake-ninja" ]]; th
     echo "##### LastTest.log #####";
     echo "########################";
     cat /build/Testing/Temporary/LastTest.log;
-elif [[ "$BUILDTYPE" == "autotools" ]]; then
-    find . -name 'test*.log' -print0 |
-        while IFS= read -r -d '' logfile; do
-            SIZE=$((${#logfile} + 12));
-            HRULE=$(head -c "$SIZE" < /dev/zero | tr '\0' '#');
-            echo $HRULE;
-            echo "##### ${logfile} #####";
-            echo $HRULE;
-            cat -- "$logfile";
-            echo $'\n'$'\n';
-        done;
 else
     echo "Unknown BUILDTYPE: \"$BUILDTYPE\", cannot create failure information.";
 fi
diff --git a/util/ci/arch-testscript b/util/ci/arch-testscript
index b993a13..45f541a 100644
--- a/util/ci/arch-testscript
+++ b/util/ci/arch-testscript
@@ -9,9 +9,9 @@
 # Python is python 3, but gnucash doesn't work with python 3. There
 # doesn't seem to be a way to tell automake to use /usr/bin/python2,
 # so we'll mock this up
-mkdir autotools_bin
-ln -s /usr/bin/python2 autotools_bin/python
-export PATH=/autotools_bin:"$PATH"
+mkdir ourpython_bin
+ln -s /usr/bin/python2 ourpython_bin/python
+export PATH=/ourpython_bin:"$PATH"
 echo path is "$PATH"
 echo python version is "$(python --version)"
 
diff --git a/util/gnc-vcs-info b/util/gnc-vcs-info
index 793fc24..7cf3ece 100755
--- a/util/gnc-vcs-info
+++ b/util/gnc-vcs-info
@@ -64,9 +64,9 @@ srcdir=$2
 # Find the real srcdir.
 # This handles the case of a symlink (lndir) tree
 # $real_srcdir will hold the actual source dir
-if test -h "$srcdir"/Makefile.am
+if test -h "$srcdir"/CMakeLists.txt
 then 
-  tmp_srcdir=`readlink "$srcdir"/Makefile.am`
+  tmp_srcdir=`readlink "$srcdir"/CMakeLists.txt`
   real_srcdir="$srcdir/`dirname ${tmp_srcdir}`"
 else
   real_srcdir="$srcdir"

commit 1b02517ea1bee18060468b57fc5a58b5174c7828
Merge: dfa9c52 f6ae986
Author: Geert Janssens <geert at kobaltwit.be>
Date:   Fri Jan 26 12:22:14 2018 +0100

    Merge branch 'unstable-TR-bugfix' of https://github.com/christopherlam/gnucash into unstable


commit f6ae9868c582e3da7ec3ba161959a8a10591d0af
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Sat Dec 30 18:41:12 2017 +1100

    TP->T64: gnucash/report/standard-reports/transaction.scm

diff --git a/gnucash/report/standard-reports/transaction.scm b/gnucash/report/standard-reports/transaction.scm
index 20e9286..24f9d99 100644
--- a/gnucash/report/standard-reports/transaction.scm
+++ b/gnucash/report/standard-reports/transaction.scm
@@ -1071,7 +1071,7 @@ tags within description, notes or memo. ")
           ((damount (lambda (s) (if (gnc:split-voided? s)
                                     (xaccSplitVoidFormerAmount s)
                                     (xaccSplitGetAmount s))))
-           (trans-date (lambda (s) (gnc-transaction-get-date-posted (xaccSplitGetParent s))))
+           (trans-date (lambda (s) (xaccTransGetDate (xaccSplitGetParent s))))
            (currency (lambda (s) (xaccAccountGetCommodity (xaccSplitGetAccount s))))
            (report-currency (lambda (s) (if (column-uses? 'common-currency)
                                             (opt-val gnc:pagename-general optname-currency)
@@ -1087,7 +1087,6 @@ tags within description, notes or memo. ")
                                      (gnc-commodity-get-mnemonic
                                       (opt-val gnc:pagename-general optname-currency)))
                                     ""))))
-           (time64CanonicalDayTime (lambda (t64)  (gnc-tm-set-day-middle (gnc-localtime t64))))
            (convert (lambda (s num)
                       (gnc:exchange-by-pricedb-nearest
                        (gnc:make-gnc-monetary (currency s) num)
@@ -1095,7 +1094,7 @@ tags within description, notes or memo. ")
                        ;; Use midday as the transaction time so it matches a price
                        ;; on the same day.  Otherwise it uses midnight which will
                        ;; likely match a price on the previous day
-                       (timespecCanonicalDayTime (trans-date s)))))
+                       (time64CanonicalDayTime (trans-date s)))))
            (split-value (lambda (s) (convert s (damount s)))) ; used for correct debit/credit
            (amount (lambda (s) (split-value s)))
            (debit-amount (lambda (s) (and (positive? (gnc:gnc-monetary-amount (split-value s)))



Summary of changes:
 CMakeLists.txt                                     |  5 +-
 HACKING                                            | 52 +++++++++-----
 README                                             |  2 -
 cmake/README_CMAKE.txt                             |  7 +-
 common/cmake_modules/MakeDistCheck.cmake           |  1 -
 common/cmake_modules/MakeDistFiles.cmake           |  2 -
 doc/CMakeLists.txt                                 |  2 +-
 doc/README.build-system                            | 83 ----------------------
 gnucash/import-export/aqb/test/test-aqb.c          |  2 -
 .../report/locale-specific/us/test/CMakeLists.txt  |  2 +-
 gnucash/report/report-system/html-barchart.scm     |  2 +-
 gnucash/report/report-system/test/CMakeLists.txt   |  2 +-
 .../test/test-cashflow-barchart.scm                |  2 +
 gnucash/report/standard-reports/transaction.scm    |  5 +-
 libgnucash/app-utils/CMakeLists.txt                |  2 -
 libgnucash/app-utils/test/CMakeLists.txt           |  2 +-
 libgnucash/backend/dbi/CMakeLists.txt              |  2 -
 libgnucash/backend/dbi/gncmod-backend-dbi.c        | 83 ----------------------
 libgnucash/backend/xml/test/CMakeLists.txt         | 11 +--
 .../{test-real-data.sh.in => test-real-data.sh}    |  2 +-
 libgnucash/engine/qof-backend.cpp                  | 43 +----------
 libgnucash/scm/main.scm                            |  2 +-
 libgnucash/tax/us/test/CMakeLists.txt              |  2 +-
 make-gnucash-potfiles.in                           | 83 ----------------------
 po/CMakeLists.txt                                  |  8 +--
 po/POTFILES.in                                     |  2 +-
 po/POTFILES.skip                                   |  1 -
 util/ci/afterfailure                               | 11 ---
 util/ci/arch-docker                                |  2 +-
 util/ci/arch-testscript                            |  6 +-
 util/gnc-vcs-info                                  |  4 +-
 31 files changed, 66 insertions(+), 369 deletions(-)
 delete mode 100644 doc/README.build-system
 delete mode 100644 libgnucash/backend/dbi/gncmod-backend-dbi.c
 rename libgnucash/backend/xml/test/{test-real-data.sh.in => test-real-data.sh} (98%)
 delete mode 100644 make-gnucash-potfiles.in



More information about the gnucash-changes mailing list