diff --git a/.gitignore b/.gitignore index b22d3ea740..fc9e97b99d 100644 --- a/.gitignore +++ b/.gitignore @@ -171,8 +171,8 @@ gnucash/register/ledger-core/test/test-link-module gnucash/register/register-core/test/test-link-module gnucash/register/register-gnome/test/test-link-module gnucash/report/business-reports/gnucash -gnucash/report/locale-specific/us/gnucash -gnucash/report/locale-specific/us/test/test-link-module +gnucash/report/locale-specific/gnucash +gnucash/report/locale-specific/test/test-link-module gnucash/report/gnucash gnucash/report/test/test-link-module gnucash/report/reports/gnucash diff --git a/gnucash/gnucash-bin.c b/gnucash/gnucash-bin.c index e6cb432e58..4056a9c89c 100644 --- a/gnucash/gnucash-bin.c +++ b/gnucash/gnucash-bin.c @@ -503,7 +503,7 @@ load_gnucash_modules() { "gnucash/import-export/customer-import", 0, TRUE}, { "gnucash/report", 0, FALSE }, { "gnucash/report/stylesheets", 0, FALSE }, - { "gnucash/report/locale-specific/us", 0, FALSE }, + { "gnucash/report/locale-specific", 0, FALSE }, { "gnucash/python", 0, TRUE }, }; diff --git a/gnucash/report/CMakeLists.txt b/gnucash/report/CMakeLists.txt index ba613a4be5..e3e025ccc3 100644 --- a/gnucash/report/CMakeLists.txt +++ b/gnucash/report/CMakeLists.txt @@ -1,6 +1,5 @@ add_subdirectory(jqplot) -add_subdirectory(locale-specific) add_subdirectory(reports) add_subdirectory(stylesheets) add_subdirectory(test) @@ -119,5 +118,5 @@ set_local_dist(report_DIST_local CMakeLists.txt ${report_SCHEME} ${report_SCHEME_1} ${report_SCHEME_2} ${report_SCHEME_3}) -set(report_DIST ${report_DIST_local} ${jqplot_DIST} ${locale_specific_DIST} +set(report_DIST ${report_DIST_local} ${jqplot_DIST} ${reports_DIST} ${stylesheets_DIST} ${test_report_DIST} PARENT_SCOPE) diff --git a/gnucash/report/locale-specific/CMakeLists.txt b/gnucash/report/locale-specific/CMakeLists.txt deleted file mode 100644 index e1240d7418..0000000000 --- a/gnucash/report/locale-specific/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -add_subdirectory(us) - -set_local_dist(locale_specific_DIST_local CMakeLists.txt ) -set(locale_specific_DIST ${locale_specific_DIST_local} ${locale_specific_us_DIST} PARENT_SCOPE) \ No newline at end of file diff --git a/gnucash/report/locale-specific/us/CMakeLists.txt b/gnucash/report/locale-specific/us/CMakeLists.txt deleted file mode 100644 index d138c9d6d9..0000000000 --- a/gnucash/report/locale-specific/us/CMakeLists.txt +++ /dev/null @@ -1,51 +0,0 @@ -add_subdirectory(test) - -set(locale_reports_us_SOURCES - gncmod-locale-reports-us.c -) - -add_library(gncmod-locale-reports-us ${locale_reports_us_SOURCES}) - -target_link_libraries(gncmod-locale-reports-us gnc-module gncmod-app-utils gncmod-gnome-utils - ${GUILE_LDFLAGS} ${GLIB2_LDFLAGS}) - -target_compile_definitions(gncmod-locale-reports-us PRIVATE -DG_LOG_DOMAIN=\"gnc.report.locale.us\") - - -if (APPLE) - set_target_properties (gncmod-locale-reports-us PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_FULL_LIBDIR}/gnucash") -endif() - -install(TARGETS gncmod-locale-reports-us - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/gnucash - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/gnucash - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) -# No headers to install - -# Scheme - -set(gncmod_local_reports_us_SCHEME taxtxf.scm taxtxf-de_DE.scm) - -set(GUILE_DEPENDS - gncmod-html - scm-core-utils - scm-gettext - scm-gnc-module - scm-scm - scm-test-core - scm-tax-us - scm-report - scm-gnome-utils - ) - -gnc_add_scheme_targets(scm-report-locale-specific - "${gncmod_local_reports_us_SCHEME_1}" - gnucash/report - "${GUILE_DEPENDS}" - FALSE -) - -set_local_dist(locale_specific_us_DIST_local CMakeLists.txt - ${locale_reports_us_SOURCES} ${gncmod_local_reports_us_SCHEME}) - -set(locale_specific_us_DIST ${locale_specific_us_DIST_local} ${test_locale_specific_us_DIST} PARENT_SCOPE) diff --git a/gnucash/report/reports/CMakeLists.txt b/gnucash/report/reports/CMakeLists.txt index 3d540cbe05..15b692746e 100644 --- a/gnucash/report/reports/CMakeLists.txt +++ b/gnucash/report/reports/CMakeLists.txt @@ -1,4 +1,5 @@ +add_subdirectory(locale-specific) add_subdirectory(standard/test) add_subdirectory(support) @@ -119,7 +120,12 @@ gnc_add_scheme_targets(scm-reports-example TRUE ) -add_custom_target(scm-reports ALL DEPENDS scm-reports-standard scm-reports-example scm-reports-common scm-rpt-reports) +add_custom_target(scm-reports ALL DEPENDS + scm-reports-standard + scm-reports-example + scm-reports-common + scm-rpt-reports + scm-reports-locale-specific) set_local_dist(reports_DIST_local CMakeLists.txt ${reports_SCHEME} ${reports_common_SCHEME} ${reports_standard_SCHEME} ${reports_example_SCHEME}) -set(reports_DIST ${reports_DIST_local} ${reports_support_DIST} ${test_reports_standard_DIST} PARENT_SCOPE) +set(reports_DIST ${reports_DIST_local} ${reports_locale_specific_DIST} ${reports_support_DIST} ${test_reports_standard_DIST} PARENT_SCOPE) diff --git a/gnucash/report/reports/locale-specific/CMakeLists.txt b/gnucash/report/reports/locale-specific/CMakeLists.txt new file mode 100644 index 0000000000..5d53edecf0 --- /dev/null +++ b/gnucash/report/reports/locale-specific/CMakeLists.txt @@ -0,0 +1,53 @@ +add_subdirectory(test) + +set(locale_specific_SOURCES + gncmod-locale-specific.c +) + +add_library(gncmod-locale-specific ${locale_specific_SOURCES}) + +target_link_libraries(gncmod-locale-specific gnc-module gncmod-app-utils gncmod-gnome-utils + ${GUILE_LDFLAGS} ${GLIB2_LDFLAGS}) + +target_compile_definitions(gncmod-locale-specific PRIVATE -DG_LOG_DOMAIN=\"gnc.report.locale\") + + +if (APPLE) + set_target_properties (gncmod-locale-specific PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_FULL_LIBDIR}/gnucash") +endif() + +install(TARGETS gncmod-locale-specific + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/gnucash + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/gnucash + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) +# No headers to install + +# Scheme + +set(gncmod_locale_reports_SCHEME taxtxf.scm taxtxf-de_DE.scm) + +set(GUILE_DEPENDS + gncmod-html + scm-core-utils + scm-gettext + scm-gnc-module + scm-scm + scm-test-core + scm-tax-us + scm-report + scm-gnome-utils + ) + +gnc_add_scheme_targets(scm-reports-locale-specific-1 + "${gncmod_locale_reports_SCHEME}" + gnucash/report/reports/locale-specific + "${GUILE_DEPENDS}" + FALSE +) + +add_custom_target(scm-reports-locale-specific ALL DEPENDS scm-reports-locale-specific-1) + +set_local_dist(reports_locale_specific_DIST_local CMakeLists.txt + ${locale_specific_SOURCES} ${gncmod_locale_reports_SCHEME}) + +set(reports_locale_specific_DIST ${reports_locale_specific_DIST_local} ${test_locale_specific_DIST} PARENT_SCOPE) diff --git a/gnucash/report/locale-specific/us/gncmod-locale-reports-us.c b/gnucash/report/reports/locale-specific/gncmod-locale-specific.c similarity index 80% rename from gnucash/report/locale-specific/us/gncmod-locale-reports-us.c rename to gnucash/report/reports/locale-specific/gncmod-locale-specific.c index 077736a3fb..c7bea0562c 100644 --- a/gnucash/report/locale-specific/us/gncmod-locale-reports-us.c +++ b/gnucash/report/reports/locale-specific/gncmod-locale-specific.c @@ -1,6 +1,6 @@ /********************************************************************* - * gncmod-locale-reports-us.c - * module definition/initialization for the US reports + * gncmod-locale-reports.c + * module definition/initialization for the locale specific reports * * Copyright (c) 2001 Linux Developers Group, Inc. *********************************************************************/ @@ -34,35 +34,35 @@ #include "gnc-module.h" #include "gnc-module-api.h" -GNC_MODULE_API_DECL(libgncmod_locale_reports_us) +GNC_MODULE_API_DECL(libgncmod_locale_specific) /* version of the gnc module system interface we require */ -int libgncmod_locale_reports_us_gnc_module_system_interface = 0; +int libgncmod_locale_specific_gnc_module_system_interface = 0; /* module versioning uses libtool semantics. */ -int libgncmod_locale_reports_us_gnc_module_current = 0; -int libgncmod_locale_reports_us_gnc_module_revision = 0; -int libgncmod_locale_reports_us_gnc_module_age = 0; +int libgncmod_locale_specific_gnc_module_current = 0; +int libgncmod_locale_specific_gnc_module_revision = 0; +int libgncmod_locale_specific_gnc_module_age = 0; char * -libgncmod_locale_reports_us_gnc_module_path(void) +libgncmod_locale_specific_gnc_module_path(void) { /* const char *thislocale = setlocale(LC_ALL, NULL); if (strncmp(thislocale, "de_DE", 5) == 0) return g_strdup("gnucash/report/locale-specific/de_DE"); else */ - return g_strdup("gnucash/report/locale-specific/us"); + return g_strdup("gnucash/report/locale-specific"); } char * -libgncmod_locale_reports_us_gnc_module_description(void) +libgncmod_locale_specific_gnc_module_description(void) { return g_strdup("US income tax reports and related material"); } int -libgncmod_locale_reports_us_gnc_module_init(int refcount) +libgncmod_locale_specific_gnc_module_init(int refcount) { const gchar *tax_module, *report_taxtxf; /* load the tax info */ @@ -80,12 +80,12 @@ libgncmod_locale_reports_us_gnc_module_init(int refcount) if (is_de_DE) { tax_module = "gnucash/tax/de_DE"; - report_taxtxf = "(use-modules (gnucash report taxtxf-de_DE))"; + report_taxtxf = "(use-modules (gnucash report reports locale-specific taxtxf-de_DE))"; } else { tax_module = "gnucash/tax/us"; - report_taxtxf = "(use-modules (gnucash report taxtxf))"; + report_taxtxf = "(use-modules (gnucash report reports locale-specific taxtxf))"; } /* The gchar* cast is only because the function declaration expects @@ -113,7 +113,7 @@ libgncmod_locale_reports_us_gnc_module_init(int refcount) } int -libgncmod_locale_reports_us_gnc_module_end(int refcount) +libgncmod_locale_specific_gnc_module_end(int refcount) { return TRUE; } diff --git a/gnucash/report/locale-specific/us/taxtxf-de_DE.scm b/gnucash/report/reports/locale-specific/taxtxf-de_DE.scm similarity index 99% rename from gnucash/report/locale-specific/us/taxtxf-de_DE.scm rename to gnucash/report/reports/locale-specific/taxtxf-de_DE.scm index 7b5759fe57..4f28a25298 100644 --- a/gnucash/report/locale-specific/us/taxtxf-de_DE.scm +++ b/gnucash/report/reports/locale-specific/taxtxf-de_DE.scm @@ -66,7 +66,7 @@ ;; depends must be outside module scope -- and should eventually go away. -(define-module (gnucash report taxtxf-de_DE)) +(define-module (gnucash report reports locale-specific taxtxf-de_DE)) (use-modules (gnucash utilities)) (use-modules (srfi srfi-1)) (use-modules (gnucash core-utils)) ; for gnc:version diff --git a/gnucash/report/locale-specific/us/taxtxf.scm b/gnucash/report/reports/locale-specific/taxtxf.scm similarity index 99% rename from gnucash/report/locale-specific/us/taxtxf.scm rename to gnucash/report/reports/locale-specific/taxtxf.scm index d81998d8a2..2b7904ce5b 100644 --- a/gnucash/report/locale-specific/us/taxtxf.scm +++ b/gnucash/report/reports/locale-specific/taxtxf.scm @@ -98,7 +98,7 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(define-module (gnucash report taxtxf)) +(define-module (gnucash report reports locale-specific taxtxf)) (use-modules (gnucash utilities)) (use-modules (srfi srfi-1)) (use-modules (gnucash gnc-module)) diff --git a/gnucash/report/locale-specific/us/test/CMakeLists.txt b/gnucash/report/reports/locale-specific/test/CMakeLists.txt similarity index 81% rename from gnucash/report/locale-specific/us/test/CMakeLists.txt rename to gnucash/report/reports/locale-specific/test/CMakeLists.txt index 34951dad69..0b98812e34 100644 --- a/gnucash/report/locale-specific/us/test/CMakeLists.txt +++ b/gnucash/report/reports/locale-specific/test/CMakeLists.txt @@ -20,4 +20,4 @@ gnc_add_scheme_test_targets(test-load-report-locale-specific-module ) gnc_add_scheme_tests(test-load-report-locale-specific-module.scm) -set_dist_list(test_locale_specific_us_DIST CMakeLists.txt test-link-module.c test-load-report-locale-specific-module.scm) +set_dist_list(test_locale_specific_DIST CMakeLists.txt test-link-module.c test-load-report-locale-specific-module.scm) diff --git a/gnucash/report/locale-specific/us/test/test-link-module.c b/gnucash/report/reports/locale-specific/test/test-link-module.c similarity index 100% rename from gnucash/report/locale-specific/us/test/test-link-module.c rename to gnucash/report/reports/locale-specific/test/test-link-module.c diff --git a/gnucash/report/locale-specific/us/test/test-load-report-locale-specific-module.scm b/gnucash/report/reports/locale-specific/test/test-load-report-locale-specific-module.scm similarity index 100% rename from gnucash/report/locale-specific/us/test/test-load-report-locale-specific-module.scm rename to gnucash/report/reports/locale-specific/test/test-load-report-locale-specific-module.scm diff --git a/po/POTFILES.in b/po/POTFILES.in index ac693bb89a..3e2ee7c024 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -438,9 +438,6 @@ gnucash/report/html-style-sheet.scm gnucash/report/html-table.scm gnucash/report/html-text.scm gnucash/report/html-utilities.scm -gnucash/report/locale-specific/us/gncmod-locale-reports-us.c -gnucash/report/locale-specific/us/taxtxf-de_DE.scm -gnucash/report/locale-specific/us/taxtxf.scm gnucash/report/options-utilities.scm gnucash/report/report-core.scm gnucash/report/report-register-hooks.scm @@ -450,6 +447,9 @@ gnucash/report/reports/example/daily-reports.scm gnucash/report/reports/example/hello-world.scm gnucash/report/reports/example/sample-graphs.scm gnucash/report/reports/example/welcome-to-gnucash.scm +gnucash/report/reports/locale-specific/gncmod-locale-specific.c +gnucash/report/reports/locale-specific/taxtxf-de_DE.scm +gnucash/report/reports/locale-specific/taxtxf.scm gnucash/report/reports/reports.scm gnucash/report/reports/standard/account-piecharts.scm gnucash/report/reports/standard/account-summary.scm