Skip to content

Commit

Permalink
Merge branch 'maint'
Browse files Browse the repository at this point in the history
  • Loading branch information
jralls committed Sep 8, 2019
2 parents c1ae6d7 + 73beb77 commit c52384e
Show file tree
Hide file tree
Showing 31 changed files with 727 additions and 248 deletions.
121 changes: 82 additions & 39 deletions CMakeLists.txt
Expand Up @@ -6,25 +6,27 @@ project (gnucash-docs)

# Version number of gnucash
set (GNUCASH_MAJOR_VERSION 3)
set (GNUCASH_MINOR_VERSION 6)
set (GNUCASH_MINOR_VERSION 7)
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_VERSION 3.7)
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/")

# Extra cmake macros
set (CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake;${CMAKE_MODULE_PATH}")
include (xmldocs)
include (pdf)
include (epub)
include (gnc_doc_targets)
include (dist)
include (AddChmTarget)
include (AddEpubTarget)
include (AddGHelpTarget)
include (AddHtmlTarget)
include (AddPdfTarget)
include (AddGncDocTargets)
include (DistCommon)
include (GNUInstallDirs)

# Clear cache variables that will be filled later during the cmake run
Expand All @@ -33,7 +35,24 @@ unset(dist_files CACHE)
# ############################################################
# These options are settable from the CMake command line. For example,
# to enable mobi, put -D WITH_MOBI=ON on the command line.

# To mimic the autotools' behaviour the targets enabled by default
# are different for Windows vs the other supported platforms.
# On windows only chm is enabled by default
# On any other platform chm and mobi are disabled by default

if(NOT WIN32)
option (WITH_GHELP "Enable build rules for gnome help document format" ON)
option (WITH_HTML "Enable build rules for html document format" ON)
option (WITH_PDF "Enable build rules for pdf document format" ON)
option (WITH_EPUB "Enable build rules for epub document format" ON)
option (WITH_CHM "Enable build rules for chm document format" OFF)
else()
option (WITH_GHELP "Enable build rules for gnome help document format" OFF)
option (WITH_HTML "Enable build rules for html document format" OFF)
option (WITH_PDF "Enable build rules for pdf document format" OFF)
option (WITH_EPUB "Enable build rules for epub document format" OFF)
option (WITH_CHM "Enable build rules for chm document format" ON)
endif()
option (WITH_MOBI "Enable build rules for Mobipocket document format" OFF)

# ############################################################
Expand All @@ -50,6 +69,10 @@ set(JAPANESE_MINCHO_TTF "ume-tmo3.ttf" CACHE STRING "Mincho TrueType font used f
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")

# Buildtime destination directories for our generated documentation
set(DATADIR_BUILD "${CMAKE_BINARY_DIR}/share")
set(DOCDIR_BUILD "${DATADIR_BUILD}/doc/${PACKAGE}")

# ############################################################
# Find the documentation dependencies

Expand All @@ -68,21 +91,22 @@ if(NOT XMLLINT)
endif(NOT XMLLINT)

# 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)

set(MOBI NO)
if(WITH_PDF)
find_program(FOP fop)
if(NOT FOP)
message(WARNING "Can't find fop. You will not be able to generate PDF files.")
set (WITH_PDF OFF)
endif(NOT FOP)
endif()

if(WITH_MOBI)
find_program(EBOOK_CONVERT ebook-convert)
if (EBOOK_CONVERT)
set(MOBI YES)
else()
if (NOT EBOOK_CONVERT)
set(WITH_MOBI OFF)
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()
# Mobi is based on epub so enable epub if mobi is requested
set(WITH_EPUB ON)
else()
message(STATUS "Mobi file format support is disabled. Specify -DWITH_MOBY=ON if you want to enable it.")
endif()
Expand All @@ -97,34 +121,44 @@ endif()
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
# 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"])
# Find the htmlhelp compiler for chm output
if(WITH_CHM)
if(WIN32)
find_program(HHC hhc.exe
PATHS "c:/Program Files (x86)/Html Help Workshop" "c:/Program Files/Html Help Workshop")
if(NOT HHC)
message(SEND_ERROR "Html Help Workshop not found")
endif()
else(WIN32)
find_program(HHC chmcmd)
if(NOT HHC)
set(WITH_CHM OFF)
message(WARNING "Free Pascal's chmcmd not found. Chm related targets will be disabled.")
endif()
endif(WIN32)
endif(WITH_CHM)

# 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)
if (PDF)
if (WITH_HTML)
add_custom_target(html)
endif()
if (WITH_GHELP)
add_custom_target(ghelp)
endif()
if (WITH_PDF)
add_custom_target(pdf)
endif()
add_custom_target(epub)
if (MOBI)
if (WITH_EPUB)
add_custom_target(epub)
endif()
if (WITH_MOBI)
add_custom_target(mobi)
endif()
if (WITH_CHM)
add_custom_target(chm)
endif()


add_subdirectory (guide)
Expand Down Expand Up @@ -196,3 +230,12 @@ add_custom_target(distcheck DEPENDS dist
)

############################# END MAKE DIST #################

# uninstall target
configure_file(
"${CMAKE_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
@ONLY)

add_custom_target(uninstall
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
3 changes: 1 addition & 2 deletions CMakeNotes.txt
Expand Up @@ -8,10 +8,9 @@ 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
- dist and distcheck and uninstall targets are implemented

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

Expand Down
164 changes: 164 additions & 0 deletions ChangeLog
@@ -1,3 +1,167 @@
2019-09-07 Geert Janssens

* CMake - update installation components (HEAD -> maint, origin/maint)

2019-09-07 Geert Janssens

* CMake - revisit image handling

2019-09-07 Geert Janssens

* CMake - revisit xml target

2019-09-07 Geert Janssens

* CMake - refactor targets into custom commands

2019-09-06 Geert Janssens

* CMake - Define options to enable or disable document formats

2019-09-06 Geert Janssens

* CMake - Add uninstall target

2019-09-06 Geert Janssens

* CMake - revisit build and install file locations

2019-09-04 Geert Janssens

* CMake - add chm target for windows documentation

2019-09-04 Geert Janssens

* CMake - Use xslt parameter to set chm file name

2019-09-04 Geert Janssens

* CMake - Rename cmake modules for clarity

2019-09-02 Geert Janssens

* CMake - Make note of missing Windows chm build rules

2019-09-02 Geert Janssens

* CMake - add dist and distcheck targets

2019-09-02 Geert Janssens

* paper format fixup

2019-09-02 Geert Janssens

* CMake - factor out common calls to reduce code duplication

2019-09-02 Geert Janssens

* cmake pdf - determine papersize on source directory instead of environment

2019-09-02 Geert Janssens

* Add epub and mobi support to cmake build system

2019-09-02 Geert Janssens

* Add a note about the cmake build system

2019-09-02 Geert Janssens

* Add pdf targets to CMake build system

2019-09-02 Geert Janssens

* Drop scrollkeeper/omf related bits from cmake build system

2019-08-31 Geert Janssens

* Provide rules to build xml and html versions of our docs

2019-08-31 Geert Janssens

* Setup basic structure for cmake based build system

2019-08-17 Geert Janssens

* Bug 797324 - yelp 3.32.2 does not find entities while listing 'all documents'

2019-08-16 Frank H. Ellenberger

* Apply commit 5f84f78 also on de and ru

2019-08-16 Frank H. Ellenberger

* Remove a totally wrong sentence about expenses

2019-08-16 Frank H. Ellenberger

* 2 "This" for different parts is confusing

2019-08-16 Frank H. Ellenberger

* Minor review of platform compatibility

2019-08-12 Frank H. Ellenberger

* 1 Tippfeher und mehrere "mindestens " FQ-Version

2019-08-11 Frank H. Ellenberger

* A few minor textual improvements of Help:Tips

2019-08-11 Frank H. Ellenberger

* Reformat help tips

2019-08-11 Frank H. Ellenberger

* Add note about fundlibrary's id

2019-08-07 Frank H. Ellenberger

* remove gnome-money.png

2019-08-07 Frank H. Ellenberger

* Define ac_abs_top_srcdir before first use

2019-08-06 John Ralls

* Fix fragile method of getting an absolute path to the soure directory.

2019-08-04 Frank H. Ellenberger

* Reformat Author section

2019-08-04 Frank H. Ellenberger

* Minor improvements on Import Matcher section

2019-08-01 David Cousens

* Improve Transactions:Import matcher -corrections

2019-07-31 David Cousens

* Improve Transactions:Import matcher

2019-07-25 Frank H. Ellenberger

* Merge commit 'da3bd778e8d9662ff834f395867fb9500f48904f' into maint

2019-07-14 Tad

* PR #124: Optimize all PNGs with optipng

2019-07-24 Frank H. Ellenberger

* Fix syntax of a note in previous commit from PR #125

2019-07-16 David Cousens

* Help:Transactions: Modify Matcher and Multiple Selection Docs

2018-12-30 John Ralls

* Release GnuCash Documentation for version 3.4. (tag: 3.4)
Expand Down
18 changes: 11 additions & 7 deletions Makefile.am
Expand Up @@ -12,13 +12,17 @@ EXTRA_DIST = COPYING-DOCS \
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 \
cmake/AddChmTarget.cmake \
cmake/AddEpubTarget.cmake
cmake/AddGHelpTarget.cmake
cmake/AddGncDocTargets.cmake
cmake/AddHtmlTarget.cmake
cmake/AddPdfTarget.cmake
cmake/cmake_uninstall.cmake.in
cmake/DistCommon.cmake
cmake/MakeChm.cmake
cmake/MakeDistCheck.cmake
cmake/MakeDist.cmake
fonts/gothic.xml \
fonts/mincho.xml \
fonts/truetype/ume-tgo4.ttf \
Expand Down

0 comments on commit c52384e

Please sign in to comment.