gnucash unstable: Multiple changes pushed
Geert Janssens
gjanssens at code.gnucash.org
Wed Feb 28 07:53:36 EST 2018
Updated via https://github.com/Gnucash/gnucash/commit/f111e595 (commit)
via https://github.com/Gnucash/gnucash/commit/c29b9c9c (commit)
from https://github.com/Gnucash/gnucash/commit/e7ec3a61 (commit)
commit f111e5958d5fa4fdc7747cac1af177889dde2397
Author: Geert Janssens <geert at kobaltwit.be>
Date: Wed Feb 28 13:40:15 2018 +0100
Simplify POTFILES.in generation
As part of this also:
- Drop POTFILIES.ignore. Relevant lines have been moved to POTFILES.skip
- Remove skip lines for scm file links. With intltool out of the way these are never picked up any more.
diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt
index 2e83767..969d0e6 100644
--- a/po/CMakeLists.txt
+++ b/po/CMakeLists.txt
@@ -27,7 +27,7 @@ FOREACH(lingua ${ALL_LINGUAS})
ENDFOREACH()
SET_LOCAL_DIST(po_DIST_local ${po_SOURCES} CMakeLists.txt ChangeLog Makevars
- POTFILES.ignore POTFILES.in POTFILES.skip README gnucash-pot.cmake)
+ POTFILES.in POTFILES.skip README gnucash-pot.cmake)
SET(po_DIST ${po_DIST_local} ${po_glossary_DIST} PARENT_SCOPE)
FOREACH(lingua ${ALL_LINGUAS})
@@ -71,46 +71,37 @@ ENDFUNCTION()
FUNCTION(MAKE_GNUCASH_POTFILES)
-
- SET(IGNORE_PATTERNS "gw-" "test" "experimental" "python-bindings" "swig-.*\\.c")
-
# Create a list of candidate translation files
- FILE(GLOB_RECURSE FILES_IN RELATIVE ${CMAKE_SOURCE_DIR}
- ${CMAKE_SOURCE_DIR}/*.c ${CMAKE_SOURCE_DIR}/*.cpp ${CMAKE_SOURCE_DIR}/*.glade ${CMAKE_SOURCE_DIR}/*.desktop.in
- ${CMAKE_SOURCE_DIR}/*.keys.in ${CMAKE_SOURCE_DIR}/*.gschema.xml.in ${CMAKE_SOURCE_DIR}/*.scm)
-
- # Only consider files in the common, libgnucash, and gnucash/ directories. Also check against list of ignore patterns
- SET(FILES "")
- FOREACH(path ${FILES_IN})
- STRING(REGEX MATCH "^(bindings/|common/|borrowed/|libgnucash/|gnucash/)" IS_SRC ${path})
- IF (IS_SRC)
- SET(IS_IGNORED FALSE)
- FOREACH(pattern ${IGNORE_PATTERNS})
- STRING(REGEX MATCH ${pattern} YES_IGNORE ${path})
- IF (YES_IGNORE)
- SET(IS_IGNORED TRUE)
- ENDIF()
- ENDFOREACH(pattern)
- IF (NOT IS_IGNORED)
- LIST(APPEND FILES ${path})
- ENDIF(NOT IS_IGNORED)
- ENDIF(IS_SRC)
- ENDFOREACH(path)
-
- # Read in list of paths to skip from POTFILES.{skip,ignore}
- READ_FILE_REMOVING_COMMENTS(SKIP_LINES POTFILES.skip)
- READ_FILE_REMOVING_COMMENTS(IGNORE_LINES POTFILES.ignore)
+ file (GLOB_RECURSE FILES_IN RELATIVE ${CMAKE_SOURCE_DIR}
+ ${CMAKE_SOURCE_DIR}/*.c ${CMAKE_SOURCE_DIR}/*.cpp
+ ${CMAKE_SOURCE_DIR}/*.glade ${CMAKE_SOURCE_DIR}/*.desktop.in.in
+ ${CMAKE_SOURCE_DIR}/*.gschema.xml.in ${CMAKE_SOURCE_DIR}/*.appdata.xml.in
+ ${CMAKE_SOURCE_DIR}/*.keys.in ${CMAKE_SOURCE_DIR}/*.scm
+ ${CMAKE_SOURCE_DIR}/*/qofbookslots.h
+ )
- # Remove the paths that are skipped or ignored
- FOREACH(path ${SKIP_LINES} ${IGNORE_LINES})
- list(REMOVE_ITEM FILES ${path})
- ENDFOREACH()
+ # Only consider files in a selection of the source directories and
+ # additionally check against list of ignore patterns
+ set (GOOD_FILES "")
+ foreach (path ${FILES_IN})
+ if (${path} MATCHES "^(bindings/|borrowed/|common/|doc/|libgnucash/|gnucash/)"
+ AND
+ NOT ${path} MATCHES "gw-|test|experimental|python-bindings|swig-.*\\.c")
+ list (APPEND GOOD_FILES ${path})
+ endif ()
+ endforeach (path)
+
+ # Remove the paths that we have marked as explicitly skipped
+ READ_FILE_REMOVING_COMMENTS(SKIP_LINES POTFILES.skip)
+ foreach (path ${SKIP_LINES})
+ list(REMOVE_ITEM GOOD_FILES ${path})
+ endforeach ()
# 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}")
+ STRING(REPLACE ";" "\n" SORT_IN "${GOOD_FILES}")
SET(SORT_IN "${SORT_IN}\n")
FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/POTFILES.in.in "${SORT_IN}")
@@ -120,13 +111,6 @@ FUNCTION(MAKE_GNUCASH_POTFILES)
)
STRING(REPLACE "\n" ";" POTFILES "${POTFILES_IN}")
- # These are manually added, because they're not picked up by the generation script
- list(APPEND POTFILES
- "gnucash/gnome/gnucash.appdata.xml.in"
- "gnucash/gnome/gnucash.desktop.in.in"
- "libgnucash/engine/qofbookslots.h"
- "doc/tip_of_the_day.list.c")
-
# Write out the final list.
# intltool-update insists that this file be in the source directory. :-(
SET(POTFILES_IN_PATH ${CMAKE_CURRENT_BINARY_DIR}/POTFILES.in)
diff --git a/po/POTFILES.ignore b/po/POTFILES.ignore
deleted file mode 100644
index fd3be29..0000000
--- a/po/POTFILES.ignore
+++ /dev/null
@@ -1,10 +0,0 @@
-# Work around the intltool-0.35.5 / automake-1.10 failures
-# due to "missing" files. These files may be distributed.
-gnucash/gnome/gnucash.desktop.in.in
-gnucash/gnome/gnucash.desktop.in
-libgnucash/engine/iso-4217-currencies.c
-# The features in import-export/qif are still unused.
-gnucash/import-export/qif/qif-defaults.c
-gnucash/import-export/qif/qif-parse.c
-# This file is autogenerated, so it's only in the tree after an in-source build:
-gnucash/gnome-utils/gnc-warnings.c
diff --git a/po/POTFILES.in b/po/POTFILES.in
index aa029c3..8b0fe05 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -33,6 +33,7 @@ borrowed/libc/libc-missing-noop.c
borrowed/libc/setenv.c
borrowed/libc/strfmon.c
borrowed/libc/strptime.c
+doc/tip_of_the_day.list.c
gnucash/gnome/assistant-acct-period.c
gnucash/gnome/assistant-hierarchy.c
gnucash/gnome/assistant-loan.c
@@ -84,6 +85,8 @@ gnucash/gnome/gnc-plugin-register2.c
gnucash/gnome/gnc-plugin-register.c
gnucash/gnome/gnc-split-reg2.c
gnucash/gnome/gnc-split-reg.c
+gnucash/gnome/gnucash.appdata.xml.in
+gnucash/gnome/gnucash.desktop.in.in
gnucash/gnome/gtkbuilder/assistant-acct-period.glade
gnucash/gnome/gtkbuilder/assistant-hierarchy.glade
gnucash/gnome/gtkbuilder/assistant-loan.glade
@@ -667,6 +670,7 @@ libgnucash/engine/kvp-value.cpp
libgnucash/engine/policy.c
libgnucash/engine/qof-backend.cpp
libgnucash/engine/qofbook.cpp
+libgnucash/engine/qofbookslots.h
libgnucash/engine/qofchoice.cpp
libgnucash/engine/qofclass.cpp
libgnucash/engine/qofevent.cpp
@@ -704,7 +708,3 @@ libgnucash/tax/us/txf-help-de_DE.scm
libgnucash/tax/us/txf-help.scm
libgnucash/tax/us/txf.scm
libgnucash/tax/us/us.scm
-gnucash/gnome/gnucash.appdata.xml.in
-gnucash/gnome/gnucash.desktop.in.in
-libgnucash/engine/qofbookslots.h
-doc/tip_of_the_day.list.c
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
index 3558f7b..2711f3d 100644
--- a/po/POTFILES.skip
+++ b/po/POTFILES.skip
@@ -1,106 +1,15 @@
# These are files that we don't want to translate, because they are
# not distributed.
-libgnucash/backend/xml/gncmod-backend-xml.c
libgnucash/backend/xml/gncmod-backend-xml.cpp
gnucash/gnome-utils/gnc-tree-model-selection.c
# This file is only an example for programmers and never called:
libgnucash/gnc-module/example/gnc-plugin.example.c
-# Skip softlinks to scm files. These softlinks are created in builddir
-# for testing purposes, intltool-extract isn't smart enough to ignore
-# them when bulddir and srcdir are the same, and both intltool-extract
-# and intltool-update use absolute paths to the srcdir when it's not
-# the same as builddir which messes up the file names in gnucash.pot.
+# The features in import-export/qif are still unused.
+gnucash/import-export/qif/qif-defaults.c
+gnucash/import-export/qif/qif-parse.c
-libgnucash/app-utils/gnucash/app-utils.scm
-libgnucash/app-utils/gnucash/gettext.scm
-libgnucash/app-utils/test/test-load-app-utils-module.scm
-libgnucash/core-utils/gnucash/core-utils.scm
-libgnucash/engine/gnucash/business-core.scm
-libgnucash/engine/gnucash/engine.scm
-libgnucash/gnc-module/gnucash/gnc-module.scm
-gnucash/gnome-utils/gnucash/gnome-utils.scm
-gnucash/import-export/qif-imp/gnucash/import-export/qif-import.scm
-gnucash/import-export/qif-imp/qif-import/qif-dialog-utils.scm
-gnucash/import-export/qif-imp/qif-import/qif-file.scm
-gnucash/import-export/qif-imp/qif-import/qif-guess-map.scm
-gnucash/import-export/qif-imp/qif-import/qif-import.scm
-gnucash/import-export/qif-imp/qif-import/qif-merge-groups.scm
-gnucash/import-export/qif-imp/qif-import/qif-objects.scm
-gnucash/import-export/qif-imp/qif-import/qif-parse.scm
-gnucash/import-export/qif-imp/qif-import/qif-to-gnc.scm
-gnucash/import-export/qif-imp/qif-import/qif-utils.scm
-gnucash/report/business-reports/gnucash/report/aging.scm
-gnucash/report/business-reports/gnucash/report/balsheet-eg.eguile.scm
-gnucash/report/business-reports/gnucash/report/balsheet-eg.scm
-gnucash/report/business-reports/gnucash/report/business-reports.scm
-gnucash/report/business-reports/gnucash/report/customer-summary.scm
-gnucash/report/business-reports/gnucash/report/easy-invoice.scm
-gnucash/report/business-reports/gnucash/report/fancy-invoice.scm
-gnucash/report/business-reports/gnucash/report/invoice.scm
-gnucash/report/business-reports/gnucash/report/job-report.scm
-gnucash/report/business-reports/gnucash/report/owner-report.scm
-gnucash/report/business-reports/gnucash/report/payables.scm
-gnucash/report/business-reports/gnucash/report/receipt.eguile.scm
-gnucash/report/business-reports/gnucash/report/receipt.scm
-gnucash/report/business-reports/gnucash/report/receivables.scm
-gnucash/report/business-reports/gnucash/report/taxinvoice.eguile.scm
-gnucash/report/business-reports/gnucash/report/taxinvoice.scm
-gnucash/report/locale-specific/us/gnucash/report/locale-specific/de_DE.scm
-gnucash/report/locale-specific/us/gnucash/report/locale-specific/us.scm
-gnucash/report/locale-specific/us/gnucash/report/taxtxf-de_DE.scm
-gnucash/report/locale-specific/us/gnucash/report/taxtxf.scm
-gnucash/report/report-gnome/gnucash/report/report-gnome.scm
-gnucash/report/report-system/gnucash/report/eguile-gnc.scm
-gnucash/report/report-system/gnucash/report/eguile-html-utilities.scm
-gnucash/report/report-system/gnucash/report/eguile-utilities.scm
-gnucash/report/report-system/gnucash/report/report-system.scm
-gnucash/report/report-system/gnucash/report/report-system/collectors.scm
-gnucash/report/report-system/gnucash/report/report-system/list-extras.scm
-gnucash/report/report-system/gnucash/report/report-system/report-collectors.scm
-gnucash/report/standard-reports/gnucash/report/standard-reports.scm
-gnucash/report/standard-reports/gnucash/report/standard-reports/account-piecharts.scm
-gnucash/report/standard-reports/gnucash/report/standard-reports/account-summary.scm
-gnucash/report/standard-reports/gnucash/report/standard-reports/advanced-portfolio.scm
-gnucash/report/standard-reports/gnucash/report/standard-reports/average-balance.scm
-gnucash/report/standard-reports/gnucash/report/standard-reports/balance-sheet.scm
-gnucash/report/standard-reports/gnucash/report/standard-reports/budget-balance-sheet.scm
-gnucash/report/standard-reports/gnucash/report/standard-reports/budget-barchart.scm
-gnucash/report/standard-reports/gnucash/report/standard-reports/budget-flow.scm
-gnucash/report/standard-reports/gnucash/report/standard-reports/budget-income-statement.scm
-gnucash/report/standard-reports/gnucash/report/standard-reports/budget.scm
-gnucash/report/standard-reports/gnucash/report/standard-reports/cash-flow.scm
-gnucash/report/standard-reports/gnucash/report/standard-reports/cashflow-barchart.scm
-gnucash/report/standard-reports/gnucash/report/standard-reports/category-barchart.scm
-gnucash/report/standard-reports/gnucash/report/standard-reports/daily-reports.scm
-gnucash/report/standard-reports/gnucash/report/standard-reports/equity-statement.scm
-gnucash/report/standard-reports/gnucash/report/standard-reports/general-journal.scm
-gnucash/report/standard-reports/gnucash/report/standard-reports/general-ledger.scm
-gnucash/report/standard-reports/gnucash/report/standard-reports/income-gst-statement.scm
-gnucash/report/standard-reports/gnucash/report/standard-reports/income-statement.scm
-gnucash/report/standard-reports/gnucash/report/standard-reports/net-barchart.scm
-gnucash/report/standard-reports/gnucash/report/standard-reports/net-linechart.scm
-gnucash/report/standard-reports/gnucash/report/standard-reports/portfolio.scm
-gnucash/report/standard-reports/gnucash/report/standard-reports/price-scatter.scm
-gnucash/report/standard-reports/gnucash/report/standard-reports/register.scm
-gnucash/report/standard-reports/gnucash/report/standard-reports/sx-summary.scm
-gnucash/report/standard-reports/gnucash/report/standard-reports/transaction.scm
-gnucash/report/standard-reports/gnucash/report/standard-reports/trial-balance.scm
-gnucash/report/stylesheets/gnucash/report/stylesheet-easy.scm
-gnucash/report/stylesheets/gnucash/report/stylesheet-fancy.scm
-gnucash/report/stylesheets/gnucash/report/stylesheet-footer.scm
-gnucash/report/stylesheets/gnucash/report/stylesheet-head-or-tail.scm
-gnucash/report/stylesheets/gnucash/report/stylesheet-plain.scm
-gnucash/report/stylesheets/gnucash/report/stylesheets.scm
-gnucash/report/utility-reports/gnucash/report/hello-world.scm
-gnucash/report/utility-reports/gnucash/report/utility-reports.scm
-gnucash/report/utility-reports/gnucash/report/view-column.scm
-gnucash/report/utility-reports/gnucash/report/welcome-to-gnucash.scm
-libgnucash/scm/build-config.scm
-libgnucash/scm/build-config.scm.in
-libgnucash/scm/gnucash/main.scm
-libgnucash/scm/gnucash/price-quotes.scm
-libgnucash/scm/gnucash/printf.scm
-libgnucash/tax/us/gnucash/tax/de_DE.scm
-libgnucash/tax/us/gnucash/tax/us.scm
+# These files are autogenerated, and hence not distributed
+gnucash/gnome-utils/gnc-warnings.c
+libgnucash/engine/iso-4217-currencies.c
commit c29b9c9cbf2c4bfc9617825b363e48a0e30bf202
Author: Geert Janssens <geert at kobaltwit.be>
Date: Wed Feb 28 12:08:37 2018 +0100
Remove autotools-only path exception to find reports
With it we can also remove the hack to find standard reports while running
from the build tree.
diff --git a/gnucash/report/standard-reports/CMakeLists.txt b/gnucash/report/standard-reports/CMakeLists.txt
index b4875ae..4ae9284 100644
--- a/gnucash/report/standard-reports/CMakeLists.txt
+++ b/gnucash/report/standard-reports/CMakeLists.txt
@@ -59,14 +59,5 @@ GNC_ADD_SCHEME_TARGETS(scm-standard-reports-2
ADD_CUSTOM_TARGET(scm-standard-reports ALL DEPENDS scm-standard-reports-2 scm-standard-reports-1)
-# FIXME: This is a hack since core-utils assumes an autotools build environment.
-
-SET(STD_RPT_DIR ${CMAKE_CURRENT_BINARY_DIR}/gnucash/report)
-FILE(MAKE_DIRECTORY ${STD_RPT_DIR})
-FILE(COPY standard-reports.scm DESTINATION ${STD_RPT_DIR})
-
-FILE(MAKE_DIRECTORY ${STD_RPT_DIR}/standard-reports)
-FILE(COPY ${standard_reports_SCHEME_2} DESTINATION ${STD_RPT_DIR}/standard-reports)
-
SET_LOCAL_DIST(standard_reports_DIST_local CMakeLists.txt ${standard_reports_SCHEME} ${standard_reports_SCHEME_2})
SET(standard_reports_DIST ${standard_reports_DIST_local} ${test_standard_reports_DIST} PARENT_SCOPE)
diff --git a/libgnucash/core-utils/gnc-path.c b/libgnucash/core-utils/gnc-path.c
index c979c1f..e672432 100644
--- a/libgnucash/core-utils/gnc-path.c
+++ b/libgnucash/core-utils/gnc-path.c
@@ -169,30 +169,21 @@ gchar *gnc_path_get_accountsdir()
* @returns A newly allocated string. */
gchar *gnc_path_get_reportdir()
{
- gchar *result;
- const gchar *builddir = g_getenv ("GNC_BUILDDIR");
- if (g_getenv ("GNC_UNINSTALLED") && builddir)
- {
- result = g_build_filename (builddir, "gnucash", "report", NULL);
- }
- else
- {
- /* Careful: if the autoconf macro GNC_SCM_INSTALL_DIR gets changed
- * in configure.ac, this path should probably change as well.
- * Currently this code assumes GNC_SCM_INSTALL_DIR is set to
- * pkgdatadir/scm
- * We can't use the AC_MACRO GNC_SCM_INSTALL_DIR here directly
- * because that's expanded at build time. On Windows and OS X
- * the final path may get installed in a different location
- * than assumed during build, invalidating the build path at
- * runtime.
- */
- gchar *pkgdatadir = gnc_path_get_pkgdatadir ();
- result = g_build_filename (pkgdatadir, "scm",
- "gnucash", "report", (char*)NULL);
- g_free (pkgdatadir);
- }
- //printf("Returning stdreportsdir %s\n", result);
+ /* Careful: if the cmake variable SCHEME_INSTALLED_SOURCE_DIR gets changed
+ * in toplevel CMakeLists.txt, this path should probably change as well.
+ * Currently this code assumes SCHEME_INSTALLED_SOURCE_DIR is set to
+ * pkgdatadir/scm
+ * We can't use GNC_SCM_INSTALL_DIR directly at build time to
+ * get this information, because on Windows and OS X
+ * the final path may get installed in a different location
+ * than assumed during build, invalidating the build path at
+ * runtime.
+ */
+ gchar *pkgdatadir = gnc_path_get_pkgdatadir ();
+ gchar *result = g_build_filename (pkgdatadir, "scm",
+ "gnucash", "report", (char*)NULL);
+ g_free (pkgdatadir);
+
return result;
}
@@ -203,17 +194,8 @@ gchar *gnc_path_get_reportdir()
* @returns A newly allocated string. */
gchar *gnc_path_get_stdreportsdir()
{
- gchar *result;
gchar *reportdir = gnc_path_get_reportdir ();
- if (g_getenv ("GNC_UNINSTALLED"))
- {
- result = g_build_filename (reportdir, "standard-reports", "gnucash",
- "report", "standard-reports", NULL);
- }
- else
- {
- result = g_build_filename (reportdir, "standard-reports", NULL);
- }
+ gchar *result = g_build_filename (reportdir, "standard-reports", NULL);
g_free (reportdir);
//printf("Returning stdreportsdir %s\n", result);
return result;
Summary of changes:
gnucash/report/standard-reports/CMakeLists.txt | 9 ---
libgnucash/core-utils/gnc-path.c | 50 ++++--------
po/CMakeLists.txt | 66 ++++++----------
po/POTFILES.ignore | 10 ---
po/POTFILES.in | 8 +-
po/POTFILES.skip | 103 ++-----------------------
6 files changed, 51 insertions(+), 195 deletions(-)
delete mode 100644 po/POTFILES.ignore
More information about the gnucash-changes
mailing list