gnucash-docs maint: Multiple changes pushed
Geert Janssens
gjanssens at code.gnucash.org
Mon Sep 2 13:12:23 EDT 2019
Updated via https://github.com/Gnucash/gnucash-docs/commit/47060825 (commit)
via https://github.com/Gnucash/gnucash-docs/commit/0d88fdf9 (commit)
via https://github.com/Gnucash/gnucash-docs/commit/ed3eebd2 (commit)
via https://github.com/Gnucash/gnucash-docs/commit/1b45ae37 (commit)
via https://github.com/Gnucash/gnucash-docs/commit/99787d0f (commit)
via https://github.com/Gnucash/gnucash-docs/commit/51ebd310 (commit)
via https://github.com/Gnucash/gnucash-docs/commit/87905666 (commit)
via https://github.com/Gnucash/gnucash-docs/commit/40e4b170 (commit)
via https://github.com/Gnucash/gnucash-docs/commit/25d3eff2 (commit)
via https://github.com/Gnucash/gnucash-docs/commit/3c2ff327 (commit)
via https://github.com/Gnucash/gnucash-docs/commit/2a03b4c3 (commit)
from https://github.com/Gnucash/gnucash-docs/commit/2cc00a63 (commit)
commit 47060825af19dd5535b9bfe6516c9bf3926f3d9f
Author: Geert Janssens <geert at kobaltwit.be>
Date: Mon Sep 2 19:12:00 2019 +0200
CMake - Make note of missing Windows chm build rules
diff --git a/CMakeNotes.txt b/CMakeNotes.txt
index 8a2d981..05d2670 100644
--- a/CMakeNotes.txt
+++ b/CMakeNotes.txt
@@ -13,6 +13,7 @@ Current status:
To do:
- provide uninstall functionality like in the gnucash cmake build system
- handle the special build rules for it (guide and help)
+- add windows specific chm file generation
Notable changes:
- while the dist targets work for both autotools and cmake the
commit 0d88fdf9f768150c707c2b99dbbd3f00087a9e36
Author: Geert Janssens <geert at kobaltwit.be>
Date: Mon Sep 2 18:38:12 2019 +0200
CMake - add dist and distcheck targets
On a tree for which both configure and cmake have been run, dist will
generate identical tarballs under autotools and cmake, with the exception
of two empty directories.
I haven't tested yet on a clean checkout with only cmake for comparison.
It's likely that will fail because cmake doesn't know how to generate
the many autotools config related files. To be investigated further.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 187a1a4..32a76f7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -24,8 +24,11 @@ include (xmldocs)
include (pdf)
include (epub)
include (gnc_doc_targets)
+include (dist)
include (GNUInstallDirs)
+# Clear cache variables that will be filled later during the cmake run
+unset(dist_files CACHE)
# ############################################################
# These options are settable from the CMake command line. For example,
@@ -109,27 +112,6 @@ set (FOP_XCONF "${FOP_XCONF_DFLT}")
# ;;
# esac
# AM_CONDITIONAL([GNC_WINDOWS], [test x${ac_cv_gnc_windows} = "xyes"])
-# AM_CONDITIONAL([LANG_US], [test x${lang_us} = "xtrue"])
-# AC_CONFIG_FILES([
-# gnucash-docs.spec
-# help/Makefile
-# help/C/Makefile
-# help/de/Makefile
-# help/it/Makefile
-# help/pt/Makefile
-# guide/Makefile
-# guide/C/Makefile
-# guide/de/Makefile
-# guide/it/Makefile
-# guide/ja/Makefile
-# guide/pt/Makefile
-# guide/ru/Makefile
-# Makefile])
-#
-# AC_CONFIG_FILES([guide/ja/fop.xconf])
-# AC_CONFIG_FILES([guide/ru/fop.xconf])
-#
-# AC_OUTPUT
# The global targets. Their dependencies will be filled in by subsequent commands in
# the respective subdirectories.
@@ -147,3 +129,70 @@ endif()
add_subdirectory (guide)
add_subdirectory (help)
+
+set(autotoolsfiles
+ configure.ac
+ configure
+ config.guess
+ config.sub
+ COPYING
+ INSTALL
+ Makefile.am
+ Makefile.in
+ aclocal.m4
+ gnucash-docs.spec.in
+ install-sh
+ ltmain.sh
+ missing
+ chm.make
+ epub.make
+ mobi.make
+ omf.make
+ pdf.make
+ xmldocs.make)
+add_to_dist(${autotoolsfiles})
+
+file(GLOB_RECURSE extrafiles
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ cmake/* fonts/* stylesheet/* xsl/*)
+add_to_dist(${extrafiles})
+
+add_to_dist(
+ AUTHORS
+ CMakeLists.txt
+ COPYING-DOCS
+ ChangeLog
+ HACKING
+ NEWS
+ README
+ docbook/gnc-docbookx.dtd
+ fop.xconf.in)
+
+############################ BEGIN MAKE DIST #################
+
+set(PACKAGE_PREFIX "${PACKAGE}-${PACKAGE_VERSION}")
+set(DIST_FILE "${PACKAGE_PREFIX}.tar")
+
+add_custom_command(OUTPUT ${DIST_FILE}.gz ${DIST_FILE}.bz2
+ COMMAND ${CMAKE_COMMAND}
+ -D CMAKE_MODULE_PATH=${CMAKE_SOURCE_DIR}/cmake
+ -D PACKAGE_PREFIX=${PACKAGE_PREFIX}
+ -D GNUCASH_SOURCE_DIR=${CMAKE_SOURCE_DIR}
+ -D BUILD_SOURCE_DIR=${CMAKE_BINARY_DIR}
+ "-Ddist_files=\"${dist_files}\""
+ -P ${CMAKE_SOURCE_DIR}/cmake/MakeDist.cmake
+
+ DEPENDS
+ ${dist_files}
+ )
+
+add_custom_target(dist DEPENDS ${DIST_FILE}.gz ${DIST_FILE}.bz2)
+
+add_custom_target(distcheck DEPENDS dist
+ COMMAND ${CMAKE_COMMAND}
+ -D CMAKE_MODULE_PATH=${CMAKE_SOURCE_DIR}/cmake
+ -D PACKAGE_PREFIX=${PACKAGE_PREFIX}
+ -P ${CMAKE_SOURCE_DIR}/cmake/MakeDistCheck.cmake
+ )
+
+############################# END MAKE DIST #################
diff --git a/CMakeNotes.txt b/CMakeNotes.txt
index 000b2a0..8a2d981 100644
--- a/CMakeNotes.txt
+++ b/CMakeNotes.txt
@@ -8,13 +8,17 @@ Current status:
- the common code to generate xml (install only) and html (build
and install) has been ported to cmake commands
- pdf, epub and mobi generation has been ported
+- dist and distcheck targets are implemented
To do:
- provide uninstall functionality like in the gnucash cmake build system
-- create dist and distcheck targets
- handle the special build rules for it (guide and help)
Notable changes:
+- while the dist targets work for both autotools and cmake the
+ cmake one will only result in a tarball suitable for autotools
+ if autotools has been run once before. the cmake build system
+ doesn't know how to generate the config related files generated by configure
- scrollkeeper/omf support has been dropped. It used to be required
for yelp, but that tool stopped using omf after release 2.23.
All platforms we care about have more recent versions.
diff --git a/Makefile.am b/Makefile.am
index 4da5ede..aee79df 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,8 +1,8 @@
SUBDIRS = help \
guide
-EXTRA_DIST = gnucash-docs.spec \
- COPYING-DOCS \
+EXTRA_DIST = COPYING-DOCS \
+ CMakeLists.txt \
xmldocs.make \
omf.make \
pdf.make \
@@ -12,6 +12,13 @@ EXTRA_DIST = gnucash-docs.spec \
xsl \
HACKING \
README \
+ cmake/dist.cmake \
+ cmake/epub.cmake \
+ cmake/gnc_doc_targets.cmake \
+ cmake/MakeDistCheck.cmake \
+ cmake/MakeDist.cmake \
+ cmake/pdf.cmake \
+ cmake/xmldocs.cmake \
fonts/gothic.xml \
fonts/mincho.xml \
fonts/truetype/ume-tgo4.ttf \
@@ -28,7 +35,8 @@ EXTRA_DIST = gnucash-docs.spec \
fonts/opentype/freefont/FreeSerifBold.otf \
fonts/opentype/freefont/FreeSerifItalic.otf \
fonts/opentype/freefont/FreeSerif.otf \
- fonts/README.Fonts
+ fonts/README.Fonts \
+ fop.xconf.in
DISTCHECK_CONFIGURE_FLAGS = --disable-scrollkeeper
diff --git a/cmake/MakeDist.cmake b/cmake/MakeDist.cmake
new file mode 100644
index 0000000..76f17d1
--- /dev/null
+++ b/cmake/MakeDist.cmake
@@ -0,0 +1,61 @@
+# This file implements the process of making source distribution tarballs. It expects to find a file list in
+# the cmake cache variable dist_files.
+#
+# Given all of these files, the procedure is to:
+# 1. Remove any existing dist directory and make a new one.
+# 2. Copy of all the files in dist_manifest.text and ${dist_generated}
+# into the dist directory.
+# 3. Create the tarball and compress it with gzip and bzip2.
+# 4. Then remove the dist directory.
+
+include(${CMAKE_MODULE_PATH}/dist.cmake)
+
+function(make_dist PACKAGE_PREFIX GNUCASH_SOURCE_DIR BUILD_SOURCE_DIR)
+
+ # -- Remove any existing packaging directory.
+ file(REMOVE_RECURSE ${PACKAGE_PREFIX})
+
+ if (EXISTS ${PACKAGE_PREFIX})
+ message(FATAL_ERROR "Unable to remove existing dist directory \"${PACKAGE_PREFIX}\". Cannot continue.")
+ endif()
+
+ # -- Copy in distributed files
+ foreach(file ${dist_files})
+ if(NOT EXISTS ${GNUCASH_SOURCE_DIR}/${file})
+ message(FATAL_ERROR "Can't find dist file ${GNUCASH_SOURCE_DIR}/${file}")
+ endif()
+ get_filename_component(dir ${file} DIRECTORY)
+ file(MAKE_DIRECTORY ${PACKAGE_PREFIX}/${dir})
+ file(COPY ${GNUCASH_SOURCE_DIR}/${file} DESTINATION ${PACKAGE_PREFIX}/${dir})
+ endforeach()
+
+ cmake_policy(SET CMP0012 NEW)
+
+ # -- Create the tarballs.
+
+ execute_process_and_check_result(
+ COMMAND ${CMAKE_COMMAND} -E tar zcf ${PACKAGE_PREFIX}.tar.gz ${PACKAGE_PREFIX}
+ WORKING_DIRECTORY .
+ ERROR_MSG "tar command to create ${PACKAGE_PREFIX}.tar.gz failed."
+ )
+
+ execute_process_and_check_result(
+ COMMAND ${CMAKE_COMMAND} -E tar jcf ${PACKAGE_PREFIX}.tar.bz2 ${PACKAGE_PREFIX}
+ WORKING_DIRECTORY .
+ ERROR_MSG "tar command to create ${PACKAGE_PREFIX}.tar.gz failed."
+ )
+
+ # -- Clean up packaging directory.
+
+ file(REMOVE_RECURSE ${PACKAGE_PREFIX})
+
+ if(EXISTS ${PACKAGE_PREFIX})
+ message(WARNING "Could not remove packaging directory '${PACKAGE_PREFIX}'")
+ endif()
+
+ # -- All done.
+
+ message("\n\nDistributions ${PACKAGE_PREFIX}.tar.gz and ${PACKAGE_PREFIX}.tar.bz2 created.\n\n")
+endfunction()
+
+ make_dist(${PACKAGE_PREFIX} ${GNUCASH_SOURCE_DIR} ${BUILD_SOURCE_DIR})
diff --git a/cmake/MakeDistCheck.cmake b/cmake/MakeDistCheck.cmake
new file mode 100644
index 0000000..abb2532
--- /dev/null
+++ b/cmake/MakeDistCheck.cmake
@@ -0,0 +1,82 @@
+
+include(${CMAKE_MODULE_PATH}/dist.cmake)
+
+function(run_dist_check PACKAGE_PREFIX EXT)
+
+ set(tarball ${PACKAGE_PREFIX}.tar${EXT})
+ if (NOT EXISTS ${tarball})
+ message(FATAL_ERROR "Can't find dist tarball '${tarball}'")
+ endif()
+
+ # Remove the directory we're about to extract to
+ file(REMOVE_RECURSE ${PACKAGE_PREFIX})
+
+ # Untar the distribution we want to check
+ set(TAR_OPTION "zxf")
+ if (${EXT} STREQUAL ".bz2")
+ set(TAR_OPTION "jxf")
+ endif()
+
+ FIND_PROGRAM(NINJA_COMMAND NAMES ninja ninja-build)
+ if (${NINJA_COMMAND} STREQUAL "NINJA_COMMAND-NOTFOUND")
+ message(FATAL_ERROR "Can't find the 'ninja' or 'ninja-build' program.")
+ endif ()
+
+ execute_process_and_check_result(
+ COMMAND ${CMAKE_COMMAND} -E tar ${TAR_OPTION} ${tarball}
+ WORKING_DIRECTORY .
+ ERROR_MSG "Command to untar ${tarball} failed."
+ )
+
+ # Officially, I should make the contents of the untarred dist directory read-only,
+ # but that will cause the build to fail (intltool is unhappy).
+
+ # Create a build directory and configure the Cmake build
+
+ set(BUILD_DIR "_cmake_build")
+ set(INSTALL_DIR "_cmake_install")
+ file(REMOVE_RECURSE ${BUILD_DIR} ${INSTALL_DIR})
+
+ file(MAKE_DIRECTORY ${BUILD_DIR} ${INSTALL_DIR})
+
+ execute_process_and_check_result(
+ COMMAND ${CMAKE_COMMAND} -G Ninja
+ -D CMAKE_INSTALL_PREFIX=../${INSTALL_DIR}
+ ../${PACKAGE_PREFIX}
+ WORKING_DIRECTORY ${BUILD_DIR}
+ ERROR_MSG "CMake configure command failed."
+ )
+
+ # Run ninja in the build directory
+ execute_process_and_check_result(
+ COMMAND ${CMAKE_COMMAND} -E env ${NINJA_COMMAND}
+ WORKING_DIRECTORY ${BUILD_DIR}
+ ERROR_MSG "Ninja build failed."
+ )
+
+ # Run ninja install
+ execute_process_and_check_result(
+ COMMAND ${CMAKE_COMMAND} -E env ${NINJA_COMMAND} install
+ WORKING_DIRECTORY ${BUILD_DIR}
+ ERROR_MSG "Ninja install failed."
+ )
+
+ # Run ninja check in the build directory
+ execute_process_and_check_result(
+ COMMAND ${CMAKE_COMMAND} -E env ${NINJA_COMMAND} check
+ WORKING_DIRECTORY ${BUILD_DIR}
+ ERROR_MSG "Ninja check failed."
+ )
+
+ # Run ninja dist
+ execute_process_and_check_result(
+ COMMAND ${CMAKE_COMMAND} -E env ${NINJA_COMMAND} dist
+ WORKING_DIRECTORY ${BUILD_DIR}
+ ERROR_MSG "Ninja dist failed."
+ )
+
+ message("distcheck complete.")
+
+endfunction()
+
+run_dist_check(${PACKAGE_PREFIX} .gz)
diff --git a/cmake/dist.cmake b/cmake/dist.cmake
index 99fd058..aeede59 100644
--- a/cmake/dist.cmake
+++ b/cmake/dist.cmake
@@ -7,3 +7,15 @@ function(add_to_dist)
set (dist_files ${local_dist_files}
CACHE INTERNAL "Files that will be included in the distribution tarball")
endfunction()
+
+function(execute_process_and_check_result)
+ cmake_parse_arguments(VARS "" "WORKING_DIRECTORY;ERROR_MSG" "COMMAND" ${ARGN})
+ execute_process(
+ COMMAND ${VARS_COMMAND}
+ WORKING_DIRECTORY ${VARS_WORKING_DIRECTORY}
+ RESULT_VARIABLE RESULT
+ )
+ if (NOT "${RESULT}" STREQUAL "0")
+ message(FATAL_ERROR ${VARS_ERROR_MSG})
+ endif()
+endfunction()
diff --git a/cmake/gnc_doc_targets.cmake b/cmake/gnc_doc_targets.cmake
index e6835d5..e3c14ec 100644
--- a/cmake/gnc_doc_targets.cmake
+++ b/cmake/gnc_doc_targets.cmake
@@ -2,14 +2,32 @@ function (add_gnc_doc_targets docname entities)
get_filename_component(lang ${CMAKE_CURRENT_SOURCE_DIR} NAME)
- add_xml_target(${docname} ${lang} "${entities}" figures)
- add_html_target(${docname} ${lang} "${entities}" figures)
- if (PDF)
- add_pdf_target(${docname} ${lang} "${entities}" figures)
- endif()
- add_epub_target(${docname} ${lang} "${entities}" figures)
- if (MOBI)
- add_mobi_target(${docname} ${lang})
+ if(entities)
+ add_xml_target(${docname} ${lang} "${entities}" figures)
+ add_html_target(${docname} ${lang} "${entities}" figures)
+ if (PDF)
+ add_pdf_target(${docname} ${lang} "${entities}" figures)
+ endif()
+ add_epub_target(${docname} ${lang} "${entities}" figures)
+ if (MOBI)
+ add_mobi_target(${docname} ${lang})
+ endif()
endif()
+ set(autotoolsfiles
+ Makefile.am
+ Makefile.in
+ ${docname}-${lang}.omf)
+
+ file(GLOB_RECURSE figures
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ figures/*.png)
+
+ add_to_dist(
+ CMakeLists.txt
+ ${docname}.xml
+ ${entities}
+ ${autotoolsfiles}
+ ${figures})
+
endfunction()
diff --git a/guide/CMakeLists.txt b/guide/CMakeLists.txt
index 3e512c5..b099e2b 100644
--- a/guide/CMakeLists.txt
+++ b/guide/CMakeLists.txt
@@ -30,3 +30,8 @@ add_subdirectory(it)
add_subdirectory(ja)
add_subdirectory(pt)
add_subdirectory(ru)
+
+set(autotoolsfiles
+ Makefile.am
+ Makefile.in)
+add_to_dist(CMakeLists.txt ${autotoolsfiles})
diff --git a/guide/Makefile.am b/guide/Makefile.am
index 4ecdb72..2ee94ce 100644
--- a/guide/Makefile.am
+++ b/guide/Makefile.am
@@ -30,3 +30,5 @@ epub $(MOBI):
uninstall-hook:
rmdir --ignore-fail-on-non-empty "$(DESTDIR)$(gnomehelpdir)"
+
+EXTRA_DIST = CMakeLists.txt
diff --git a/guide/it/CMakeLists.txt b/guide/it/CMakeLists.txt
index 66b8164..9a957a1 100644
--- a/guide/it/CMakeLists.txt
+++ b/guide/it/CMakeLists.txt
@@ -30,6 +30,9 @@ set (COMPONENTS
# xml2po -e -p ${srcdir}/it.po -o $@ ${top_srcdir}/guide/C/gnucash-guide.xml
# if test "${srcdir}" != "${builddir}"; then mv $@ ${srcdir}; fi
-#EXTRA_DIST += it.po
+add_gnc_doc_targets(${docname} "")
-# add_gnc_doc_targets(${docname} "${COMPONENTS}")
+set(extra_dist
+ COME-TRADURRE
+ it.po)
+add_to_dist(${extra_dist})
diff --git a/guide/it/Makefile.am b/guide/it/Makefile.am
index e2508e2..91f63d1 100644
--- a/guide/it/Makefile.am
+++ b/guide/it/Makefile.am
@@ -48,4 +48,4 @@ COMPONENTS = \
# xml2po -e -p ${srcdir}/it.po -o $@ ${top_srcdir}/guide/C/gnucash-guide.xml
# if test "${srcdir}" != "${builddir}"; then mv $@ ${srcdir}; fi
-EXTRA_DIST += it.po
+EXTRA_DIST += it.po COME-TRADURRE
diff --git a/guide/ja/CMakeLists.txt b/guide/ja/CMakeLists.txt
index dde7904..65215a1 100644
--- a/guide/ja/CMakeLists.txt
+++ b/guide/ja/CMakeLists.txt
@@ -31,3 +31,7 @@ set (FOP_XCONF "${CMAKE_CURRENT_SOURCE_DIR}/fop.xconf.in")
set(BASEDIR_JA "${CMAKE_CURRENT_SOURCE_DIR}")
add_gnc_doc_targets(${docname} "${entities}")
+
+set(extra_dist
+ fop.xconf.in)
+add_to_dist(${extra_dist})
diff --git a/guide/ru/CMakeLists.txt b/guide/ru/CMakeLists.txt
index 5f4098c..3f401bb 100644
--- a/guide/ru/CMakeLists.txt
+++ b/guide/ru/CMakeLists.txt
@@ -33,3 +33,7 @@ set (FOP_XCONF "${CMAKE_CURRENT_SOURCE_DIR}/fop.xconf.in")
set(BASEDIR_RU "${CMAKE_CURRENT_SOURCE_DIR}")
add_gnc_doc_targets(${docname} "${entities}")
+
+set(extra_dist
+ fop.xconf.in)
+add_to_dist(${extra_dist})
diff --git a/help/CMakeLists.txt b/help/CMakeLists.txt
index 936e353..ab7aab2 100644
--- a/help/CMakeLists.txt
+++ b/help/CMakeLists.txt
@@ -28,3 +28,8 @@ add_subdirectory(C)
add_subdirectory(de)
add_subdirectory(it)
add_subdirectory(pt)
+
+set(autotoolsfiles
+ Makefile.am
+ Makefile.in)
+add_to_dist(CMakeLists.txt ${autotoolsfiles})
diff --git a/help/Makefile.am b/help/Makefile.am
index d644ef3..5e98435 100644
--- a/help/Makefile.am
+++ b/help/Makefile.am
@@ -30,3 +30,5 @@ epub $(MOBI):
uninstall-hook:
rmdir --ignore-fail-on-non-empty "$(DESTDIR)$(gnomehelpdir)"
+
+EXTRA_DIST = CMakeLists.txt
diff --git a/help/it/CMakeLists.txt b/help/it/CMakeLists.txt
index a474af2..4e23744 100644
--- a/help/it/CMakeLists.txt
+++ b/help/it/CMakeLists.txt
@@ -23,4 +23,9 @@ set (COMPONENTS
#EXTRA_DIST += it.po
-# add_gnc_doc_targets(${docname} "${COMPONENTS}")
+add_gnc_doc_targets(${docname} "")
+
+set(extra_dist
+ COME-TRADURRE
+ it.po)
+add_to_dist(${extra_dist})
diff --git a/help/it/Makefile.am b/help/it/Makefile.am
index ff6ba4a..53ea3f3 100644
--- a/help/it/Makefile.am
+++ b/help/it/Makefile.am
@@ -39,4 +39,4 @@ COMPONENTS = \
# xml2po -e -p ${srcdir}/it.po -o $@ ${top_srcdir}/help/C/gnucash-help.xml
# if test "${srcdir}" != "${builddir}"; then mv $@ ${srcdir}; fi
-EXTRA_DIST += it.po
+EXTRA_DIST += it.po COME-TRADURRE
diff --git a/help/pt/Makefile.am b/help/pt/Makefile.am
index d46a1d9..32275ed 100644
--- a/help/pt/Makefile.am
+++ b/help/pt/Makefile.am
@@ -32,3 +32,6 @@ if WITH_MOBI
include $(top_srcdir)/mobi.make
endif
endif
+
+pt_icons = $(shell ls ${srcdir}/${figdir}/icons/*.png)
+EXTRA_DIST += ${pt_icons}
diff --git a/xmldocs.make b/xmldocs.make
index e97e75c..96bdff2 100644
--- a/xmldocs.make
+++ b/xmldocs.make
@@ -57,7 +57,7 @@ uninstall-hook:
rmdir --ignore-fail-on-non-empty "$(DESTDIR)$(gnomehelpfiguresdir)"
rmdir --ignore-fail-on-non-empty "$(DESTDIR)$(gnomehelpdir)"
-EXTRA_DIST = $(xml_files) $(omffile) $(gnomehelpfigures_DATA)
+EXTRA_DIST = $(xml_files) $(omffile) $(gnomehelpfigures_DATA) CMakeLists.txt
# ************** Rules to make and install omf file ******************************
# If the following file is in a subdir (like help/) you need to add that to the path
commit ed3eebd2729472c1aaaca46d67157bc4ed9ee3a7
Author: Geert Janssens <geert at kobaltwit.be>
Date: Mon Sep 2 16:20:34 2019 +0200
paper format fixup
diff --git a/cmake/dist.cmake b/cmake/dist.cmake
new file mode 100644
index 0000000..99fd058
--- /dev/null
+++ b/cmake/dist.cmake
@@ -0,0 +1,9 @@
+function(add_to_dist)
+ set(local_dist_files ${dist_files})
+ foreach(file ${ARGN})
+ file(RELATIVE_PATH relative ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/${file})
+ list(APPEND local_dist_files ${relative})
+ endforeach()
+ set (dist_files ${local_dist_files}
+ CACHE INTERNAL "Files that will be included in the distribution tarball")
+endfunction()
diff --git a/cmake/pdf.cmake b/cmake/pdf.cmake
index d21132c..b1af7ac 100644
--- a/cmake/pdf.cmake
+++ b/cmake/pdf.cmake
@@ -4,12 +4,17 @@ function (add_pdf_target docname lang entities figdir)
set(pdffile "${docname}.pdf")
file(GLOB figures "${CMAKE_CURRENT_SOURCE_DIR}/${figdir}/*.png")
- # Determine paper format depending on language
- # It's a pretty simple hack: only US or C will be set to letter. All others use A4.
- if (lang MATCHES ".*_us.*|C")
- set (XSLTFLAGS_FO "--stringparam paper.type letter")
- else()
- set (XSLTFLAGS_FO "--stringparam paper.type A4")
+ # Determine paper format depending on language (which maps to the document's directory name)
+ # * for language "C" (fallback language) determine paper format based on current locale
+ # * for other languages, the will be set to letter. All others use A4.
+ set (XSLTFLAGS_FO "--stringparam paper.type A4")
+ if (lang STREQUAL "C")
+ # For the fallback language determine paper format depending on locale
+ # Only US or C will be set to letter. All others use A4.
+ set (ENV_LANG $ENV{LANG})
+ if (ENV_LANG AND ENV_LANG MATCHES ".*_us.*|C") # Replacing ENV_LANG here with if ($ENV{LANG}) won't work.
+ set (XSLTFLAGS_FO "--stringparam paper.type letter")
+ endif()
endif()
add_custom_target("${lang}-${docname}-fo"
commit 1b45ae373e100f475c3ab6b7addb450f433339f6
Author: Geert Janssens <geert at kobaltwit.be>
Date: Mon Sep 2 14:47:58 2019 +0200
CMake - factor out common calls to reduce code duplication
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 21b9490..187a1a4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -23,6 +23,7 @@ set (CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake;${CMAKE_MODULE_PATH}")
include (xmldocs)
include (pdf)
include (epub)
+include (gnc_doc_targets)
include (GNUInstallDirs)
diff --git a/cmake/gnc_doc_targets.cmake b/cmake/gnc_doc_targets.cmake
new file mode 100644
index 0000000..e6835d5
--- /dev/null
+++ b/cmake/gnc_doc_targets.cmake
@@ -0,0 +1,15 @@
+function (add_gnc_doc_targets docname entities)
+
+ get_filename_component(lang ${CMAKE_CURRENT_SOURCE_DIR} NAME)
+
+ add_xml_target(${docname} ${lang} "${entities}" figures)
+ add_html_target(${docname} ${lang} "${entities}" figures)
+ if (PDF)
+ add_pdf_target(${docname} ${lang} "${entities}" figures)
+ endif()
+ add_epub_target(${docname} ${lang} "${entities}" figures)
+ if (MOBI)
+ add_mobi_target(${docname} ${lang})
+ endif()
+
+endfunction()
diff --git a/guide/C/CMakeLists.txt b/guide/C/CMakeLists.txt
index cfe9163..69f3deb 100644
--- a/guide/C/CMakeLists.txt
+++ b/guide/C/CMakeLists.txt
@@ -1,5 +1,3 @@
-set (figdir "figures")
-set (lang "C")
set (entities
fdl-appendix.xml
legal.xml
@@ -29,12 +27,4 @@ set (entities
appendixc.xml
appendixd.xml)
-add_xml_target(${docname} ${lang} "${entities}" ${figdir})
-add_html_target(${docname} ${lang} "${entities}" ${figdir})
-if (PDF)
- add_pdf_target(${docname} ${lang} "${entities}" ${figdir})
-endif()
-add_epub_target(${docname} ${lang} "${entities}" ${figdir})
-if (MOBI)
- add_mobi_target(${docname} ${lang})
-endif()
+add_gnc_doc_targets(${docname} "${entities}")
diff --git a/guide/de/CMakeLists.txt b/guide/de/CMakeLists.txt
index bf10c9c..e57cc3e 100644
--- a/guide/de/CMakeLists.txt
+++ b/guide/de/CMakeLists.txt
@@ -1,5 +1,3 @@
-set (figdir "figures")
-set (lang "de")
set (entities
ch_accts.xml
ch_basics.xml
@@ -30,12 +28,4 @@ set (entities
fdl-appendix.xml
glossary.xml)
-add_xml_target(${docname} ${lang} "${entities}" ${figdir})
-add_html_target(${docname} ${lang} "${entities}" ${figdir})
-if (PDF)
- add_pdf_target(${docname} ${lang} "${entities}" ${figdir})
-endif()
-add_epub_target(${docname} ${lang} "${entities}" ${figdir})
-if (MOBI)
- add_mobi_target(${docname} ${lang})
-endif()
+add_gnc_doc_targets(${docname} "${entities}")
diff --git a/guide/it/CMakeLists.txt b/guide/it/CMakeLists.txt
index 8f5d06b..66b8164 100644
--- a/guide/it/CMakeLists.txt
+++ b/guide/it/CMakeLists.txt
@@ -1,6 +1,3 @@
-set (figdir "figures")
-set (lang "it")
-
set (COMPONENTS
${top_srcdir}/guide/C/gnucash-guide.xml
${top_srcdir}/guide/C/fdl-appendix.xml
@@ -35,12 +32,4 @@ set (COMPONENTS
#EXTRA_DIST += it.po
-# add_xml_target(${docname} ${lang} "${entities}" ${figdir})
-# add_html_target(${docname} ${lang} "${entities}" ${figdir})
-# if (PDF)
-# add_pdf_target(${docname} ${lang} "${entities}" ${figdir})
-# endif()
-# add_epub_target(${docname} ${lang} "${entities}" ${figdir})
-# if (MOBI)
-# add_mobi_target(${docname} ${lang})
-# endif()
+# add_gnc_doc_targets(${docname} "${COMPONENTS}")
diff --git a/guide/ja/CMakeLists.txt b/guide/ja/CMakeLists.txt
index 79b9ed0..dde7904 100644
--- a/guide/ja/CMakeLists.txt
+++ b/guide/ja/CMakeLists.txt
@@ -1,5 +1,3 @@
-set (figdir "figures")
-set (lang "ja")
set (entities
fdl-appendix.xml
legal.xml
@@ -32,12 +30,4 @@ set (FOP_XCONF "${CMAKE_CURRENT_SOURCE_DIR}/fop.xconf.in")
# fop.xconf.in
set(BASEDIR_JA "${CMAKE_CURRENT_SOURCE_DIR}")
-add_xml_target(${docname} ${lang} "${entities}" ${figdir})
-add_html_target(${docname} ${lang} "${entities}" ${figdir})
-if (PDF)
- add_pdf_target(${docname} ${lang} "${entities}" ${figdir})
-endif()
-add_epub_target(${docname} ${lang} "${entities}" ${figdir})
-if (MOBI)
- add_mobi_target(${docname} ${lang})
-endif()
+add_gnc_doc_targets(${docname} "${entities}")
diff --git a/guide/pt/CMakeLists.txt b/guide/pt/CMakeLists.txt
index 4d61f1e..b76fb41 100644
--- a/guide/pt/CMakeLists.txt
+++ b/guide/pt/CMakeLists.txt
@@ -1,5 +1,3 @@
-set (figdir "figures")
-set (lang "pt")
set (entities
fdl-appendix.xml
legal.xml
@@ -28,12 +26,4 @@ set (entities
appendixc.xml
appendixd.xml)
-add_xml_target(${docname} ${lang} "${entities}" ${figdir})
-add_html_target(${docname} ${lang} "${entities}" ${figdir})
-if (PDF)
- add_pdf_target(${docname} ${lang} "${entities}" ${figdir})
-endif()
-add_epub_target(${docname} ${lang} "${entities}" ${figdir})
-if (MOBI)
- add_mobi_target(${docname} ${lang})
-endif()
+add_gnc_doc_targets(${docname} "${entities}")
diff --git a/guide/ru/CMakeLists.txt b/guide/ru/CMakeLists.txt
index dcb3463..5f4098c 100644
--- a/guide/ru/CMakeLists.txt
+++ b/guide/ru/CMakeLists.txt
@@ -1,5 +1,3 @@
-set (figdir "figures")
-set (lang "ru")
set (entities
ch_oview.xml
ch_basics.xml
@@ -34,12 +32,4 @@ set (FOP_XCONF "${CMAKE_CURRENT_SOURCE_DIR}/fop.xconf.in")
# fop.xconf.in
set(BASEDIR_RU "${CMAKE_CURRENT_SOURCE_DIR}")
-add_xml_target(${docname} ${lang} "${entities}" ${figdir})
-add_html_target(${docname} ${lang} "${entities}" ${figdir})
-if (PDF)
- add_pdf_target(${docname} ${lang} "${entities}" ${figdir})
-endif()
-add_epub_target(${docname} ${lang} "${entities}" ${figdir})
-if (MOBI)
- add_mobi_target(${docname} ${lang})
-endif()
+add_gnc_doc_targets(${docname} "${entities}")
diff --git a/help/C/CMakeLists.txt b/help/C/CMakeLists.txt
index 167b4fe..c4b5697 100644
--- a/help/C/CMakeLists.txt
+++ b/help/C/CMakeLists.txt
@@ -1,5 +1,3 @@
-set (figdir "figures")
-set (lang "C")
set (entities
Help_ch_Intro.xml
Help_ch_GettingHelp.xml
@@ -18,12 +16,4 @@ set (entities
Help_fdl-appendix.xml
Help_tips-appendix.xml)
-add_xml_target(${docname} ${lang} "${entities}" ${figdir})
-add_html_target(${docname} ${lang} "${entities}" ${figdir})
-if (PDF)
- add_pdf_target(${docname} ${lang} "${entities}" ${figdir})
-endif()
-add_epub_target(${docname} ${lang} "${entities}" ${figdir})
-if (MOBI)
- add_mobi_target(${docname} ${lang})
-endif()
+add_gnc_doc_targets(${docname} "${entities}")
diff --git a/help/de/CMakeLists.txt b/help/de/CMakeLists.txt
index 79e357e..c1adbc0 100644
--- a/help/de/CMakeLists.txt
+++ b/help/de/CMakeLists.txt
@@ -1,5 +1,3 @@
-set (figdir "figures")
-set (lang "de")
set (entities
Help_ch_Intro.xml
Help_ch_GettingStarted.xml
@@ -10,12 +8,4 @@ set (entities
Help_txf-categories.xml
Help_tips-appendix.xml)
-add_xml_target(${docname} ${lang} "${entities}" ${figdir})
-add_html_target(${docname} ${lang} "${entities}" ${figdir})
-if (PDF)
- add_pdf_target(${docname} ${lang} "${entities}" ${figdir})
-endif()
-add_epub_target(${docname} ${lang} "${entities}" ${figdir})
-if (MOBI)
- add_mobi_target(${docname} ${lang})
-endif()
+add_gnc_doc_targets(${docname} "${entities}")
diff --git a/help/it/CMakeLists.txt b/help/it/CMakeLists.txt
index 46c4927..a474af2 100644
--- a/help/it/CMakeLists.txt
+++ b/help/it/CMakeLists.txt
@@ -1,6 +1,3 @@
-set (figdir "figures")
-set (lang "it")
-
set (COMPONENTS
${top_srcdir}/help/C/gnucash-help.xml
${top_srcdir}/help/C/Help_ch_Intro.xml
@@ -26,12 +23,4 @@ set (COMPONENTS
#EXTRA_DIST += it.po
-# add_xml_target(${docname} ${lang} "${entities}" ${figdir})
-# add_html_target(${docname} ${lang} "${entities}" ${figdir})
-# if (PDF)
-# add_pdf_target(${docname} ${lang} "${entities}" ${figdir})
-# endif()
-# add_epub_target(${docname} ${lang} "${entities}" ${figdir})
-# if (MOBI)
-# add_mobi_target(${docname} ${lang})
-# endif()
+# add_gnc_doc_targets(${docname} "${COMPONENTS}")
diff --git a/help/pt/CMakeLists.txt b/help/pt/CMakeLists.txt
index 05b781b..c4b5697 100644
--- a/help/pt/CMakeLists.txt
+++ b/help/pt/CMakeLists.txt
@@ -1,5 +1,3 @@
-set (figdir "figures")
-set (lang "pt")
set (entities
Help_ch_Intro.xml
Help_ch_GettingHelp.xml
@@ -18,12 +16,4 @@ set (entities
Help_fdl-appendix.xml
Help_tips-appendix.xml)
-add_xml_target(${docname} ${lang} "${entities}" ${figdir})
-add_html_target(${docname} ${lang} "${entities}" ${figdir})
-if (PDF)
- add_pdf_target(${docname} ${lang} "${entities}" ${figdir})
-endif()
-add_epub_target(${docname} ${lang} "${entities}" ${figdir})
-if (MOBI)
- add_mobi_target(${docname} ${lang})
-endif()
+add_gnc_doc_targets(${docname} "${entities}")
commit 99787d0f6afdedbc4fe5f1b1f75b00d58861eff9
Author: Geert Janssens <geert at kobaltwit.be>
Date: Mon Sep 2 14:29:29 2019 +0200
cmake pdf - determine papersize on source directory instead of environment
Only C (en_US) uses letter format all others use A4.
If in the future languages are added that also require letter format,
the regex can be easily be updated
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6664755..21b9490 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -83,15 +83,6 @@ else()
message(STATUS "Mobi file format support is disabled. Specify -DWITH_MOBY=ON if you want to enable it.")
endif()
-# Determine paper format depending on locale
-# It's a pretty simple hack: only US or C will be set to letter. All others use A4.
-set (ENV_LANG $ENV{LANG})
-if (ENV_LANG AND ENV_LANG MATCHES ".*_us.*|C") # Replacing ENV_LANG here with if ($ENV{LANG}) won't work.
- set (XSLTFLAGS_FO "--stringparam paper.type letter")
-else()
- set (XSLTFLAGS_FO "--stringparam paper.type A4")
-endif()
-
# To find our figures in the source directory each run of fop
# will be passed a fop.xconf file to set a base-dir.
# The default fop.xconf file below does just that.
diff --git a/cmake/pdf.cmake b/cmake/pdf.cmake
index d4450c9..d21132c 100644
--- a/cmake/pdf.cmake
+++ b/cmake/pdf.cmake
@@ -4,6 +4,13 @@ function (add_pdf_target docname lang entities figdir)
set(pdffile "${docname}.pdf")
file(GLOB figures "${CMAKE_CURRENT_SOURCE_DIR}/${figdir}/*.png")
+ # Determine paper format depending on language
+ # It's a pretty simple hack: only US or C will be set to letter. All others use A4.
+ if (lang MATCHES ".*_us.*|C")
+ set (XSLTFLAGS_FO "--stringparam paper.type letter")
+ else()
+ set (XSLTFLAGS_FO "--stringparam paper.type A4")
+ endif()
add_custom_target("${lang}-${docname}-fo"
COMMAND ${XSLTPROC} ${XSLTPROCFLAGS} ${XSLTPROCFLAGS_FO}
@@ -24,24 +31,4 @@ function (add_pdf_target docname lang entities figdir)
add_dependencies(${docname}-pdf "${lang}-${docname}-pdf")
-# $(pdffile): $(figfiles)
-#
-# pdf: $(abs_builddir)/figures $(pdffile)
-#
-# # This is only needed for out of tree builds. If you build
-# # from within the source directory, the build system
-# # will ignore this (mentioning a circular dependency)
-# $(abs_builddir)/figures: $(abs_srcdir)/figures
-# ln -s '$<' '$@'
-#
-# $(fofile): $(entities)
-#
-# .xml.fo:
-# $(XSLTPROC) $(XSLTPROCFLAGS) $(XSLTFLAGS_FO) -o '$@' --stringparam fop1.extensions 1 $(top_srcdir)/xsl/1.79.2/fo/docbook.xsl '$<'
-#
-# .fo.pdf:
-# $(FOP) $(FOPFLAGS) -fo '$<' -pdf '$@'
-#
-# CLEANFILES += $(pdffile) $(fofile)
-
endfunction()
commit 51ebd3100d520605c7d9c0f981458a930d00fc02
Author: Geert Janssens <geert at kobaltwit.be>
Date: Mon Sep 2 14:21:36 2019 +0200
Add epub and mobi support to cmake build system
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3f0c858..6664755 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -22,6 +22,7 @@ set (PACKAGE_URL "https://www.gnucash.org/")
set (CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake;${CMAKE_MODULE_PATH}")
include (xmldocs)
include (pdf)
+include (epub)
include (GNUInstallDirs)
@@ -70,23 +71,17 @@ if(NOT FOP)
set (PDF NO)
endif(NOT FOP)
-#
-# dnl
-# dnl Check for mobi target and optional ebook-convert
-# dnl
-# AC_ARG_WITH([mobi],
-# [AC_HELP_STRING([--with-mobi],
-# [do make Mobipocket target])],,
-# with_mobi=no)
-# AM_CONDITIONAL([WITH_MOBI], [test "x$with_mobi" = "xyes"])
-# if test "x$with_mobi" = "xyes"; then
-# AC_PATH_PROG(EBOOK_CONVERT, ebook-convert, no)
-# if test "x$EBOOK_CONVERT" = "xno"; then
-# AC_MSG_ERROR([Couldn't find ebook-convert. Please install the Calibre package: https://www.calibre-ebook.com/])
-# fi
-# else
-# AC_MSG_NOTICE([Didn't make mobi target. If you need, specify --with-mobi])
-# fi
+set(MOBI NO)
+if(WITH_MOBI)
+ find_program(EBOOK_CONVERT ebook-convert)
+ if (EBOOK_CONVERT)
+ set(MOBI YES)
+ else()
+ message(SEND_ERROR "Couldn't find ebook-convert required for mobi file format support. Please install the Calibre package: https://www.calibre-ebook.com/")
+ endif()
+else()
+ message(STATUS "Mobi file format support is disabled. Specify -DWITH_MOBY=ON if you want to enable it.")
+endif()
# Determine paper format depending on locale
# It's a pretty simple hack: only US or C will be set to letter. All others use A4.
@@ -152,6 +147,10 @@ add_custom_target(xml)
if (PDF)
add_custom_target(pdf)
endif()
+add_custom_target(epub)
+if (MOBI)
+ add_custom_target(mobi)
+endif()
add_subdirectory (guide)
diff --git a/CMakeNotes.txt b/CMakeNotes.txt
index bfa6a16..000b2a0 100644
--- a/CMakeNotes.txt
+++ b/CMakeNotes.txt
@@ -7,12 +7,11 @@ Current status:
their CMakeLists.txt file
- the common code to generate xml (install only) and html (build
and install) has been ported to cmake commands
-- pdf generation has been ported
+- pdf, epub and mobi generation has been ported
To do:
- provide uninstall functionality like in the gnucash cmake build system
- create dist and distcheck targets
-- add support for mobi and epub
- handle the special build rules for it (guide and help)
Notable changes:
diff --git a/cmake/epub.cmake b/cmake/epub.cmake
new file mode 100644
index 0000000..c2498eb
--- /dev/null
+++ b/cmake/epub.cmake
@@ -0,0 +1,42 @@
+function (add_epub_target docname lang entities figdir)
+
+ set(epubfile "${docname}.epub")
+ set(EPUB_TMPDIR "${CMAKE_CURRENT_BINARY_DIR}/epub_tmp")
+ file(GLOB figures "${CMAKE_CURRENT_SOURCE_DIR}/${figdir}/*.png")
+
+ add_custom_target("${lang}-${docname}-epub"
+ COMMAND rm -fr "${EPUB_TMPDIR}"
+ COMMAND mkdir "${EPUB_TMPDIR}"
+ COMMAND echo "application/epub+zip" > "${EPUB_TMPDIR}/mimetype"
+ COMMAND ${XSLTPROC} ${XSLTPROCFLAGS}
+ -o "${EPUB_TMPDIR}/"
+ --stringparam base.dir OEBPS/
+ --stringparam epub.metainf.dir META-INF/
+ --stringparam epub.oebps.dir OEBPS/
+ --stringparam fop1.extensions 1
+ "${CMAKE_SOURCE_DIR}/xsl/1.79.2/epub/docbook.xsl"
+ "${CMAKE_CURRENT_SOURCE_DIR}/${docname}.xml"
+ COMMAND cmake -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/figures" "${EPUB_TMPDIR}/OEBPS/figures"
+ COMMAND cd "${EPUB_TMPDIR}" && zip -X -r ../${epubfile} mimetype META-INF OEBPS
+ DEPENDS ${entities} "${docname}.xml" "${CMAKE_SOURCE_DIR}/docbook/gnc-docbookx.dtd" ${figures})
+
+ add_dependencies(${docname}-epub "${lang}-${docname}-epub")
+
+# CLEANFILES += $(epubfile)
+
+endfunction()
+
+function (add_mobi_target docname lang)
+
+ set(epubfile "${CMAKE_CURRENT_BINARY_DIR}/${docname}.epub")
+ set(mobifile "${CMAKE_CURRENT_BINARY_DIR}/${docname}.mobi")
+
+ add_custom_target("${lang}-${docname}-mobi"
+ COMMAND ${EBOOK_CONVERT} ${epubfile} ${mobifile}
+ DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/${docname}.epub")
+
+ add_dependencies(${docname}-mobi "${lang}-${docname}-mobi")
+
+# CLEANFILES += $(epubfile)
+
+endfunction()
diff --git a/guide/C/CMakeLists.txt b/guide/C/CMakeLists.txt
index 1d50194..cfe9163 100644
--- a/guide/C/CMakeLists.txt
+++ b/guide/C/CMakeLists.txt
@@ -34,3 +34,7 @@ add_html_target(${docname} ${lang} "${entities}" ${figdir})
if (PDF)
add_pdf_target(${docname} ${lang} "${entities}" ${figdir})
endif()
+add_epub_target(${docname} ${lang} "${entities}" ${figdir})
+if (MOBI)
+ add_mobi_target(${docname} ${lang})
+endif()
diff --git a/guide/CMakeLists.txt b/guide/CMakeLists.txt
index 717bc50..3e512c5 100644
--- a/guide/CMakeLists.txt
+++ b/guide/CMakeLists.txt
@@ -16,6 +16,14 @@ if (PDF)
add_dependencies(pdf ${docname}-pdf)
endif()
+add_custom_target(${docname}-epub)
+add_dependencies(epub ${docname}-epub)
+
+if (MOBI)
+ add_custom_target(${docname}-mobi)
+ add_dependencies(mobi ${docname}-mobi)
+endif()
+
add_subdirectory(C)
add_subdirectory(de)
add_subdirectory(it)
diff --git a/guide/de/CMakeLists.txt b/guide/de/CMakeLists.txt
index c2bca5a..bf10c9c 100644
--- a/guide/de/CMakeLists.txt
+++ b/guide/de/CMakeLists.txt
@@ -35,3 +35,7 @@ add_html_target(${docname} ${lang} "${entities}" ${figdir})
if (PDF)
add_pdf_target(${docname} ${lang} "${entities}" ${figdir})
endif()
+add_epub_target(${docname} ${lang} "${entities}" ${figdir})
+if (MOBI)
+ add_mobi_target(${docname} ${lang})
+endif()
diff --git a/guide/it/CMakeLists.txt b/guide/it/CMakeLists.txt
index 63ed9fa..8f5d06b 100644
--- a/guide/it/CMakeLists.txt
+++ b/guide/it/CMakeLists.txt
@@ -40,3 +40,7 @@ set (COMPONENTS
# if (PDF)
# add_pdf_target(${docname} ${lang} "${entities}" ${figdir})
# endif()
+# add_epub_target(${docname} ${lang} "${entities}" ${figdir})
+# if (MOBI)
+# add_mobi_target(${docname} ${lang})
+# endif()
diff --git a/guide/ja/CMakeLists.txt b/guide/ja/CMakeLists.txt
index 5d2c1ed..79b9ed0 100644
--- a/guide/ja/CMakeLists.txt
+++ b/guide/ja/CMakeLists.txt
@@ -37,3 +37,7 @@ add_html_target(${docname} ${lang} "${entities}" ${figdir})
if (PDF)
add_pdf_target(${docname} ${lang} "${entities}" ${figdir})
endif()
+add_epub_target(${docname} ${lang} "${entities}" ${figdir})
+if (MOBI)
+ add_mobi_target(${docname} ${lang})
+endif()
diff --git a/guide/pt/CMakeLists.txt b/guide/pt/CMakeLists.txt
index 5216976..4d61f1e 100644
--- a/guide/pt/CMakeLists.txt
+++ b/guide/pt/CMakeLists.txt
@@ -33,3 +33,7 @@ add_html_target(${docname} ${lang} "${entities}" ${figdir})
if (PDF)
add_pdf_target(${docname} ${lang} "${entities}" ${figdir})
endif()
+add_epub_target(${docname} ${lang} "${entities}" ${figdir})
+if (MOBI)
+ add_mobi_target(${docname} ${lang})
+endif()
diff --git a/guide/ru/CMakeLists.txt b/guide/ru/CMakeLists.txt
index 12b57f3..dcb3463 100644
--- a/guide/ru/CMakeLists.txt
+++ b/guide/ru/CMakeLists.txt
@@ -39,3 +39,7 @@ add_html_target(${docname} ${lang} "${entities}" ${figdir})
if (PDF)
add_pdf_target(${docname} ${lang} "${entities}" ${figdir})
endif()
+add_epub_target(${docname} ${lang} "${entities}" ${figdir})
+if (MOBI)
+ add_mobi_target(${docname} ${lang})
+endif()
diff --git a/help/C/CMakeLists.txt b/help/C/CMakeLists.txt
index 054ddce..167b4fe 100644
--- a/help/C/CMakeLists.txt
+++ b/help/C/CMakeLists.txt
@@ -23,3 +23,7 @@ add_html_target(${docname} ${lang} "${entities}" ${figdir})
if (PDF)
add_pdf_target(${docname} ${lang} "${entities}" ${figdir})
endif()
+add_epub_target(${docname} ${lang} "${entities}" ${figdir})
+if (MOBI)
+ add_mobi_target(${docname} ${lang})
+endif()
diff --git a/help/CMakeLists.txt b/help/CMakeLists.txt
index f269593..936e353 100644
--- a/help/CMakeLists.txt
+++ b/help/CMakeLists.txt
@@ -16,6 +16,14 @@ if (PDF)
add_dependencies(pdf ${docname}-pdf)
endif()
+add_custom_target(${docname}-epub)
+add_dependencies(epub ${docname}-epub)
+
+if (MOBI)
+ add_custom_target(${docname}-mobi)
+ add_dependencies(mobi ${docname}-mobi)
+endif()
+
add_subdirectory(C)
add_subdirectory(de)
add_subdirectory(it)
diff --git a/help/de/CMakeLists.txt b/help/de/CMakeLists.txt
index 29f340e..79e357e 100644
--- a/help/de/CMakeLists.txt
+++ b/help/de/CMakeLists.txt
@@ -15,3 +15,7 @@ add_html_target(${docname} ${lang} "${entities}" ${figdir})
if (PDF)
add_pdf_target(${docname} ${lang} "${entities}" ${figdir})
endif()
+add_epub_target(${docname} ${lang} "${entities}" ${figdir})
+if (MOBI)
+ add_mobi_target(${docname} ${lang})
+endif()
diff --git a/help/it/CMakeLists.txt b/help/it/CMakeLists.txt
index 4112132..46c4927 100644
--- a/help/it/CMakeLists.txt
+++ b/help/it/CMakeLists.txt
@@ -31,3 +31,7 @@ set (COMPONENTS
# if (PDF)
# add_pdf_target(${docname} ${lang} "${entities}" ${figdir})
# endif()
+# add_epub_target(${docname} ${lang} "${entities}" ${figdir})
+# if (MOBI)
+# add_mobi_target(${docname} ${lang})
+# endif()
diff --git a/help/pt/CMakeLists.txt b/help/pt/CMakeLists.txt
index 499c9db..05b781b 100644
--- a/help/pt/CMakeLists.txt
+++ b/help/pt/CMakeLists.txt
@@ -23,3 +23,7 @@ add_html_target(${docname} ${lang} "${entities}" ${figdir})
if (PDF)
add_pdf_target(${docname} ${lang} "${entities}" ${figdir})
endif()
+add_epub_target(${docname} ${lang} "${entities}" ${figdir})
+if (MOBI)
+ add_mobi_target(${docname} ${lang})
+endif()
commit 87905666e7ee270aaea077bb7ae74eff570db68d
Author: Geert Janssens <geert at kobaltwit.be>
Date: Mon Sep 2 13:06:36 2019 +0200
Add a note about the cmake build system
diff --git a/CMakeNotes.txt b/CMakeNotes.txt
new file mode 100644
index 0000000..bfa6a16
--- /dev/null
+++ b/CMakeNotes.txt
@@ -0,0 +1,49 @@
+CMake Notes
+-----------
+CMake support is a work in progress.
+
+Current status:
+- basic cmake file layout is set up, that is all directories have
+ their CMakeLists.txt file
+- the common code to generate xml (install only) and html (build
+ and install) has been ported to cmake commands
+- pdf generation has been ported
+
+To do:
+- provide uninstall functionality like in the gnucash cmake build system
+- create dist and distcheck targets
+- add support for mobi and epub
+- handle the special build rules for it (guide and help)
+
+Notable changes:
+- scrollkeeper/omf support has been dropped. It used to be required
+ for yelp, but that tool stopped using omf after release 2.23.
+ All platforms we care about have more recent versions.
+- Japanese font substitution has been dumbed down. One can still pass
+ fonts and a font directory on the command line via -D switches,
+ but the code no longer checks if the font really exists. The resulting
+ pdf and fop output will indicate if there's an issue.
+- With autotools make one could descend into a directory for a specific
+ document and then just run make commands there. Those would affect
+ only that document. CMake on the other hand uses a top-level only
+ rules system so you can only enter commands from the top-level directory
+ That would normally also mean each command would be for the whole project
+ so entering "make html" would do so for all books and their translations.
+
+ To mitigate this, I am setting up targets in the form
+
+ <lang>-<docname>-<format>
+
+ for example
+
+ C-gnucash-guide-xml
+ C-gnucash-guide-html
+
+ For the build step you can use any of these targets to build only a particular
+ language and book. For partial installations it gets slightly more complicated.
+ In this case you have to set environment variable CMAKE_INSTALL_COMPONENT
+ to the wanted target before calling make install, for example:
+
+ CMAKE_INSTALL_COMPONENT=C-gnucash-guide-html make install
+
+ This will only install the English version of the guide in html.
commit 40e4b170e81784660ef8917a21f7945d07b506a4
Author: Geert Janssens <geert at kobaltwit.be>
Date: Mon Sep 2 12:59:30 2019 +0200
Add pdf targets to CMake build system
This comes with a few additional changes
- Japanese font selection logic is reduced to a minimum. That is,
one can pass fonts and a font directory on the cmake command line
with the appropriate -D flags, but none of these are checked for
correctness. I thought of porting the autotools rules for this
but looking closer they are totally broken. If really needed
an improved variation could be written later in cmake.
- Every fop run now requires a fop config file (fop.xconf) in cmake.
This allows fop to find our figures in the source tree instead
eliminates the need for a link or copy of these figures in the
build tree. The existing config files for Russian and Japanese
are amended for this.
- All settings that just mimic the defaults have been removed from
the Japanese fop config file.
In addition the target structure has been slightly re-arranged.
There are a few global targets like html, check, pdf, xml.
Each of these will depend on the equivalent targets per document.
For example: the global html target depends on gnucash-guide-html
and gnucash-help-html.
Each of these in turn then depend on the equivalent targets per
language. For example gnucash-help-html in turn depends on
C-gnucash-help-html, it-gnucash-help-html and so on.
This allows to make all documents in one go or only one document
in all supported languages or only one single document.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0c3b6b6..3f0c858 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -21,21 +21,32 @@ set (PACKAGE_URL "https://www.gnucash.org/")
# Extra cmake macros
set (CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake;${CMAKE_MODULE_PATH}")
include (xmldocs)
+include (pdf)
include (GNUInstallDirs)
# ############################################################
-# These options are settable from the CMake command line. For example, to disable
-# enable mobi, put -D WITH_MOBI=ON on the command line.
+# These options are settable from the CMake command line. For example,
+# to enable mobi, put -D WITH_MOBI=ON on the command line.
option (WITH_MOBI "Enable build rules for Mobipocket document format" OFF)
-set(JP_FONTDIR "" CACHE STRING "Directory to search for Japanese fonts")
-set(JP_MINCHO "ume-tmo3.ttf" CACHE STRING "Japanese Mincho TrueType font to use")
-set(JP_GOTHIC "ume-tmo3.ttf" CACHE STRING "Japanese Gothic TrueType font to use")
+# ############################################################
+# Following parameters can equally be set using -D switches on the CMake command line.
+# Set font dirs and font for Russian pdf documents
+set(EXTENDED_SANS "opentype/freefont/FreeSans" CACHE STRING "Extended sans font used for Russian pdf")
+set(EXTENDED_SERIF "opentype/freefont/FreeSerif" CACHE STRING "Extended serif font used for Russian pdf")
+set(EXTENDED_MONO "opentype/freefont/FreeMono" CACHE STRING "Extended mono font used for Russian pdf")
+set(extended_fontdir "${CMAKE_SOURCE_DIR}/fonts" CACHE STRING "Directory to search for extended fonts")
+set(extended_extension "otf" CACHE STRING "Extended fonts extension")
+
+# Set font dirs and font for Japanese pdf documents
+set(JAPANESE_MINCHO_TTF "ume-tmo3.ttf" CACHE STRING "Mincho TrueType font used for Japanese pdf")
+set(JAPANESE_GOTHIC_TTF "ume-tmo3.ttf" CACHE STRING "Gothic TrueType font used for Japanese pdf")
+set(japanese_fontdir "${CMAKE_SOURCE_DIR}/fonts/truetype" CACHE STRING "Directory to search for Japanese fonts")
-# AM_INIT_AUTOMAKE()
-#
+# ############################################################
+# Find the documentation dependencies
# Check for xsltproc
# Some distributions package it separately of libxslt
@@ -51,104 +62,14 @@ if(NOT XMLLINT)
message(SEND_ERROR "Can't find xmllint, perhaps you should install the xsltproc or libxslt package ?")
endif(NOT XMLLINT)
-#
-# dnl
-# dnl Check for optional fop
-# dnl
-# AC_PATH_PROG(FOP, fop)
-# fop_version=0
-# if test -z "$FOP"; then
-# AC_MSG_WARN([fop not found. You will not be able to generate PDF files.])
-# else
-# fop_version=`$FOP -version | cut -f 3 -d ' ' | cut -c 1`
-# fi
-#
-# dnl
-# dnl Get the absolute path to $srcdir
-# dnl
-# ac_abs_top_srcdir=$(cd -- "$srcdir" && pwd)
-#
-# dnl
-# dnl Set font dirs and font
-# dnl
-# EXTENDED_SANS=opentype/freefont/FreeSans
-# EXTENDED_SERIF=opentype/freefont/FreeSerif
-# EXTENDED_MONO=opentype/freefont/FreeMono
-# extended_fontdir=$ac_abs_top_srcdir/fonts
-# extended_extension=otf
-# AC_SUBST(EXTENDED_SANS)
-# AC_SUBST(EXTENDED_SERIF)
-# AC_SUBST(EXTENDED_MONO)
-# AC_SUBST(extended_fontdir)
-# AC_SUBST(extended_extension)
-#
-# dnl
-# dnl Check Japanese TrueType fonts for PDF
-# dnl
-# AC_ARG_WITH([japanese-fontdir],
-# [AS_HELP_STRING([--with-japanese-fontdir=DIR],
-# [use DIR for Japanese TrueType font directory])],,
-# [with_japanese_fontdir=check])
-# AC_ARG_WITH([japanese-mincho-ttf],
-# [AS_HELP_STRING([--with-japanese-mincho-ttf],
-# [specify Japanese Mincho TrueType font (default is ume-tmo3.ttf)])],,)
-# AC_ARG_WITH([japanese-gothic-ttf],
-# [AS_HELP_STRING([--with-japanese-gothic-ttf],
-# [specify Japanese Gothic TrueType font (default is ume-tmo3.ttf)])],,)
-# JAPANESE_MINCHO_TTF=ume-tmo3.ttf
-# JAPANESE_GOTHIC_TTF=ume-tmo3.ttf
-# japanese_fontdir=$ac_abs_top_srcdir/fonts/truetype
-# JAPANESE_MINCHO_TTF_ABS=$japanese_fontdir/$JAPANESE_MINCHO_TTF
-# JAPANESE_GOTHIC_TTF_ABS=$japanese_fontdir/$JAPANESE_GOTHIC_TTF
-#
-# dnl Japanese fonts search path (Ubuntu, RedHat, openSUSE:local, Fedora)
-# japanese_fontdirs="/usr/share/fonts /usr/local/share/fonts /usr/local/share/fonts"
-#
-# if test "x$with_japanese_fontdir" != "xcheck" && test "x$with_japanese_fontdir" != "xyes" ; then
-# japanese_fontdirs="$with_japanese_fontdir $japanese_fontdir"
-# fi
-#
-# if test "x$with_japanese_mincho_ttf" != "x" ; then
-# AC_CHECK_FILE($with_japanese_mincho_ttf,
-# [JAPANESE_MINCHO_TTF=$with_japanase_mincho_ttf
-# JAPANESE_MINCHO_TTF_ABS=$font
-# font = $with_japanese_mincho_ttf],
-# [for fontdir in $japanese_fontdirs ""; do
-# font=$fontdir/$with_japanese_mincho_ttf
-# AC_CHECK_FILE($font,
-# [JAPANESE_MINCHO_TTF=$font
-# JAPANESE_MINCHO_TTF_ABS=$font
-# japanese_fontdir=$fontdir
-# break],)
-# done])
-# if test -z $font; then
-# AC_MSG_WARN([$with_japanese_mincho_ttf not found, using default mincho font])
-# fi
-# unset font
-# fi
-# if test "x$with_japanese_gothic_ttf" != "x" ; then
-# AC_CHECK_FILE($with_japanese_gothic_ttf,
-# [JAPANESE_GOTHIC_TTF=$with_japanase_gothic_ttf
-# JAPANESE_GOTHIC_TTF_ABS=$font
-# font = $with_japanese_gothic_ttf],
-# [for fontdir in $japanese_fontdirs ""; do
-# font=$fontdir/$with_japanese_gothic_ttf
-# AC_CHECK_FILE($font,
-# [JAPANESE_GOTHIC_TTF=$font
-# JAPANESE_GOTHIC_TTF_ABS=$font
-# japanese_fontdir=$fontdir
-# break],)
-# done])
-# if test -z $font; then
-# AC_MSG_WARN([$with_japanese_gothic_ttf not found, using default gothic font])
-# fi
-# unset font
-# fi
-# AC_SUBST(japanese_fontdir)
-# AC_SUBST(JAPANESE_MINCHO_TTF)
-# AC_SUBST(JAPANESE_MINCHO_TTF_ABS)
-# AC_SUBST(JAPANESE_GOTHIC_TTF)
-# AC_SUBST(JAPANESE_GOTHIC_TTF_ABS)
+# Check for optional fop
+set (PDF YES)
+find_program(FOP fop)
+if(NOT FOP)
+ message(WARNING "Can't find fop. You will not be able to generate PDF files.")
+ set (PDF NO)
+endif(NOT FOP)
+
#
# dnl
# dnl Check for mobi target and optional ebook-convert
@@ -176,6 +97,16 @@ else()
set (XSLTFLAGS_FO "--stringparam paper.type A4")
endif()
+# To find our figures in the source directory each run of fop
+# will be passed a fop.xconf file to set a base-dir.
+# The default fop.xconf file below does just that.
+# Every document/language can define its own FOP_XCONF
+# to point at a document/language specific fop.xconf
+# instead for additional fop configuration as needed.
+# For example the Japanese document will use it to embed Japanese fonts
+set (FOP_XCONF_DFLT "${CMAKE_SOURCE_DIR}/fop.xconf.in")
+set (FOP_XCONF "${FOP_XCONF_DFLT}")
+
#
# ac_cv_gnc_windows="no"
# case $host_os in
@@ -213,13 +144,14 @@ endif()
#
# AC_OUTPUT
-# Add global targets. Their dependencies will be filled in by subsequent command in
+# The global targets. Their dependencies will be filled in by subsequent commands in
# the respective subdirectories.
add_custom_target(html)
add_custom_target(check)
-add_custom_target(xml
- DEPENDS check
-)
+add_custom_target(xml)
+if (PDF)
+ add_custom_target(pdf)
+endif()
add_subdirectory (guide)
diff --git a/cmake/pdf.cmake b/cmake/pdf.cmake
new file mode 100644
index 0000000..d4450c9
--- /dev/null
+++ b/cmake/pdf.cmake
@@ -0,0 +1,47 @@
+function (add_pdf_target docname lang entities figdir)
+
+ set(fofile "${docname}.fo")
+ set(pdffile "${docname}.pdf")
+ file(GLOB figures "${CMAKE_CURRENT_SOURCE_DIR}/${figdir}/*.png")
+
+
+ add_custom_target("${lang}-${docname}-fo"
+ COMMAND ${XSLTPROC} ${XSLTPROCFLAGS} ${XSLTPROCFLAGS_FO}
+ -o "${CMAKE_CURRENT_BINARY_DIR}/${fofile}"
+ --stringparam fop1.extensions 1
+ "${CMAKE_SOURCE_DIR}/xsl/1.79.2/fo/docbook.xsl"
+ "${CMAKE_CURRENT_SOURCE_DIR}/${docname}.xml"
+ DEPENDS ${entities} "${docname}.xml" "${CMAKE_SOURCE_DIR}/docbook/gnc-docbookx.dtd")
+
+ configure_file("${FOP_XCONF}" "${CMAKE_CURRENT_BINARY_DIR}/fop.xconf")
+ add_custom_target("${lang}-${docname}-pdf"
+ COMMAND ${FOP} ${FOPFLAGS}
+ -l ${lang}
+ -c "${CMAKE_CURRENT_BINARY_DIR}/fop.xconf"
+ -fo "${CMAKE_CURRENT_BINARY_DIR}/${fofile}"
+ -pdf "${CMAKE_CURRENT_BINARY_DIR}/${pdffile}"
+ DEPENDS ${lang}-${docname}-fo ${figures})
+
+ add_dependencies(${docname}-pdf "${lang}-${docname}-pdf")
+
+# $(pdffile): $(figfiles)
+#
+# pdf: $(abs_builddir)/figures $(pdffile)
+#
+# # This is only needed for out of tree builds. If you build
+# # from within the source directory, the build system
+# # will ignore this (mentioning a circular dependency)
+# $(abs_builddir)/figures: $(abs_srcdir)/figures
+# ln -s '$<' '$@'
+#
+# $(fofile): $(entities)
+#
+# .xml.fo:
+# $(XSLTPROC) $(XSLTPROCFLAGS) $(XSLTFLAGS_FO) -o '$@' --stringparam fop1.extensions 1 $(top_srcdir)/xsl/1.79.2/fo/docbook.xsl '$<'
+#
+# .fo.pdf:
+# $(FOP) $(FOPFLAGS) -fo '$<' -pdf '$@'
+#
+# CLEANFILES += $(pdffile) $(fofile)
+
+endfunction()
diff --git a/cmake/xmldocs.cmake b/cmake/xmldocs.cmake
index 6056bbe..455e94e 100644
--- a/cmake/xmldocs.cmake
+++ b/cmake/xmldocs.cmake
@@ -30,7 +30,7 @@ function (add_xml_target docname lang entities figdir)
${CMAKE_CURRENT_SOURCE_DIR}/${docname}.xml
DEPENDS ${entities} "${docname}.xml" "${CMAKE_SOURCE_DIR}/docbook/gnc-docbookx.dtd")
- add_dependencies(check "${lang}-${docname}-check")
+ add_dependencies(${docname}-check "${lang}-${docname}-check")
# TODO Uninstall and dist targets
# uninstall-hook:
@@ -77,7 +77,7 @@ function (add_html_target docname lang entities figdir)
add_custom_target("${lang}-${docname}-html"
DEPENDS "${lang}-${docname}-html-files" "${lang}-${docname}-html-figures" "${lang}-${docname}-html-style")
- add_dependencies(html "${lang}-${docname}-html")
+ add_dependencies(${docname}-html "${lang}-${docname}-html")
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${docname}
DESTINATION "${CMAKE_INSTALL_DOCDIR}/${PACKAGE_NAME}/${lang}"
diff --git a/configure.ac b/configure.ac
index e5ead96..cbb15ee 100644
--- a/configure.ac
+++ b/configure.ac
@@ -78,11 +78,13 @@ EXTENDED_SERIF=opentype/freefont/FreeSerif
EXTENDED_MONO=opentype/freefont/FreeMono
extended_fontdir=$ac_abs_top_srcdir/fonts
extended_extension=otf
+BASEDIR_RU=$ac_abs_top_srcdir/guide/ru
AC_SUBST(EXTENDED_SANS)
AC_SUBST(EXTENDED_SERIF)
AC_SUBST(EXTENDED_MONO)
AC_SUBST(extended_fontdir)
AC_SUBST(extended_extension)
+AC_SUBST(BASEDIR_RU)
dnl
dnl Check Japanese TrueType fonts for PDF
@@ -102,6 +104,7 @@ JAPANESE_GOTHIC_TTF=ume-tmo3.ttf
japanese_fontdir=$ac_abs_top_srcdir/fonts/truetype
JAPANESE_MINCHO_TTF_ABS=$japanese_fontdir/$JAPANESE_MINCHO_TTF
JAPANESE_GOTHIC_TTF_ABS=$japanese_fontdir/$JAPANESE_GOTHIC_TTF
+BASEDIR_JA=$ac_abs_top_srcdir/guide/ja
dnl Japanese fonts search path (Ubuntu, RedHat, openSUSE:local, Fedora)
japanese_fontdirs="/usr/share/fonts /usr/local/share/fonts /usr/local/share/fonts"
@@ -151,6 +154,7 @@ AC_SUBST(JAPANESE_MINCHO_TTF)
AC_SUBST(JAPANESE_MINCHO_TTF_ABS)
AC_SUBST(JAPANESE_GOTHIC_TTF)
AC_SUBST(JAPANESE_GOTHIC_TTF_ABS)
+AC_SUBST(BASEDIR_JA)
dnl
dnl Check for mobi target and optional ebook-convert
diff --git a/fop.xconf.in b/fop.xconf.in
new file mode 100644
index 0000000..8e70b4f
--- /dev/null
+++ b/fop.xconf.in
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<!-- $Id: fop.xconf 1616312 2014-08-06 19:19:31Z gadams $ -->
+<!-- More details about this configuration file can be found here:
+ https://xmlgraphics.apache.org/fop/0.95/configuration.html -->
+
+<!-- NOTE: This is the version of the configuration -->
+<fop version="1.0">
+
+ <!-- Base URL for resolving relative URLs -->
+ <base>${CMAKE_CURRENT_SOURCE_DIR}</base>
+
+</fop>
diff --git a/guide/C/CMakeLists.txt b/guide/C/CMakeLists.txt
index 68505a1..1d50194 100644
--- a/guide/C/CMakeLists.txt
+++ b/guide/C/CMakeLists.txt
@@ -31,3 +31,6 @@ set (entities
add_xml_target(${docname} ${lang} "${entities}" ${figdir})
add_html_target(${docname} ${lang} "${entities}" ${figdir})
+if (PDF)
+ add_pdf_target(${docname} ${lang} "${entities}" ${figdir})
+endif()
diff --git a/guide/CMakeLists.txt b/guide/CMakeLists.txt
index 1dee64a..717bc50 100644
--- a/guide/CMakeLists.txt
+++ b/guide/CMakeLists.txt
@@ -1,5 +1,21 @@
set (docname "gnucash-guide")
+add_custom_target(${docname}-html)
+add_dependencies(html ${docname}-html)
+
+add_custom_target(${docname}-check)
+add_dependencies(check ${docname}-check)
+
+add_custom_target(${docname}-xml
+ DEPENDS ${docname}-check
+)
+add_dependencies(xml ${docname}-xml)
+
+if (PDF)
+ add_custom_target(${docname}-pdf)
+ add_dependencies(pdf ${docname}-pdf)
+endif()
+
add_subdirectory(C)
add_subdirectory(de)
add_subdirectory(it)
diff --git a/guide/de/CMakeLists.txt b/guide/de/CMakeLists.txt
index 5e1db52..c2bca5a 100644
--- a/guide/de/CMakeLists.txt
+++ b/guide/de/CMakeLists.txt
@@ -32,3 +32,6 @@ set (entities
add_xml_target(${docname} ${lang} "${entities}" ${figdir})
add_html_target(${docname} ${lang} "${entities}" ${figdir})
+if (PDF)
+ add_pdf_target(${docname} ${lang} "${entities}" ${figdir})
+endif()
diff --git a/guide/it/CMakeLists.txt b/guide/it/CMakeLists.txt
index 01db001..63ed9fa 100644
--- a/guide/it/CMakeLists.txt
+++ b/guide/it/CMakeLists.txt
@@ -34,3 +34,9 @@ set (COMPONENTS
# if test "${srcdir}" != "${builddir}"; then mv $@ ${srcdir}; fi
#EXTRA_DIST += it.po
+
+# add_xml_target(${docname} ${lang} "${entities}" ${figdir})
+# add_html_target(${docname} ${lang} "${entities}" ${figdir})
+# if (PDF)
+# add_pdf_target(${docname} ${lang} "${entities}" ${figdir})
+# endif()
diff --git a/guide/ja/CMakeLists.txt b/guide/ja/CMakeLists.txt
index 8859705..5d2c1ed 100644
--- a/guide/ja/CMakeLists.txt
+++ b/guide/ja/CMakeLists.txt
@@ -1,6 +1,5 @@
set (figdir "figures")
set (lang "ja")
-set (fopconfig "fop.xconf")
set (entities
fdl-appendix.xml
legal.xml
@@ -26,5 +25,15 @@ set (entities
appendixc.xml
appendixd.xml)
+set (FOP_XCONF "${CMAKE_CURRENT_SOURCE_DIR}/fop.xconf.in")
+# Compatibility hack for autotools
+# When autotools gets dropped this line can be removed
+# and CMAKE_CURRENT_SOURCE_DIR can be used directly in
+# fop.xconf.in
+set(BASEDIR_JA "${CMAKE_CURRENT_SOURCE_DIR}")
+
add_xml_target(${docname} ${lang} "${entities}" ${figdir})
add_html_target(${docname} ${lang} "${entities}" ${figdir})
+if (PDF)
+ add_pdf_target(${docname} ${lang} "${entities}" ${figdir})
+endif()
diff --git a/guide/ja/fop.xconf.in b/guide/ja/fop.xconf.in
index 465432f..9e234c0 100644
--- a/guide/ja/fop.xconf.in
+++ b/guide/ja/fop.xconf.in
@@ -1,24 +1,14 @@
<?xml version="1.0"?>
<fop version="1.0">
+ <!-- BASEDIR_JA can be replaced with CMAKE_CURRENT_SOURCE_DIR
+ once we completely drop the autotools build system -->
+ <base>@BASEDIR_JA@</base>
<font-base>@japanese_fontdir@</font-base>
- <!-- Source resolution in dpi (dots/pixels per inch) for determining the size of pixels in SVG and bitmap images, default: 72dpi -->
- <source-resolution>72</source-resolution>
- <!-- Target resolution in dpi (dots/pixels per inch) for specifying the target resolution for generated bitmaps, default: 72dpi -->
- <target-resolution>72</target-resolution>
-
- <!-- page-height and page-width, A4 for Japanese -->
- <default-page-settings height="297mm" width="210mm"/>
-
<!-- Information for specific renderers -->
<!-- Uses renderer mime type for renderers -->
<renderers>
<renderer mime="application/pdf">
- <filterList>
- <!-- provides compression using zlib flate (default is on) -->
- <value>flate</value>
- </filterList>
-
<fonts>
<!-- embedded fonts -->
<!--
@@ -63,377 +53,6 @@
</xml-handler>
</renderer>
-
- <renderer mime="application/x-afp">
- <!--
- The bit depth and type of images produced
- (this is the default setting)
- -->
- <images mode="b+w" bits-per-pixel="8"/>
- <renderer-resolution>240</renderer-resolution>
- <resource-group-file>resources.afp</resource-group-file>
-
- <fonts>
- <!--
- Below is an example using raster font configuration using FOP builtin base-14 font metrics.
- for Times Roman, Helvetica and Courier.
-
- Depending on AFP raster and outline font availability on your installation you will
- most likely need to modify the configuration provided below.
-
- See http://xmlgraphics.apache.org/fop/trunk/output.html#afp-configuration
- for details of FOP configuration for AFP
- -->
-
- <!-- Times Roman -->
- <font>
- <afp-font name="Times Roman" type="raster" codepage="T1V10500" encoding="Cp500">
- <afp-raster-font size="6" characterset="C0N20060" base14-font="TimesRoman"/>
- <afp-raster-font size="7" characterset="C0N20070" base14-font="TimesRoman"/>
- <afp-raster-font size="8" characterset="C0N20080" base14-font="TimesRoman"/>
- <afp-raster-font size="9" characterset="C0N20090" base14-font="TimesRoman"/>
- <afp-raster-font size="10" characterset="C0N20000" base14-font="TimesRoman"/>
- <afp-raster-font size="11" characterset="C0N200A0" base14-font="TimesRoman"/>
- <afp-raster-font size="12" characterset="C0N200B0" base14-font="TimesRoman"/>
- <afp-raster-font size="14" characterset="C0N200D0" base14-font="TimesRoman"/>
- <afp-raster-font size="16" characterset="C0N200F0" base14-font="TimesRoman"/>
- <afp-raster-font size="18" characterset="C0N200H0" base14-font="TimesRoman"/>
- <afp-raster-font size="20" characterset="C0N200J0" base14-font="TimesRoman"/>
- <afp-raster-font size="24" characterset="C0N200N0" base14-font="TimesRoman"/>
- <afp-raster-font size="30" characterset="C0N200T0" base14-font="TimesRoman"/>
- <afp-raster-font size="36" characterset="C0N200Z0" base14-font="TimesRoman"/>
- </afp-font>
- <font-triplet name="Times" style="normal" weight="normal"/>
- <font-triplet name="TimesRoman" style="normal" weight="normal"/>
- <font-triplet name="Times Roman" style="normal" weight="normal"/>
- <font-triplet name="Times-Roman" style="normal" weight="normal"/>
- <font-triplet name="Times New Roman" style="normal" weight="normal"/>
- <font-triplet name="TimesNewRoman" style="normal" weight="normal"/>
- <font-triplet name="serif" style="normal" weight="normal"/>
- </font>
-
- <!-- Times Roman Italic -->
- <font>
- <afp-font name="Times Roman Italic" type="raster" codepage="T1V10500" encoding="Cp500">
- <afp-raster-font size="6" characterset="C0N30060" base14-font="TimesItalic"/>
- <afp-raster-font size="7" characterset="C0N30070" base14-font="TimesItalic"/>
- <afp-raster-font size="8" characterset="C0N30080" base14-font="TimesItalic"/>
- <afp-raster-font size="9" characterset="C0N30090" base14-font="TimesItalic"/>
- <afp-raster-font size="10" characterset="C0N30000" base14-font="TimesItalic"/>
- <afp-raster-font size="11" characterset="C0N300A0" base14-font="TimesItalic"/>
- <afp-raster-font size="12" characterset="C0N300B0" base14-font="TimesItalic"/>
- <afp-raster-font size="14" characterset="C0N300D0" base14-font="TimesItalic"/>
- <afp-raster-font size="16" characterset="C0N300F0" base14-font="TimesItalic"/>
- <afp-raster-font size="18" characterset="C0N300H0" base14-font="TimesItalic"/>
- <afp-raster-font size="20" characterset="C0N300J0" base14-font="TimesItalic"/>
- <afp-raster-font size="24" characterset="C0N300N0" base14-font="TimesItalic"/>
- <afp-raster-font size="30" characterset="C0N300T0" base14-font="TimesItalic"/>
- <afp-raster-font size="36" characterset="C0N300Z0" base14-font="TimesItalic"/>
- </afp-font>
- <font-triplet name="Times" style="italic" weight="normal"/>
- <font-triplet name="TimesRoman" style="italic" weight="normal"/>
- <font-triplet name="Times Roman" style="italic" weight="normal"/>
- <font-triplet name="Times-Roman" style="italic" weight="normal"/>
- <font-triplet name="Times New Roman" style="italic" weight="normal"/>
- <font-triplet name="TimesNewRoman" style="italic" weight="normal"/>
- <font-triplet name="serif" style="italic" weight="normal"/>
- </font>
-
- <!-- Times Roman Bold -->
- <font>
- <afp-font name="Times Roman Bold" type="raster" codepage="T1V10500" encoding="Cp500">
- <afp-raster-font size="6" characterset="C0N40060" base14-font="TimesBold"/>
- <afp-raster-font size="7" characterset="C0N40070" base14-font="TimesBold"/>
- <afp-raster-font size="8" characterset="C0N40080" base14-font="TimesBold"/>
- <afp-raster-font size="9" characterset="C0N40090" base14-font="TimesBold"/>
- <afp-raster-font size="10" characterset="C0N40000" base14-font="TimesBold"/>
- <afp-raster-font size="11" characterset="C0N400A0" base14-font="TimesBold"/>
- <afp-raster-font size="12" characterset="C0N400B0" base14-font="TimesBold"/>
- <afp-raster-font size="14" characterset="C0N400D0" base14-font="TimesBold"/>
- <afp-raster-font size="16" characterset="C0N400F0" base14-font="TimesBold"/>
- <afp-raster-font size="18" characterset="C0N400H0" base14-font="TimesBold"/>
- <afp-raster-font size="20" characterset="C0N400J0" base14-font="TimesBold"/>
- <afp-raster-font size="24" characterset="C0N400N0" base14-font="TimesBold"/>
- <afp-raster-font size="30" characterset="C0N400T0" base14-font="TimesBold"/>
- <afp-raster-font size="36" characterset="C0N400Z0" base14-font="TimesBold"/>
- </afp-font>
- <font-triplet name="Times" style="normal" weight="bold"/>
- <font-triplet name="TimesRoman" style="normal" weight="bold"/>
- <font-triplet name="Times Roman" style="normal" weight="bold"/>
- <font-triplet name="Times-Roman" style="normal" weight="bold"/>
- <font-triplet name="Times New Roman" style="normal" weight="bold"/>
- <font-triplet name="TimesNewRoman" style="normal" weight="bold"/>
- <font-triplet name="serif" style="normal" weight="bold"/>
- </font>
-
- <!-- Times Roman Italic Bold -->
- <font>
- <afp-font name="Times Roman Italic Bold" type="raster" codepage="T1V10500" encoding="Cp500">
- <afp-raster-font size="6" characterset="C0N50060" base14-font="TimesBoldItalic"/>
- <afp-raster-font size="7" characterset="C0N50070" base14-font="TimesBoldItalic"/>
- <afp-raster-font size="8" characterset="C0N50080" base14-font="TimesBoldItalic"/>
- <afp-raster-font size="9" characterset="C0N50090" base14-font="TimesBoldItalic"/>
- <afp-raster-font size="10" characterset="C0N50000" base14-font="TimesBoldItalic"/>
- <afp-raster-font size="11" characterset="C0N500A0" base14-font="TimesBoldItalic"/>
- <afp-raster-font size="12" characterset="C0N500B0" base14-font="TimesBoldItalic"/>
- <afp-raster-font size="14" characterset="C0N500D0" base14-font="TimesBoldItalic"/>
- <afp-raster-font size="16" characterset="C0N500F0" base14-font="TimesBoldItalic"/>
- <afp-raster-font size="18" characterset="C0N500H0" base14-font="TimesBoldItalic"/>
- <afp-raster-font size="20" characterset="C0N500J0" base14-font="TimesBoldItalic"/>
- <afp-raster-font size="24" characterset="C0N500N0" base14-font="TimesBoldItalic"/>
- <afp-raster-font size="30" characterset="C0N500T0" base14-font="TimesBoldItalic"/>
- <afp-raster-font size="36" characterset="C0N500Z0" base14-font="TimesBoldItalic"/>
- </afp-font>
- <font-triplet name="Times" style="italic" weight="bold"/>
- <font-triplet name="TimesRoman" style="italic" weight="bold"/>
- <font-triplet name="Times Roman" style="italic" weight="bold"/>
- <font-triplet name="Times-Roman" style="italic" weight="bold"/>
- <font-triplet name="Times New Roman" style="italic" weight="bold"/>
- <font-triplet name="TimesNewRoman" style="italic" weight="bold"/>
- <font-triplet name="serif" style="italic" weight="bold"/>
- </font>
-
- <!-- Helvetica -->
- <font>
- <afp-font name="Helvetica" type="raster" codepage="T1V10500" encoding="Cp500">
- <afp-raster-font size="6" characterset="C0H20060" base14-font="Helvetica"/>
- <afp-raster-font size="7" characterset="C0H20070" base14-font="Helvetica"/>
- <afp-raster-font size="8" characterset="C0H20080" base14-font="Helvetica"/>
- <afp-raster-font size="9" characterset="C0H20090" base14-font="Helvetica"/>
- <afp-raster-font size="10" characterset="C0H20000" base14-font="Helvetica"/>
- <afp-raster-font size="11" characterset="C0H200A0" base14-font="Helvetica"/>
- <afp-raster-font size="12" characterset="C0H200B0" base14-font="Helvetica"/>
- <afp-raster-font size="14" characterset="C0H200D0" base14-font="Helvetica"/>
- <afp-raster-font size="16" characterset="C0H200F0" base14-font="Helvetica"/>
- <afp-raster-font size="18" characterset="C0H200H0" base14-font="Helvetica"/>
- <afp-raster-font size="20" characterset="C0H200J0" base14-font="Helvetica"/>
- <afp-raster-font size="24" characterset="C0H200N0" base14-font="Helvetica"/>
- <afp-raster-font size="30" characterset="C0H200T0" base14-font="Helvetica"/>
- <afp-raster-font size="36" characterset="C0H200Z0" base14-font="Helvetica"/>
- </afp-font>
- <font-triplet name="Helvetica" style="normal" weight="normal"/>
- <font-triplet name="Arial" style="normal" weight="normal"/>
- <font-triplet name="sans-serif" style="normal" weight="normal"/>
- <font-triplet name="any" style="normal" weight="normal"/>
- </font>
-
- <!-- Helvetica Italic -->
- <font>
- <afp-font name="Helvetica Italic" type="raster" codepage="T1V10500" encoding="Cp500">
- <afp-raster-font size="6" characterset="C0H30060" base14-font="HelveticaOblique"/>
- <afp-raster-font size="7" characterset="C0H30070" base14-font="HelveticaOblique"/>
- <afp-raster-font size="8" characterset="C0H30080" base14-font="HelveticaOblique"/>
- <afp-raster-font size="9" characterset="C0H30090" base14-font="HelveticaOblique"/>
- <afp-raster-font size="10" characterset="C0H30000" base14-font="HelveticaOblique"/>
- <afp-raster-font size="11" characterset="C0H300A0" base14-font="HelveticaOblique"/>
- <afp-raster-font size="12" characterset="C0H300B0" base14-font="HelveticaOblique"/>
- <afp-raster-font size="14" characterset="C0H300D0" base14-font="HelveticaOblique"/>
- <afp-raster-font size="16" characterset="C0H300F0" base14-font="HelveticaOblique"/>
- <afp-raster-font size="18" characterset="C0H300H0" base14-font="HelveticaOblique"/>
- <afp-raster-font size="20" characterset="C0H300J0" base14-font="HelveticaOblique"/>
- <afp-raster-font size="24" characterset="C0H300N0" base14-font="HelveticaOblique"/>
- <afp-raster-font size="30" characterset="C0H300T0" base14-font="HelveticaOblique"/>
- <afp-raster-font size="36" characterset="C0H300Z0" base14-font="HelveticaOblique"/>
- </afp-font>
- <font-triplet name="Helvetica" style="italic" weight="normal"/>
- <font-triplet name="Arial" style="italic" weight="normal"/>
- <font-triplet name="sans-serif" style="italic" weight="normal"/>
- </font>
-
- <!-- Helvetica (Semi) Bold -->
- <font>
- <afp-font name="Helvetica (Semi) Bold" type="raster" codepage="T1V10500" encoding="Cp500">
- <afp-raster-font size="6" characterset="C0H40060" base14-font="HelveticaBold"/>
- <afp-raster-font size="7" characterset="C0H40070" base14-font="HelveticaBold"/>
- <afp-raster-font size="8" characterset="C0H40080" base14-font="HelveticaBold"/>
- <afp-raster-font size="9" characterset="C0H40090" base14-font="HelveticaBold"/>
- <afp-raster-font size="10" characterset="C0H40000" base14-font="HelveticaBold"/>
- <afp-raster-font size="11" characterset="C0H400A0" base14-font="HelveticaBold"/>
- <afp-raster-font size="12" characterset="C0H400B0" base14-font="HelveticaBold"/>
- <afp-raster-font size="14" characterset="C0H400D0" base14-font="HelveticaBold"/>
- <afp-raster-font size="16" characterset="C0H400F0" base14-font="HelveticaBold"/>
- <afp-raster-font size="18" characterset="C0H400H0" base14-font="HelveticaBold"/>
- <afp-raster-font size="20" characterset="C0H400J0" base14-font="HelveticaBold"/>
- <afp-raster-font size="24" characterset="C0H400N0" base14-font="HelveticaBold"/>
- <afp-raster-font size="30" characterset="C0H400T0" base14-font="HelveticaBold"/>
- <afp-raster-font size="36" characterset="C0H400Z0" base14-font="HelveticaBold"/>
- </afp-font>
- <font-triplet name="Helvetica" style="normal" weight="bold"/>
- <font-triplet name="Arial" style="normal" weight="bold"/>
- <font-triplet name="sans-serif" style="normal" weight="bold"/>
- </font>
-
- <!-- Helvetica Italic (Semi) Bold -->
- <font>
- <afp-font name="Helvetica Italic (Semi) Bold" type="raster" codepage="T1V10500" encoding="Cp500">
- <afp-raster-font size="6" characterset="C0H50060" base14-font="HelveticaBoldOblique"/>
- <afp-raster-font size="7" characterset="C0H50070" base14-font="HelveticaBoldOblique"/>
- <afp-raster-font size="8" characterset="C0H50080" base14-font="HelveticaBoldOblique"/>
- <afp-raster-font size="9" characterset="C0H50090" base14-font="HelveticaBoldOblique"/>
- <afp-raster-font size="10" characterset="C0H50000" base14-font="HelveticaBoldOblique"/>
- <afp-raster-font size="11" characterset="C0H500A0" base14-font="HelveticaBoldOblique"/>
- <afp-raster-font size="12" characterset="C0H500B0" base14-font="HelveticaBoldOblique"/>
- <afp-raster-font size="14" characterset="C0H500D0" base14-font="HelveticaBoldOblique"/>
- <afp-raster-font size="16" characterset="C0H500F0" base14-font="HelveticaBoldOblique"/>
- <afp-raster-font size="18" characterset="C0H500H0" base14-font="HelveticaBoldOblique"/>
- <afp-raster-font size="20" characterset="C0H500J0" base14-font="HelveticaBoldOblique"/>
- <afp-raster-font size="24" characterset="C0H500N0" base14-font="HelveticaBoldOblique"/>
- <afp-raster-font size="30" characterset="C0H500T0" base14-font="HelveticaBoldOblique"/>
- <afp-raster-font size="36" characterset="C0H500Z0" base14-font="HelveticaBoldOblique"/>
- </afp-font>
- <font-triplet name="Helvetica" style="italic" weight="bold"/>
- <font-triplet name="Arial" style="italic" weight="bold"/>
- <font-triplet name="sans-serif" style="italic" weight="bold"/>
- </font>
-
- <!-- Courier -->
- <font>
- <afp-font name="Courier" type="raster" codepage="T1V10500" encoding="Cp500">
- <afp-raster-font size="6" characterset="C0420060" base14-font="Courier"/>
- <afp-raster-font size="7" characterset="C0420070" base14-font="Courier"/>
- <afp-raster-font size="8" characterset="C0420080" base14-font="Courier"/>
- <afp-raster-font size="9" characterset="C0420090" base14-font="Courier"/>
- <afp-raster-font size="10" characterset="C0420000" base14-font="Courier"/>
- <afp-raster-font size="11" characterset="C04200A0" base14-font="Courier"/>
- <afp-raster-font size="12" characterset="C04200B0" base14-font="Courier"/>
- <afp-raster-font size="14" characterset="C04200D0" base14-font="Courier"/>
- <afp-raster-font size="16" characterset="C04200F0" base14-font="Courier"/>
- <afp-raster-font size="18" characterset="C04200H0" base14-font="Courier"/>
- <afp-raster-font size="20" characterset="C04200J0" base14-font="Courier"/>
- <afp-raster-font size="24" characterset="C04200N0" base14-font="Courier"/>
- <afp-raster-font size="30" characterset="C04200T0" base14-font="Courier"/>
- <afp-raster-font size="36" characterset="C04200Z0" base14-font="Courier"/>
- </afp-font>
- <font-triplet name="Courier" style="normal" weight="normal"/>
- <font-triplet name="monospace" style="normal" weight="normal"/>
- </font>
-
- <!-- Courier Italic -->
- <font>
- <afp-font name="Courier Italic" type="raster" codepage="T1V10500" encoding="Cp500">
- <afp-raster-font size="6" characterset="C0430060" base14-font="CourierOblique"/>
- <afp-raster-font size="7" characterset="C0430070" base14-font="CourierOblique"/>
- <afp-raster-font size="8" characterset="C0430080" base14-font="CourierOblique"/>
- <afp-raster-font size="9" characterset="C0430090" base14-font="CourierOblique"/>
- <afp-raster-font size="10" characterset="C0430000" base14-font="CourierOblique"/>
- <afp-raster-font size="11" characterset="C04300A0" base14-font="CourierOblique"/>
- <afp-raster-font size="12" characterset="C04300B0" base14-font="CourierOblique"/>
- <afp-raster-font size="14" characterset="C04300D0" base14-font="CourierOblique"/>
- <afp-raster-font size="16" characterset="C04300F0" base14-font="CourierOblique"/>
- <afp-raster-font size="18" characterset="C04300H0" base14-font="CourierOblique"/>
- <afp-raster-font size="20" characterset="C04300J0" base14-font="CourierOblique"/>
- <afp-raster-font size="24" characterset="C04300N0" base14-font="CourierOblique"/>
- <afp-raster-font size="30" characterset="C04300T0" base14-font="CourierOblique"/>
- <afp-raster-font size="36" characterset="C04300Z0" base14-font="CourierOblique"/>
- </afp-font>
- <font-triplet name="Courier" style="italic" weight="normal"/>
- <font-triplet name="monospace" style="italic" weight="normal"/>
- </font>
-
- <!-- Courier Bold -->
- <font>
- <afp-font name="Courier Bold" type="raster" codepage="T1V10500" encoding="Cp500">
- <afp-raster-font size="6" characterset="C0440060" base14-font="CourierBold"/>
- <afp-raster-font size="7" characterset="C0440070" base14-font="CourierBold"/>
- <afp-raster-font size="8" characterset="C0440080" base14-font="CourierBold"/>
- <afp-raster-font size="9" characterset="C0440090" base14-font="CourierBold"/>
- <afp-raster-font size="10" characterset="C0440000" base14-font="CourierBold"/>
- <afp-raster-font size="11" characterset="C04400A0" base14-font="CourierBold"/>
- <afp-raster-font size="12" characterset="C04400B0" base14-font="CourierBold"/>
- <afp-raster-font size="14" characterset="C04400D0" base14-font="CourierBold"/>
- <afp-raster-font size="16" characterset="C04400F0" base14-font="CourierBold"/>
- <afp-raster-font size="18" characterset="C04400H0" base14-font="CourierBold"/>
- <afp-raster-font size="20" characterset="C04400J0" base14-font="CourierBold"/>
- <afp-raster-font size="24" characterset="C04400N0" base14-font="CourierBold"/>
- <afp-raster-font size="30" characterset="C04400T0" base14-font="CourierBold"/>
- <afp-raster-font size="36" characterset="C04400Z0" base14-font="CourierBold"/>
- </afp-font>
- <font-triplet name="Courier" style="normal" weight="bold"/>
- <font-triplet name="monospace" style="normal" weight="bold"/>
- </font>
-
- <!-- Courier Italic Bold -->
- <font>
- <afp-font name="Courier Italic Bold" type="raster" codepage="T1V10500" encoding="Cp500">
- <afp-raster-font size="6" characterset="C0450060" base14-font="CourierBoldOblique"/>
- <afp-raster-font size="7" characterset="C0450070" base14-font="CourierBoldOblique"/>
- <afp-raster-font size="8" characterset="C0450080" base14-font="CourierBoldOblique"/>
- <afp-raster-font size="9" characterset="C0450090" base14-font="CourierBoldOblique"/>
- <afp-raster-font size="10" characterset="C0450000" base14-font="CourierBoldOblique"/>
- <afp-raster-font size="11" characterset="C04500A0" base14-font="CourierBoldOblique"/>
- <afp-raster-font size="12" characterset="C04500B0" base14-font="CourierBoldOblique"/>
- <afp-raster-font size="14" characterset="C04500D0" base14-font="CourierBoldOblique"/>
- <afp-raster-font size="16" characterset="C04500F0" base14-font="CourierBoldOblique"/>
- <afp-raster-font size="18" characterset="C04500H0" base14-font="CourierBoldOblique"/>
- <afp-raster-font size="20" characterset="C04500J0" base14-font="CourierBoldOblique"/>
- <afp-raster-font size="24" characterset="C04500N0" base14-font="CourierBoldOblique"/>
- <afp-raster-font size="30" characterset="C04500T0" base14-font="CourierBoldOblique"/>
- <afp-raster-font size="36" characterset="C04500Z0" base14-font="CourierBoldOblique"/>
- </afp-font>
- <font-triplet name="Courier" style="italic" weight="bold"/>
- <font-triplet name="monospace" style="italic" weight="bold"/>
- </font>
-
- <!--
- Configure double-byte (CID Keyed font (Type 0)) AFP fonts with type="CIDKeyed".
-
- example:
- <font>
- <afp-font type="CIDKeyed" encoding="UnicodeBigUnmarked"
- codepage="T1120000" characterset="CZJHMNU"
- base-uri="fonts" />
- <font-triplet name="J-Heisei Mincho" style="normal" weight="normal" />
- </font>
- -->
-
-
- </fonts>
- </renderer>
-
- <renderer mime="application/postscript">
- <!-- This option forces the PS renderer to rotate landscape pages -->
- <!--auto-rotate-landscape>true</auto-rotate-landscape-->
-
- <!-- This option lets you specify additional options on an XML handler -->
- <!--xml-handler namespace="http://www.w3.org/2000/svg">
- <stroke-text>false</stroke-text>
- </xml-handler-->
- </renderer>
-
- <renderer mime="application/vnd.hp-PCL">
- </renderer>
-
- <!-- MIF does not have a renderer
- <renderer mime="application/vnd.mif">
- </renderer>
- -->
-
- <renderer mime="image/svg+xml">
- <format type="paginated"/>
- <link value="true"/>
- <strokeText value="true"/>
- </renderer>
-
- <renderer mime="application/awt">
- </renderer>
-
- <renderer mime="image/png">
- <!--transparent-page-background>true</transparent-page-background-->
- </renderer>
-
- <renderer mime="image/tiff">
- <!--transparent-page-background>true</transparent-page-background-->
- <!--compression>CCITT T.6</compression-->
- </renderer>
-
- <renderer mime="text/xml">
- </renderer>
-
- <!-- RTF does not have a renderer
- <renderer mime="text/rtf">
- </renderer>
- -->
-
</renderers>
</fop>
diff --git a/guide/pt/CMakeLists.txt b/guide/pt/CMakeLists.txt
index 6e24829..5216976 100644
--- a/guide/pt/CMakeLists.txt
+++ b/guide/pt/CMakeLists.txt
@@ -30,3 +30,6 @@ set (entities
add_xml_target(${docname} ${lang} "${entities}" ${figdir})
add_html_target(${docname} ${lang} "${entities}" ${figdir})
+if (PDF)
+ add_pdf_target(${docname} ${lang} "${entities}" ${figdir})
+endif()
diff --git a/guide/ru/CMakeLists.txt b/guide/ru/CMakeLists.txt
index fc054ff..12b57f3 100644
--- a/guide/ru/CMakeLists.txt
+++ b/guide/ru/CMakeLists.txt
@@ -1,6 +1,5 @@
set (figdir "figures")
set (lang "ru")
-set (fopconfig "fop.xconf")
set (entities
ch_oview.xml
ch_basics.xml
@@ -28,5 +27,15 @@ set (entities
appendixc.xml
appendixd.xml)
+set (FOP_XCONF "${CMAKE_CURRENT_SOURCE_DIR}/fop.xconf.in")
+# Compatibility hack for autotools
+# When autotools gets dropped this line can be removed
+# and CMAKE_CURRENT_SOURCE_DIR can be used directly in
+# fop.xconf.in
+set(BASEDIR_RU "${CMAKE_CURRENT_SOURCE_DIR}")
+
add_xml_target(${docname} ${lang} "${entities}" ${figdir})
add_html_target(${docname} ${lang} "${entities}" ${figdir})
+if (PDF)
+ add_pdf_target(${docname} ${lang} "${entities}" ${figdir})
+endif()
diff --git a/guide/ru/fop.xconf.in b/guide/ru/fop.xconf.in
index c0bff53..53a87c6 100644
--- a/guide/ru/fop.xconf.in
+++ b/guide/ru/fop.xconf.in
@@ -1,13 +1,9 @@
<?xml version="1.0"?>
<fop version="1.0">
+ <!-- BASEDIR_RU can be replaced with CMAKE_CURRENT_SOURCE_DIR
+ once we completely drop the autotools build system -->
+ <base>@BASEDIR_RU@</base>
<font-base>@extended_fontdir@</font-base>
- <!-- Source resolution in dpi (dots/pixels per inch) for determining the size of pixels in SVG and bitmap images, default: 72dpi -->
- <source-resolution>72</source-resolution>
- <!-- Target resolution in dpi (dots/pixels per inch) for specifying the target resolution for generated bitmaps, default: 72dpi -->
- <target-resolution>72</target-resolution>
-
- <!-- page-height and page-width, A4 for Russian -->
- <default-page-settings height="297mm" width="210mm"/>
<!-- Information for specific renderers -->
<!-- Uses renderer mime type for renderers -->
@@ -55,4 +51,4 @@
</renderer>
</renderers>
-</fop>
\ No newline at end of file
+</fop>
diff --git a/help/C/CMakeLists.txt b/help/C/CMakeLists.txt
index 5272cbf..054ddce 100644
--- a/help/C/CMakeLists.txt
+++ b/help/C/CMakeLists.txt
@@ -20,3 +20,6 @@ set (entities
add_xml_target(${docname} ${lang} "${entities}" ${figdir})
add_html_target(${docname} ${lang} "${entities}" ${figdir})
+if (PDF)
+ add_pdf_target(${docname} ${lang} "${entities}" ${figdir})
+endif()
diff --git a/help/CMakeLists.txt b/help/CMakeLists.txt
index 0f79c27..f269593 100644
--- a/help/CMakeLists.txt
+++ b/help/CMakeLists.txt
@@ -1,5 +1,21 @@
set (docname "gnucash-help")
+add_custom_target(${docname}-html)
+add_dependencies(html ${docname}-html)
+
+add_custom_target(${docname}-check)
+add_dependencies(check ${docname}-check)
+
+add_custom_target(${docname}-xml
+ DEPENDS ${docname}-check
+)
+add_dependencies(xml ${docname}-xml)
+
+if (PDF)
+ add_custom_target(${docname}-pdf)
+ add_dependencies(pdf ${docname}-pdf)
+endif()
+
add_subdirectory(C)
add_subdirectory(de)
add_subdirectory(it)
diff --git a/help/de/CMakeLists.txt b/help/de/CMakeLists.txt
index 647a95e..29f340e 100644
--- a/help/de/CMakeLists.txt
+++ b/help/de/CMakeLists.txt
@@ -12,3 +12,6 @@ set (entities
add_xml_target(${docname} ${lang} "${entities}" ${figdir})
add_html_target(${docname} ${lang} "${entities}" ${figdir})
+if (PDF)
+ add_pdf_target(${docname} ${lang} "${entities}" ${figdir})
+endif()
diff --git a/help/it/CMakeLists.txt b/help/it/CMakeLists.txt
index d446608..4112132 100644
--- a/help/it/CMakeLists.txt
+++ b/help/it/CMakeLists.txt
@@ -25,3 +25,9 @@ set (COMPONENTS
# if test "${srcdir}" != "${builddir}"; then mv $@ ${srcdir}; fi
#EXTRA_DIST += it.po
+
+# add_xml_target(${docname} ${lang} "${entities}" ${figdir})
+# add_html_target(${docname} ${lang} "${entities}" ${figdir})
+# if (PDF)
+# add_pdf_target(${docname} ${lang} "${entities}" ${figdir})
+# endif()
diff --git a/help/pt/CMakeLists.txt b/help/pt/CMakeLists.txt
index 13a4f98..499c9db 100644
--- a/help/pt/CMakeLists.txt
+++ b/help/pt/CMakeLists.txt
@@ -20,3 +20,6 @@ set (entities
add_xml_target(${docname} ${lang} "${entities}" ${figdir})
add_html_target(${docname} ${lang} "${entities}" ${figdir})
+if (PDF)
+ add_pdf_target(${docname} ${lang} "${entities}" ${figdir})
+endif()
commit 25d3eff242968960d9a354db4c1fcd8717115e09
Author: Geert Janssens <geert at kobaltwit.be>
Date: Mon Sep 2 09:49:05 2019 +0200
Drop scrollkeeper/omf related bits from cmake build system
Those were only used by yelp until version 2.23. All distros we care
about have at least yelp 2.28 or 3.x.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3089beb..0c3b6b6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -34,30 +34,6 @@ set(JP_FONTDIR "" CACHE STRING "Directory to search for Japanese fonts")
set(JP_MINCHO "ume-tmo3.ttf" CACHE STRING "Japanese Mincho TrueType font to use")
set(JP_GOTHIC "ume-tmo3.ttf" CACHE STRING "Japanese Gothic TrueType font to use")
-# SCROLLKEEPER_BUILD_REQUIRED=0.3.4
-# AC_SUBST(SCROLLKEEPER_BUILD_REQUIRED)
-#
-# option (WITH_SCROLLKEEPER "Make updates to the scrollkeeper database (default=check)" "check")
-# dnl ====================================
-# dnl = Begin tests for scrollkeeper
-# dnl ====================================
-# SCROLLKEEPER_CONFIG=no
-# AC_ARG_WITH([scrollkeeper],
-# [AC_HELP_STRING([--with-scrollkeeper],
-# [do not make updates to the scrollkeeper database (default=check)])],
-# [], [with_scrollkeeper=check])
-# if test x$with_scrollkeeper != "xno"; then
-# AC_PATH_PROG(SCROLLKEEPER_CONFIG, scrollkeeper-config, no)
-# if (test "x$with_scrollkeeper" = "xyes") && (test x$SCROLLKEEPER_CONFIG = xno); then
-# AC_MSG_ERROR(Couldn't find scrollkeeper-config. Please install the scrollkeeper package: http://scrollkeeper.sourceforge.net or rarian: https://rarian.freedesktop.org and link the rarian executables to their scrollkeeper equivalents.)
-# fi
-# fi
-# AM_CONDITIONAL(ENABLE_SK, test "x$SCROLLKEEPER_CONFIG" = "xyes")
-#
-# dnl ====================================
-# dnl = End tests for scrollkeeper
-# dnl ====================================
-#
# AM_INIT_AUTOMAKE()
#
diff --git a/cmake/xmldocs.cmake b/cmake/xmldocs.cmake
index e156813..6056bbe 100644
--- a/cmake/xmldocs.cmake
+++ b/cmake/xmldocs.cmake
@@ -40,27 +40,6 @@ function (add_xml_target docname lang entities figdir)
# EXTRA_DIST = ${xml_files} ${omffile} ${figures}
endfunction()
-# TODO Omf ?
-# ************** Rules to make and install omf file ******************************
-# If the following file is in a subdir (like help/) you need to add that to the path
-# include $(top_srcdir)/omf.make
-# if ENABLE_SK
-# OMF = omf
-# OMF_DATA_HOOK = install-data-hook-omf
-# UNINSTALL_OMF = uninstall-local-omf
-# else
-# OMF=
-# OMF_DATA_HOOK=
-# UNINSTALL_OMF=
-# endif
-#
-# CLEANFILES += omf_timestamp
-#
-# install-data-hook: ${OMF_DATA_HOOK}
-# uninstall-local: ${UNINSTALL_OMF}
-#
-# all: ${OMF}
-
# ************** Rules to make and install html documentation ********************
function (add_html_target docname lang entities figdir)
diff --git a/guide/C/CMakeLists.txt b/guide/C/CMakeLists.txt
index 4914ab1..68505a1 100644
--- a/guide/C/CMakeLists.txt
+++ b/guide/C/CMakeLists.txt
@@ -1,6 +1,5 @@
set (figdir "figures")
set (lang "C")
-set (omffile "$(docname)-C.omf")
set (entities
fdl-appendix.xml
legal.xml
diff --git a/guide/de/CMakeLists.txt b/guide/de/CMakeLists.txt
index d988eda..5e1db52 100644
--- a/guide/de/CMakeLists.txt
+++ b/guide/de/CMakeLists.txt
@@ -1,6 +1,5 @@
set (figdir "figures")
set (lang "de")
-set (omffile "$(docname)-de.omf")
set (entities
ch_accts.xml
ch_basics.xml
diff --git a/guide/it/CMakeLists.txt b/guide/it/CMakeLists.txt
index bbc7afc..01db001 100644
--- a/guide/it/CMakeLists.txt
+++ b/guide/it/CMakeLists.txt
@@ -1,6 +1,5 @@
set (figdir "figures")
set (lang "it")
-set (omffile "$(docname)-it.omf")
set (COMPONENTS
${top_srcdir}/guide/C/gnucash-guide.xml
diff --git a/guide/ja/CMakeLists.txt b/guide/ja/CMakeLists.txt
index 2902e93..8859705 100644
--- a/guide/ja/CMakeLists.txt
+++ b/guide/ja/CMakeLists.txt
@@ -1,7 +1,6 @@
set (figdir "figures")
set (lang "ja")
set (fopconfig "fop.xconf")
-set (omffile "$(docname)-ja.omf")
set (entities
fdl-appendix.xml
legal.xml
diff --git a/guide/pt/CMakeLists.txt b/guide/pt/CMakeLists.txt
index 18b00c6..6e24829 100644
--- a/guide/pt/CMakeLists.txt
+++ b/guide/pt/CMakeLists.txt
@@ -1,6 +1,5 @@
set (figdir "figures")
set (lang "pt")
-set (omffile "$(docname)-pt.omf")
set (entities
fdl-appendix.xml
legal.xml
diff --git a/guide/ru/CMakeLists.txt b/guide/ru/CMakeLists.txt
index 085f66e..fc054ff 100644
--- a/guide/ru/CMakeLists.txt
+++ b/guide/ru/CMakeLists.txt
@@ -1,7 +1,6 @@
set (figdir "figures")
set (lang "ru")
set (fopconfig "fop.xconf")
-set (omffile "$(docname)-ru.omf")
set (entities
ch_oview.xml
ch_basics.xml
diff --git a/help/C/CMakeLists.txt b/help/C/CMakeLists.txt
index d4266d9..5272cbf 100644
--- a/help/C/CMakeLists.txt
+++ b/help/C/CMakeLists.txt
@@ -1,6 +1,5 @@
set (figdir "figures")
set (lang "C")
-set (omffile "$(docname)-C.omf")
set (entities
Help_ch_Intro.xml
Help_ch_GettingHelp.xml
diff --git a/help/de/CMakeLists.txt b/help/de/CMakeLists.txt
index c12d27c..647a95e 100644
--- a/help/de/CMakeLists.txt
+++ b/help/de/CMakeLists.txt
@@ -1,6 +1,5 @@
set (figdir "figures")
set (lang "de")
-set (omffile "$(docname)-de.omf")
set (entities
Help_ch_Intro.xml
Help_ch_GettingStarted.xml
diff --git a/help/it/CMakeLists.txt b/help/it/CMakeLists.txt
index fc3cfcb..d446608 100644
--- a/help/it/CMakeLists.txt
+++ b/help/it/CMakeLists.txt
@@ -1,6 +1,5 @@
set (figdir "figures")
set (lang "it")
-set (omffile "$(docname)-it.omf")
set (COMPONENTS
${top_srcdir}/help/C/gnucash-help.xml
diff --git a/help/pt/CMakeLists.txt b/help/pt/CMakeLists.txt
index 6be0f91..13a4f98 100644
--- a/help/pt/CMakeLists.txt
+++ b/help/pt/CMakeLists.txt
@@ -1,6 +1,5 @@
set (figdir "figures")
set (lang "pt")
-set (omffile "$(docname)-pt.omf")
set (entities
Help_ch_Intro.xml
Help_ch_GettingHelp.xml
commit 3c2ff3277af861c184937ef66da29289cd83d297
Author: Geert Janssens <geert at kobaltwit.be>
Date: Sat Aug 31 18:14:35 2019 +0200
Provide rules to build xml and html versions of our docs
Note xml doesn't really require a build rule, only an install rule.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9348565..3089beb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -18,6 +18,12 @@ set (PACKAGE_TARNAME ${PACKAGE})
set (PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
set (PACKAGE_URL "https://www.gnucash.org/")
+# Extra cmake macros
+set (CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake;${CMAKE_MODULE_PATH}")
+include (xmldocs)
+include (GNUInstallDirs)
+
+
# ############################################################
# These options are settable from the CMake command line. For example, to disable
# enable mobi, put -D WITH_MOBI=ON on the command line.
@@ -54,22 +60,21 @@ set(JP_GOTHIC "ume-tmo3.ttf" CACHE STRING "Japanese Gothic TrueType font to use"
#
# AM_INIT_AUTOMAKE()
#
-# dnl
-# dnl Check for xsltproc
-# dnl Some distributions package it separately of libxslt
-# dnl
-# AC_PATH_PROG(XSLTPROC, xsltproc)
-# if test -z "$XSLTPROC"; then
-# AC_MSG_ERROR([xsltproc not found, perhaps you should install the xsltproc or libxslt package ?])
-# fi
-# XSLTPROCFLAGS="--path \${top_srcdir}/docbook --xinclude $XSLTPROCFLAGS"
-# AC_SUBST([XSLTPROCFLAGS])
-#
-# dnl Same for xmllint
-# AC_PATH_PROG(XMLLINT, xmllint, [""])
-# if test -z "$XMLLINT"; then
-# AC_MSG_ERROR([xmllint not found, perhaps you should install the xmllint or libxslt package ?])
-# fi
+
+# Check for xsltproc
+# Some distributions package it separately of libxslt
+find_program(XSLTPROC xsltproc)
+if(NOT XSLTPROC)
+ message(SEND_ERROR "Can't find xsltproc, perhaps you should install the xsltproc or libxslt package ?")
+endif(NOT XSLTPROC)
+SET (XSLTPROCFLAGS --path "${CMAKE_SOURCE_DIR}/docbook" --xinclude "$ENV{XSLTPROCFLAGS}")
+
+# Same for xmllint
+find_program(XMLLINT xmllint)
+if(NOT XMLLINT)
+ message(SEND_ERROR "Can't find xmllint, perhaps you should install the xsltproc or libxslt package ?")
+endif(NOT XMLLINT)
+
#
# dnl
# dnl Check for optional fop
@@ -232,6 +237,14 @@ endif()
#
# AC_OUTPUT
+# Add global targets. Their dependencies will be filled in by subsequent command in
+# the respective subdirectories.
+add_custom_target(html)
+add_custom_target(check)
+add_custom_target(xml
+ DEPENDS check
+)
+
add_subdirectory (guide)
add_subdirectory (help)
diff --git a/cmake/xmldocs.cmake b/cmake/xmldocs.cmake
new file mode 100644
index 0000000..e156813
--- /dev/null
+++ b/cmake/xmldocs.cmake
@@ -0,0 +1,129 @@
+#
+# Functions to generate xml (docbook) or html documentation
+#
+# Paremeters:
+# - docname: basename of the main xml file. Will be used to locate
+# this primary xml file and for various output files/directories
+# - lang: language of the current document
+# - entities: list of all xml files this document is composed of
+# - figdir: name of the directory holding the images
+
+# ************** Rules to install xml files for gnome-help ***********************
+function (add_xml_target docname lang entities figdir)
+
+ set(xml_files "${entities}")
+ list(APPEND xml_files "${docname}.xml" "${CMAKE_SOURCE_DIR}/docbook/gnc-docbookx.dtd")
+ file(GLOB figures "${CMAKE_CURRENT_SOURCE_DIR}/${figdir}/*.png")
+
+ install(FILES ${xml_files}
+ DESTINATION "${CMAKE_INSTALL_DATADIR}/gnome/help/${docname}/${lang}"
+ COMPONENT "${lang}-${docname}-xml")
+ install(FILES ${figures}
+ DESTINATION "${CMAKE_INSTALL_DATADIR}/gnome/help/${docname}/${lang}/${figdir}"
+ COMPONENT "${lang}-${docname}-xml")
+
+ add_custom_target("${lang}-${docname}-check"
+ COMMAND ${XMLLINT} --postvalid
+ --xinclude
+ --noout
+ --path ${CMAKE_SOURCE_DIR}/docbook
+ ${CMAKE_CURRENT_SOURCE_DIR}/${docname}.xml
+ DEPENDS ${entities} "${docname}.xml" "${CMAKE_SOURCE_DIR}/docbook/gnc-docbookx.dtd")
+
+ add_dependencies(check "${lang}-${docname}-check")
+
+# TODO Uninstall and dist targets
+# uninstall-hook:
+# rmdir --ignore-fail-on-non-empty "$(DESTDIR)$(gnomehelpfiguresdir)"
+# rmdir --ignore-fail-on-non-empty "$(DESTDIR)$(gnomehelpdir)"
+#
+# EXTRA_DIST = ${xml_files} ${omffile} ${figures}
+endfunction()
+
+# TODO Omf ?
+# ************** Rules to make and install omf file ******************************
+# If the following file is in a subdir (like help/) you need to add that to the path
+# include $(top_srcdir)/omf.make
+# if ENABLE_SK
+# OMF = omf
+# OMF_DATA_HOOK = install-data-hook-omf
+# UNINSTALL_OMF = uninstall-local-omf
+# else
+# OMF=
+# OMF_DATA_HOOK=
+# UNINSTALL_OMF=
+# endif
+#
+# CLEANFILES += omf_timestamp
+#
+# install-data-hook: ${OMF_DATA_HOOK}
+# uninstall-local: ${UNINSTALL_OMF}
+#
+# all: ${OMF}
+
+# ************** Rules to make and install html documentation ********************
+function (add_html_target docname lang entities figdir)
+
+ file(GLOB figures "${CMAKE_CURRENT_SOURCE_DIR}/${figdir}/*.png")
+ set(styledir "${CMAKE_SOURCE_DIR}/stylesheet")
+ file(GLOB styleicons "${CMAKE_SOURCE_DIR}/stylesheet/*.png")
+
+ # TODO clean target
+ #CLEANFILES += $(docname)/*.html
+
+ # Convert xml to html with xsltproc
+ # xsltproc --xinclude -o outputdir/ /usr/share/sgml/docbook/xsl-stylesheets/html/chunk.xsl filename.xml
+ file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${docname}")
+ add_custom_target("${lang}-${docname}-html-files"
+ COMMAND ${XSLTPROC} ${XSLTPROCFLAGS} ${XSLTPROCFLAGS_HTML}
+ -o "${CMAKE_CURRENT_BINARY_DIR}/${docname}/"
+ --param use.id.as.filename "1"
+ --stringparam chunker.output.encoding UTF-8
+ "${CMAKE_SOURCE_DIR}/xsl/general-customization.xsl"
+ "${CMAKE_CURRENT_SOURCE_DIR}/${docname}.xml"
+ DEPENDS ${entities} "${docname}.xml" "${CMAKE_SOURCE_DIR}/docbook/gnc-docbookx.dtd")
+
+ # Copy figures for this document
+ file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${docname}/${figdir}")
+ add_custom_target("${lang}-${docname}-html-figures"
+ COMMAND ${CMAKE_COMMAND} -E copy ${figures} "${CMAKE_CURRENT_BINARY_DIR}/${docname}/${figdir}"
+ DEPENDS ${figures})
+
+ # Copy style icons for this document (warning, info,...)
+ file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${docname}/stylesheet")
+ add_custom_target("${lang}-${docname}-html-style"
+ COMMAND ${CMAKE_COMMAND} -E copy ${styleicons} "${CMAKE_CURRENT_BINARY_DIR}/${docname}/stylesheet"
+ DEPENDS ${styleicons})
+
+ add_custom_target("${lang}-${docname}-html"
+ DEPENDS "${lang}-${docname}-html-files" "${lang}-${docname}-html-figures" "${lang}-${docname}-html-style")
+
+ add_dependencies(html "${lang}-${docname}-html")
+
+ install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${docname}
+ DESTINATION "${CMAKE_INSTALL_DOCDIR}/${PACKAGE_NAME}/${lang}"
+ COMPONENT "${lang}-${docname}-html")
+
+ # TODO uninstall target
+# uninstall-html:
+# -if test "$(docname)"; then \
+# if test "$(figdir)"; then \
+# for file in $(docname)/$(figdir)/*.png; do \
+# basefile=`basename $$file`; \
+# rm -f "$(DESTDIR)$(otherdocdir)/$(docname)/$(figdir)/$$basefile"; \
+# done; \
+# rmdir --ignore-fail-on-non-empty "$(DESTDIR)$(otherdocdir)/$(docname)/$(figdir)"; \
+# fi; \
+# for file in $(styledir)/*.png; do \
+# basefile=`basename $$file`; \
+# rm -f "$(DESTDIR)$(otherdocdir)/$(docname)/stylesheet/$$basefile"; \
+# done; \
+# rmdir --ignore-fail-on-non-empty "$(DESTDIR)$(otherdocdir)/$(docname)/stylesheet"; \
+# for file in $(docname)/*.html; do \
+# basefile=`basename $$file`; \
+# rm -f "$(DESTDIR)$(otherdocdir)/$(docname)/$$basefile"; \
+# done; \
+# rmdir --ignore-fail-on-non-empty "$(DESTDIR)$(otherdocdir)/$(docname)"; \
+# rmdir --ignore-fail-on-non-empty "$(DESTDIR)$(otherdocdir)"; \
+# fi
+endfunction()
diff --git a/guide/C/CMakeLists.txt b/guide/C/CMakeLists.txt
index 366d688..4914ab1 100644
--- a/guide/C/CMakeLists.txt
+++ b/guide/C/CMakeLists.txt
@@ -29,3 +29,6 @@ set (entities
appendixb.xml
appendixc.xml
appendixd.xml)
+
+add_xml_target(${docname} ${lang} "${entities}" ${figdir})
+add_html_target(${docname} ${lang} "${entities}" ${figdir})
diff --git a/guide/de/CMakeLists.txt b/guide/de/CMakeLists.txt
index 45f060f..d988eda 100644
--- a/guide/de/CMakeLists.txt
+++ b/guide/de/CMakeLists.txt
@@ -30,3 +30,6 @@ set (entities
appendixe.xml
fdl-appendix.xml
glossary.xml)
+
+add_xml_target(${docname} ${lang} "${entities}" ${figdir})
+add_html_target(${docname} ${lang} "${entities}" ${figdir})
diff --git a/guide/ja/CMakeLists.txt b/guide/ja/CMakeLists.txt
index 09a314d..2902e93 100644
--- a/guide/ja/CMakeLists.txt
+++ b/guide/ja/CMakeLists.txt
@@ -26,3 +26,6 @@ set (entities
appendixb.xml
appendixc.xml
appendixd.xml)
+
+add_xml_target(${docname} ${lang} "${entities}" ${figdir})
+add_html_target(${docname} ${lang} "${entities}" ${figdir})
diff --git a/guide/pt/CMakeLists.txt b/guide/pt/CMakeLists.txt
index b9f4f68..18b00c6 100644
--- a/guide/pt/CMakeLists.txt
+++ b/guide/pt/CMakeLists.txt
@@ -28,3 +28,6 @@ set (entities
appendixb.xml
appendixc.xml
appendixd.xml)
+
+add_xml_target(${docname} ${lang} "${entities}" ${figdir})
+add_html_target(${docname} ${lang} "${entities}" ${figdir})
diff --git a/guide/ru/CMakeLists.txt b/guide/ru/CMakeLists.txt
index 0578416..085f66e 100644
--- a/guide/ru/CMakeLists.txt
+++ b/guide/ru/CMakeLists.txt
@@ -28,3 +28,6 @@ set (entities
appendixb.xml
appendixc.xml
appendixd.xml)
+
+add_xml_target(${docname} ${lang} "${entities}" ${figdir})
+add_html_target(${docname} ${lang} "${entities}" ${figdir})
diff --git a/help/C/CMakeLists.txt b/help/C/CMakeLists.txt
index 9d95de6..d4266d9 100644
--- a/help/C/CMakeLists.txt
+++ b/help/C/CMakeLists.txt
@@ -18,3 +18,6 @@ set (entities
Help_txf-categories.xml
Help_fdl-appendix.xml
Help_tips-appendix.xml)
+
+add_xml_target(${docname} ${lang} "${entities}" ${figdir})
+add_html_target(${docname} ${lang} "${entities}" ${figdir})
diff --git a/help/de/CMakeLists.txt b/help/de/CMakeLists.txt
index 5eda823..c12d27c 100644
--- a/help/de/CMakeLists.txt
+++ b/help/de/CMakeLists.txt
@@ -10,3 +10,6 @@ set (entities
Help_chtacctseg.xml
Help_txf-categories.xml
Help_tips-appendix.xml)
+
+add_xml_target(${docname} ${lang} "${entities}" ${figdir})
+add_html_target(${docname} ${lang} "${entities}" ${figdir})
diff --git a/help/pt/CMakeLists.txt b/help/pt/CMakeLists.txt
index 57205e6..6be0f91 100644
--- a/help/pt/CMakeLists.txt
+++ b/help/pt/CMakeLists.txt
@@ -18,3 +18,6 @@ set (entities
Help_txf-categories.xml
Help_fdl-appendix.xml
Help_tips-appendix.xml)
+
+add_xml_target(${docname} ${lang} "${entities}" ${figdir})
+add_html_target(${docname} ${lang} "${entities}" ${figdir})
commit 2a03b4c395da62f136ea2d429968204514d1b3b8
Author: Geert Janssens <geert at kobaltwit.be>
Date: Sat Aug 31 14:34:01 2019 +0200
Setup basic structure for cmake based build system
This initial commit only creates the necessary CMakeLists.txt files
and sets a number of cmake variables in each.
Further commits will gradually add targets and build rules to match
the autotools based build system.
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..9348565
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,237 @@
+# CMakeLists.txt for GnuCash Documenation
+
+cmake_minimum_required (VERSION 3.5)
+
+project (gnucash-docs)
+
+# Version number of gnucash
+set (GNUCASH_MAJOR_VERSION 3)
+set (GNUCASH_MINOR_VERSION 6)
+set (VERSION "${GNUCASH_MAJOR_VERSION}.${GNUCASH_MINOR_VERSION}")
+set (GNUCASH_LATEST_STABLE_SERIES 3.x)
+
+set (PACKAGE gnucash-docs)
+set (PACKAGE_NAME GnuCash Docs)
+set (PACKAGE_VERSION 3.6)
+set (PACKAGE_BUGREPORT "https://bugs.gnucash.org/describecomponents.cgi?product=Documentation")
+set (PACKAGE_TARNAME ${PACKAGE})
+set (PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
+set (PACKAGE_URL "https://www.gnucash.org/")
+
+# ############################################################
+# These options are settable from the CMake command line. For example, to disable
+# enable mobi, put -D WITH_MOBI=ON on the command line.
+
+option (WITH_MOBI "Enable build rules for Mobipocket document format" OFF)
+
+set(JP_FONTDIR "" CACHE STRING "Directory to search for Japanese fonts")
+set(JP_MINCHO "ume-tmo3.ttf" CACHE STRING "Japanese Mincho TrueType font to use")
+set(JP_GOTHIC "ume-tmo3.ttf" CACHE STRING "Japanese Gothic TrueType font to use")
+
+# SCROLLKEEPER_BUILD_REQUIRED=0.3.4
+# AC_SUBST(SCROLLKEEPER_BUILD_REQUIRED)
+#
+# option (WITH_SCROLLKEEPER "Make updates to the scrollkeeper database (default=check)" "check")
+# dnl ====================================
+# dnl = Begin tests for scrollkeeper
+# dnl ====================================
+# SCROLLKEEPER_CONFIG=no
+# AC_ARG_WITH([scrollkeeper],
+# [AC_HELP_STRING([--with-scrollkeeper],
+# [do not make updates to the scrollkeeper database (default=check)])],
+# [], [with_scrollkeeper=check])
+# if test x$with_scrollkeeper != "xno"; then
+# AC_PATH_PROG(SCROLLKEEPER_CONFIG, scrollkeeper-config, no)
+# if (test "x$with_scrollkeeper" = "xyes") && (test x$SCROLLKEEPER_CONFIG = xno); then
+# AC_MSG_ERROR(Couldn't find scrollkeeper-config. Please install the scrollkeeper package: http://scrollkeeper.sourceforge.net or rarian: https://rarian.freedesktop.org and link the rarian executables to their scrollkeeper equivalents.)
+# fi
+# fi
+# AM_CONDITIONAL(ENABLE_SK, test "x$SCROLLKEEPER_CONFIG" = "xyes")
+#
+# dnl ====================================
+# dnl = End tests for scrollkeeper
+# dnl ====================================
+#
+# AM_INIT_AUTOMAKE()
+#
+# dnl
+# dnl Check for xsltproc
+# dnl Some distributions package it separately of libxslt
+# dnl
+# AC_PATH_PROG(XSLTPROC, xsltproc)
+# if test -z "$XSLTPROC"; then
+# AC_MSG_ERROR([xsltproc not found, perhaps you should install the xsltproc or libxslt package ?])
+# fi
+# XSLTPROCFLAGS="--path \${top_srcdir}/docbook --xinclude $XSLTPROCFLAGS"
+# AC_SUBST([XSLTPROCFLAGS])
+#
+# dnl Same for xmllint
+# AC_PATH_PROG(XMLLINT, xmllint, [""])
+# if test -z "$XMLLINT"; then
+# AC_MSG_ERROR([xmllint not found, perhaps you should install the xmllint or libxslt package ?])
+# fi
+#
+# dnl
+# dnl Check for optional fop
+# dnl
+# AC_PATH_PROG(FOP, fop)
+# fop_version=0
+# if test -z "$FOP"; then
+# AC_MSG_WARN([fop not found. You will not be able to generate PDF files.])
+# else
+# fop_version=`$FOP -version | cut -f 3 -d ' ' | cut -c 1`
+# fi
+#
+# dnl
+# dnl Get the absolute path to $srcdir
+# dnl
+# ac_abs_top_srcdir=$(cd -- "$srcdir" && pwd)
+#
+# dnl
+# dnl Set font dirs and font
+# dnl
+# EXTENDED_SANS=opentype/freefont/FreeSans
+# EXTENDED_SERIF=opentype/freefont/FreeSerif
+# EXTENDED_MONO=opentype/freefont/FreeMono
+# extended_fontdir=$ac_abs_top_srcdir/fonts
+# extended_extension=otf
+# AC_SUBST(EXTENDED_SANS)
+# AC_SUBST(EXTENDED_SERIF)
+# AC_SUBST(EXTENDED_MONO)
+# AC_SUBST(extended_fontdir)
+# AC_SUBST(extended_extension)
+#
+# dnl
+# dnl Check Japanese TrueType fonts for PDF
+# dnl
+# AC_ARG_WITH([japanese-fontdir],
+# [AS_HELP_STRING([--with-japanese-fontdir=DIR],
+# [use DIR for Japanese TrueType font directory])],,
+# [with_japanese_fontdir=check])
+# AC_ARG_WITH([japanese-mincho-ttf],
+# [AS_HELP_STRING([--with-japanese-mincho-ttf],
+# [specify Japanese Mincho TrueType font (default is ume-tmo3.ttf)])],,)
+# AC_ARG_WITH([japanese-gothic-ttf],
+# [AS_HELP_STRING([--with-japanese-gothic-ttf],
+# [specify Japanese Gothic TrueType font (default is ume-tmo3.ttf)])],,)
+# JAPANESE_MINCHO_TTF=ume-tmo3.ttf
+# JAPANESE_GOTHIC_TTF=ume-tmo3.ttf
+# japanese_fontdir=$ac_abs_top_srcdir/fonts/truetype
+# JAPANESE_MINCHO_TTF_ABS=$japanese_fontdir/$JAPANESE_MINCHO_TTF
+# JAPANESE_GOTHIC_TTF_ABS=$japanese_fontdir/$JAPANESE_GOTHIC_TTF
+#
+# dnl Japanese fonts search path (Ubuntu, RedHat, openSUSE:local, Fedora)
+# japanese_fontdirs="/usr/share/fonts /usr/local/share/fonts /usr/local/share/fonts"
+#
+# if test "x$with_japanese_fontdir" != "xcheck" && test "x$with_japanese_fontdir" != "xyes" ; then
+# japanese_fontdirs="$with_japanese_fontdir $japanese_fontdir"
+# fi
+#
+# if test "x$with_japanese_mincho_ttf" != "x" ; then
+# AC_CHECK_FILE($with_japanese_mincho_ttf,
+# [JAPANESE_MINCHO_TTF=$with_japanase_mincho_ttf
+# JAPANESE_MINCHO_TTF_ABS=$font
+# font = $with_japanese_mincho_ttf],
+# [for fontdir in $japanese_fontdirs ""; do
+# font=$fontdir/$with_japanese_mincho_ttf
+# AC_CHECK_FILE($font,
+# [JAPANESE_MINCHO_TTF=$font
+# JAPANESE_MINCHO_TTF_ABS=$font
+# japanese_fontdir=$fontdir
+# break],)
+# done])
+# if test -z $font; then
+# AC_MSG_WARN([$with_japanese_mincho_ttf not found, using default mincho font])
+# fi
+# unset font
+# fi
+# if test "x$with_japanese_gothic_ttf" != "x" ; then
+# AC_CHECK_FILE($with_japanese_gothic_ttf,
+# [JAPANESE_GOTHIC_TTF=$with_japanase_gothic_ttf
+# JAPANESE_GOTHIC_TTF_ABS=$font
+# font = $with_japanese_gothic_ttf],
+# [for fontdir in $japanese_fontdirs ""; do
+# font=$fontdir/$with_japanese_gothic_ttf
+# AC_CHECK_FILE($font,
+# [JAPANESE_GOTHIC_TTF=$font
+# JAPANESE_GOTHIC_TTF_ABS=$font
+# japanese_fontdir=$fontdir
+# break],)
+# done])
+# if test -z $font; then
+# AC_MSG_WARN([$with_japanese_gothic_ttf not found, using default gothic font])
+# fi
+# unset font
+# fi
+# AC_SUBST(japanese_fontdir)
+# AC_SUBST(JAPANESE_MINCHO_TTF)
+# AC_SUBST(JAPANESE_MINCHO_TTF_ABS)
+# AC_SUBST(JAPANESE_GOTHIC_TTF)
+# AC_SUBST(JAPANESE_GOTHIC_TTF_ABS)
+#
+# dnl
+# dnl Check for mobi target and optional ebook-convert
+# dnl
+# AC_ARG_WITH([mobi],
+# [AC_HELP_STRING([--with-mobi],
+# [do make Mobipocket target])],,
+# with_mobi=no)
+# AM_CONDITIONAL([WITH_MOBI], [test "x$with_mobi" = "xyes"])
+# if test "x$with_mobi" = "xyes"; then
+# AC_PATH_PROG(EBOOK_CONVERT, ebook-convert, no)
+# if test "x$EBOOK_CONVERT" = "xno"; then
+# AC_MSG_ERROR([Couldn't find ebook-convert. Please install the Calibre package: https://www.calibre-ebook.com/])
+# fi
+# else
+# AC_MSG_NOTICE([Didn't make mobi target. If you need, specify --with-mobi])
+# fi
+
+# Determine paper format depending on locale
+# It's a pretty simple hack: only US or C will be set to letter. All others use A4.
+set (ENV_LANG $ENV{LANG})
+if (ENV_LANG AND ENV_LANG MATCHES ".*_us.*|C") # Replacing ENV_LANG here with if ($ENV{LANG}) won't work.
+ set (XSLTFLAGS_FO "--stringparam paper.type letter")
+else()
+ set (XSLTFLAGS_FO "--stringparam paper.type A4")
+endif()
+
+#
+# ac_cv_gnc_windows="no"
+# case $host_os in
+# mingw*)
+# ac_cv_gnc_windows="yes"
+# AC_PATH_PROG([HHC], hhc.exe, [hhc_not_found], [/c/Program Files (x86)/Html Help Workshop:/c/Program Files/Html Help Workshop])
+# if test ! -x "${HHC}"; then
+# AC_MSG_ERROR([Html Help Workshop Not Found])
+# fi
+# AM_EXTRA_RECURSIVE_TARGETS([chm install-chm])
+# ;;
+# *)
+# ;;
+# esac
+# AM_CONDITIONAL([GNC_WINDOWS], [test x${ac_cv_gnc_windows} = "xyes"])
+# AM_CONDITIONAL([LANG_US], [test x${lang_us} = "xtrue"])
+# AC_CONFIG_FILES([
+# gnucash-docs.spec
+# help/Makefile
+# help/C/Makefile
+# help/de/Makefile
+# help/it/Makefile
+# help/pt/Makefile
+# guide/Makefile
+# guide/C/Makefile
+# guide/de/Makefile
+# guide/it/Makefile
+# guide/ja/Makefile
+# guide/pt/Makefile
+# guide/ru/Makefile
+# Makefile])
+#
+# AC_CONFIG_FILES([guide/ja/fop.xconf])
+# AC_CONFIG_FILES([guide/ru/fop.xconf])
+#
+# AC_OUTPUT
+
+
+add_subdirectory (guide)
+add_subdirectory (help)
diff --git a/guide/C/CMakeLists.txt b/guide/C/CMakeLists.txt
new file mode 100644
index 0000000..366d688
--- /dev/null
+++ b/guide/C/CMakeLists.txt
@@ -0,0 +1,31 @@
+set (figdir "figures")
+set (lang "C")
+set (omffile "$(docname)-C.omf")
+set (entities
+ fdl-appendix.xml
+ legal.xml
+ ch_oview.xml
+ ch_basics.xml
+ ch_accts.xml
+ ch_txns.xml
+ ch_importing.xml
+ ch_configuring.xml
+ ch_cbook.xml
+ ch_cc.xml
+ ch_expenses.xml
+ ch_loans.xml
+ ch_invest.xml
+ ch_reports.xml
+ ch_capgain.xml
+ ch_currency.xml
+ ch_dep.xml
+ ch_bus_features.xml
+ ch_budgets.xml
+ ch_oth_assets.xml
+ ch_python_bindings.xml
+ ch_import_business_data.xml
+ gnc-glossary.xml
+ appendixa.xml
+ appendixb.xml
+ appendixc.xml
+ appendixd.xml)
diff --git a/guide/CMakeLists.txt b/guide/CMakeLists.txt
new file mode 100644
index 0000000..1dee64a
--- /dev/null
+++ b/guide/CMakeLists.txt
@@ -0,0 +1,8 @@
+set (docname "gnucash-guide")
+
+add_subdirectory(C)
+add_subdirectory(de)
+add_subdirectory(it)
+add_subdirectory(ja)
+add_subdirectory(pt)
+add_subdirectory(ru)
diff --git a/guide/de/CMakeLists.txt b/guide/de/CMakeLists.txt
new file mode 100644
index 0000000..45f060f
--- /dev/null
+++ b/guide/de/CMakeLists.txt
@@ -0,0 +1,32 @@
+set (figdir "figures")
+set (lang "de")
+set (omffile "$(docname)-de.omf")
+set (entities
+ ch_accts.xml
+ ch_basics.xml
+ ch_budgets.xml
+ ch_bus_ap.xml
+ ch_bus_ar.xml
+ ch_bus_intro.xml
+ ch_bus_pay.xml
+ ch_bus_setup.xml
+ ch_capgain.xml
+ ch_cbook.xml
+ ch_cc.xml
+ ch_currency.xml
+ ch_dep.xml
+ ch_expenses.xml
+ ch_import_business_data.xml
+ ch_loans.xml
+ ch_invest.xml
+ ch_oth_assets.xml
+ ch_oview.xml
+ ch_python_bindings.xml
+ ch_txns.xml
+ appendixa.xml
+ appendixb.xml
+ appendixc.xml
+ appendixd.xml
+ appendixe.xml
+ fdl-appendix.xml
+ glossary.xml)
diff --git a/guide/it/CMakeLists.txt b/guide/it/CMakeLists.txt
new file mode 100644
index 0000000..bbc7afc
--- /dev/null
+++ b/guide/it/CMakeLists.txt
@@ -0,0 +1,37 @@
+set (figdir "figures")
+set (lang "it")
+set (omffile "$(docname)-it.omf")
+
+set (COMPONENTS
+ ${top_srcdir}/guide/C/gnucash-guide.xml
+ ${top_srcdir}/guide/C/fdl-appendix.xml
+ ${top_srcdir}/guide/C/legal.xml
+ ${top_srcdir}/guide/C/ch_oview.xml
+ ${top_srcdir}/guide/C/ch_basics.xml
+ ${top_srcdir}/guide/C/ch_accts.xml
+ ${top_srcdir}/guide/C/ch_txns.xml
+ ${top_srcdir}/guide/C/ch_cbook.xml
+ ${top_srcdir}/guide/C/ch_cc.xml
+ ${top_srcdir}/guide/C/ch_expenses.xml
+ ${top_srcdir}/guide/C/ch_loans.xml
+ ${top_srcdir}/guide/C/ch_invest.xml
+ ${top_srcdir}/guide/C/ch_reports.xml
+ ${top_srcdir}/guide/C/ch_capgain.xml
+ ${top_srcdir}/guide/C/ch_currency.xml
+ ${top_srcdir}/guide/C/ch_dep.xml
+ ${top_srcdir}/guide/C/ch_bus_features.xml
+ ${top_srcdir}/guide/C/ch_budgets.xml
+ ${top_srcdir}/guide/C/ch_oth_assets.xml
+ ${top_srcdir}/guide/C/ch_python_bindings.xml
+ ${top_srcdir}/guide/C/ch_import_business_data.xml
+ ${top_srcdir}/guide/C/gnc-glossary.xml
+ ${top_srcdir}/guide/C/appendixa.xml
+ ${top_srcdir}/guide/C/appendixb.xml
+ ${top_srcdir}/guide/C/appendixc.xml
+ ${top_srcdir}/guide/C/appendixd.xml)
+
+#gnucash-guide.xml: ${COMPONENTS} ${srcdir}/it.po
+# xml2po -e -p ${srcdir}/it.po -o $@ ${top_srcdir}/guide/C/gnucash-guide.xml
+# if test "${srcdir}" != "${builddir}"; then mv $@ ${srcdir}; fi
+
+#EXTRA_DIST += it.po
diff --git a/guide/ja/CMakeLists.txt b/guide/ja/CMakeLists.txt
new file mode 100644
index 0000000..09a314d
--- /dev/null
+++ b/guide/ja/CMakeLists.txt
@@ -0,0 +1,28 @@
+set (figdir "figures")
+set (lang "ja")
+set (fopconfig "fop.xconf")
+set (omffile "$(docname)-ja.omf")
+set (entities
+ fdl-appendix.xml
+ legal.xml
+ ch_oview.xml
+ ch_basics.xml
+ ch_accts.xml
+ ch_txns.xml
+ ch_cbook.xml
+ ch_cc.xml
+ ch_loans.xml
+ ch_invest.xml
+ ch_capgain.xml
+ ch_currency.xml
+ ch_dep.xml
+ ch_bus_ar.xml
+ ch_bus_ap.xml
+ ch_bus_pay.xml
+ ch_budgets.xml
+ ch_oth_assets.xml
+ ch_python_bindings.xml
+ appendixa.xml
+ appendixb.xml
+ appendixc.xml
+ appendixd.xml)
diff --git a/guide/pt/CMakeLists.txt b/guide/pt/CMakeLists.txt
new file mode 100644
index 0000000..b9f4f68
--- /dev/null
+++ b/guide/pt/CMakeLists.txt
@@ -0,0 +1,30 @@
+set (figdir "figures")
+set (lang "pt")
+set (omffile "$(docname)-pt.omf")
+set (entities
+ fdl-appendix.xml
+ legal.xml
+ ch_oview.xml
+ ch_basics.xml
+ ch_accts.xml
+ ch_txns.xml
+ ch_cbook.xml
+ ch_cc.xml
+ ch_loans.xml
+ ch_invest.xml
+ ch_capgain.xml
+ ch_currency.xml
+ ch_dep.xml
+ ch_bus_intro.xml
+ ch_bus_setup.xml
+ ch_bus_ar.xml
+ ch_bus_ap.xml
+ ch_bus_pay.xml
+ ch_budgets.xml
+ ch_oth_assets.xml
+ ch_python_bindings.xml
+ ch_import_business_data.xml
+ appendixa.xml
+ appendixb.xml
+ appendixc.xml
+ appendixd.xml)
diff --git a/guide/ru/CMakeLists.txt b/guide/ru/CMakeLists.txt
new file mode 100644
index 0000000..0578416
--- /dev/null
+++ b/guide/ru/CMakeLists.txt
@@ -0,0 +1,30 @@
+set (figdir "figures")
+set (lang "ru")
+set (fopconfig "fop.xconf")
+set (omffile "$(docname)-ru.omf")
+set (entities
+ ch_oview.xml
+ ch_basics.xml
+ ch_accts.xml
+ ch_txns.xml
+ ch_cbook.xml
+ ch_cc.xml
+ ch_expenses.xml
+ ch_loans.xml
+ ch_invest.xml
+ ch_reports.xml
+ ch_capgain.xml
+ ch_currency.xml
+ ch_dep.xml
+ ch_bus_features.xml
+ ch_budgets.xml
+ ch_oth_assets.xml
+ ch_python_bindings.xml
+ ch_import_business_data.xml
+ gnc-glossary.xml
+ fdl-appendix.xml
+ legal.xml
+ appendixa.xml
+ appendixb.xml
+ appendixc.xml
+ appendixd.xml)
diff --git a/help/C/CMakeLists.txt b/help/C/CMakeLists.txt
new file mode 100644
index 0000000..9d95de6
--- /dev/null
+++ b/help/C/CMakeLists.txt
@@ -0,0 +1,20 @@
+set (figdir "figures")
+set (lang "C")
+set (omffile "$(docname)-C.omf")
+set (entities
+ Help_ch_Intro.xml
+ Help_ch_GettingHelp.xml
+ Help_ch_GettingStarted.xml
+ Help_ch_GUIMenus.xml
+ Help_ch_Account-Actions.xml
+ Help_ch_Transactions.xml
+ Help_ch_Business.xml
+ Help_ch_Tools_Assistants.xml
+ Help_ch_Reports.xml
+ Help_ch_Customize.xml
+ Help_chtacctseg.xml
+ Help_chartofaccts.xml
+ Help_legal.xml
+ Help_txf-categories.xml
+ Help_fdl-appendix.xml
+ Help_tips-appendix.xml)
diff --git a/help/CMakeLists.txt b/help/CMakeLists.txt
new file mode 100644
index 0000000..0f79c27
--- /dev/null
+++ b/help/CMakeLists.txt
@@ -0,0 +1,6 @@
+set (docname "gnucash-help")
+
+add_subdirectory(C)
+add_subdirectory(de)
+add_subdirectory(it)
+add_subdirectory(pt)
diff --git a/help/de/CMakeLists.txt b/help/de/CMakeLists.txt
new file mode 100644
index 0000000..5eda823
--- /dev/null
+++ b/help/de/CMakeLists.txt
@@ -0,0 +1,12 @@
+set (figdir "figures")
+set (lang "de")
+set (omffile "$(docname)-de.omf")
+set (entities
+ Help_ch_Intro.xml
+ Help_ch_GettingStarted.xml
+ Help_fdl-appendix.xml
+ Help_legal.xml
+ Help_chartofaccts.xml
+ Help_chtacctseg.xml
+ Help_txf-categories.xml
+ Help_tips-appendix.xml)
diff --git a/help/it/CMakeLists.txt b/help/it/CMakeLists.txt
new file mode 100644
index 0000000..fc3cfcb
--- /dev/null
+++ b/help/it/CMakeLists.txt
@@ -0,0 +1,28 @@
+set (figdir "figures")
+set (lang "it")
+set (omffile "$(docname)-it.omf")
+
+set (COMPONENTS
+ ${top_srcdir}/help/C/gnucash-help.xml
+ ${top_srcdir}/help/C/Help_ch_Intro.xml
+ ${top_srcdir}/help/C/Help_ch_GettingHelp.xml
+ ${top_srcdir}/help/C/Help_ch_GettingStarted.xml
+ ${top_srcdir}/help/C/Help_ch_GUIMenus.xml
+ ${top_srcdir}/help/C/Help_ch_Account-Actions.xml
+ ${top_srcdir}/help/C/Help_ch_Transactions.xml
+ ${top_srcdir}/help/C/Help_ch_Business.xml
+ ${top_srcdir}/help/C/Help_ch_Tools_Assistants.xml
+ ${top_srcdir}/help/C/Help_ch_Reports.xml
+ ${top_srcdir}/help/C/Help_ch_Customize.xml
+ ${top_srcdir}/help/C/Help_chtacctseg.xml
+ ${top_srcdir}/help/C/Help_chartofaccts.xml
+ ${top_srcdir}/help/C/Help_legal.xml
+ ${top_srcdir}/help/C/Help_txf-categories.xml
+ ${top_srcdir}/help/C/Help_fdl-appendix.xml
+ ${top_srcdir}/help/C/Help_tips-appendix.xml)
+
+#gnucash-help.xml: ${COMPONENTS} ${srcdir}/it.po
+# xml2po -e -p ${srcdir}/it.po -o $@ ${top_srcdir}/help/C/gnucash-help.xml
+# if test "${srcdir}" != "${builddir}"; then mv $@ ${srcdir}; fi
+
+#EXTRA_DIST += it.po
diff --git a/help/pt/CMakeLists.txt b/help/pt/CMakeLists.txt
new file mode 100644
index 0000000..57205e6
--- /dev/null
+++ b/help/pt/CMakeLists.txt
@@ -0,0 +1,20 @@
+set (figdir "figures")
+set (lang "pt")
+set (omffile "$(docname)-pt.omf")
+set (entities
+ Help_ch_Intro.xml
+ Help_ch_GettingHelp.xml
+ Help_ch_GettingStarted.xml
+ Help_ch_GUIMenus.xml
+ Help_ch_Account-Actions.xml
+ Help_ch_Transactions.xml
+ Help_ch_Business.xml
+ Help_ch_Tools_Assistants.xml
+ Help_ch_Reports.xml
+ Help_ch_Customize.xml
+ Help_chtacctseg.xml
+ Help_chartofaccts.xml
+ Help_legal.xml
+ Help_txf-categories.xml
+ Help_fdl-appendix.xml
+ Help_tips-appendix.xml)
Summary of changes:
CMakeLists.txt | 198 +++++++++++++++++++++++
CMakeNotes.txt | 53 ++++++
Makefile.am | 14 +-
cmake/MakeDist.cmake | 61 +++++++
cmake/MakeDistCheck.cmake | 82 ++++++++++
cmake/dist.cmake | 21 +++
cmake/epub.cmake | 42 +++++
cmake/gnc_doc_targets.cmake | 33 ++++
cmake/pdf.cmake | 39 +++++
cmake/xmldocs.cmake | 108 +++++++++++++
configure.ac | 4 +
fop.xconf.in | 12 ++
guide/C/CMakeLists.txt | 30 ++++
guide/CMakeLists.txt | 37 +++++
guide/Makefile.am | 2 +
guide/de/CMakeLists.txt | 31 ++++
guide/it/CMakeLists.txt | 38 +++++
guide/it/Makefile.am | 2 +-
guide/ja/CMakeLists.txt | 37 +++++
guide/ja/fop.xconf.in | 387 +-------------------------------------------
guide/pt/CMakeLists.txt | 29 ++++
guide/ru/CMakeLists.txt | 39 +++++
guide/ru/fop.xconf.in | 12 +-
help/C/CMakeLists.txt | 19 +++
help/CMakeLists.txt | 35 ++++
help/Makefile.am | 2 +
help/de/CMakeLists.txt | 11 ++
help/it/CMakeLists.txt | 31 ++++
help/it/Makefile.am | 2 +-
help/pt/CMakeLists.txt | 19 +++
help/pt/Makefile.am | 3 +
xmldocs.make | 2 +-
32 files changed, 1037 insertions(+), 398 deletions(-)
create mode 100644 CMakeLists.txt
create mode 100644 CMakeNotes.txt
create mode 100644 cmake/MakeDist.cmake
create mode 100644 cmake/MakeDistCheck.cmake
create mode 100644 cmake/dist.cmake
create mode 100644 cmake/epub.cmake
create mode 100644 cmake/gnc_doc_targets.cmake
create mode 100644 cmake/pdf.cmake
create mode 100644 cmake/xmldocs.cmake
create mode 100644 fop.xconf.in
create mode 100644 guide/C/CMakeLists.txt
create mode 100644 guide/CMakeLists.txt
create mode 100644 guide/de/CMakeLists.txt
create mode 100644 guide/it/CMakeLists.txt
create mode 100644 guide/ja/CMakeLists.txt
create mode 100644 guide/pt/CMakeLists.txt
create mode 100644 guide/ru/CMakeLists.txt
create mode 100644 help/C/CMakeLists.txt
create mode 100644 help/CMakeLists.txt
create mode 100644 help/de/CMakeLists.txt
create mode 100644 help/it/CMakeLists.txt
create mode 100644 help/pt/CMakeLists.txt
More information about the gnucash-changes
mailing list