diff options
| author | Eduard Braun <eduard.braun2@gmx.de> | 2017-07-20 21:03:00 +0000 |
|---|---|---|
| committer | Eduard Braun <eduard.braun2@gmx.de> | 2017-07-20 21:05:29 +0000 |
| commit | f7b19ac5c3e315281b219ced064065d77a2cf852 (patch) | |
| tree | d7fe331ab510a2ff9aee3fc53fdcde5d30d0960d | |
| parent | CI/GitLab: Speed up build by limiting clone depth (diff) | |
| download | inkscape-f7b19ac5c3e315281b219ced064065d77a2cf852.tar.gz inkscape-f7b19ac5c3e315281b219ced064065d77a2cf852.zip | |
cmake: cleanup man page generation
- move code from main CMakeLists.txt to separate cmake file in /man
- root dir tidying: move fix-roff-punct
| -rw-r--r-- | CMakeLists.txt | 34 | ||||
| -rw-r--r-- | CMakeScripts/Pod2man.cmake | 8 | ||||
| -rw-r--r-- | man/CMakeLists.txt | 23 | ||||
| -rwxr-xr-x | man/fix-roff-punct (renamed from fix-roff-punct) | 0 |
4 files changed, 31 insertions, 34 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 094ebacab..c91713ee9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -187,7 +187,7 @@ add_custom_target(uninstall # ----------------------------------------------------------------------------- -# Subdirs (on only 1 atm), but a lot happens here +# Subdirectories # ----------------------------------------------------------------------------- add_subdirectory(src) @@ -195,36 +195,10 @@ if(ENABLE_NLS) add_subdirectory(po) endif(ENABLE_NLS) -# ----------------------------------------------------------------------------- -# Man pages -# ----------------------------------------------------------------------------- if(NOT WIN32) - include("CMakeScripts/Pod2man.cmake") - - # Load AUTHORS file contents into $INKSCAPE_AUTHORS - file(READ ${CMAKE_CURRENT_SOURCE_DIR}/AUTHORS content) - string(REGEX REPLACE "^([^\n#]+)\n" "\\1;\n" content_list "${content}") - - join(INKSCAPE_AUTHORS "," "${content_list}") - - foreach(podfile - man/inkscape.pod - man/inkscape.de.pod - man/inkscape.el.pod - man/inkscape.fr.pod - man/inkscape.ja.pod - man/inkscape.sk.pod - man/inkscape.zh_TW.pod - man/inkview.pod) - - set(POD_IN ${CMAKE_CURRENT_SOURCE_DIR}/${podfile}.in) - set(POD_OUT ${CMAKE_CURRENT_BINARY_DIR}/${podfile}) - - configure_file(${POD_IN} ${POD_OUT}) - - pod2man(${POD_OUT} ${INKSCAPE_VERSION} 1 "Inkscape Commands Manual") - endforeach() -endif() + include(CMakeScripts/Pod2man.cmake) + add_subdirectory(man) +endif(NOT WIN32) # ----------------------------------------------------------------------------- # Installation diff --git a/CMakeScripts/Pod2man.cmake b/CMakeScripts/Pod2man.cmake index 21010fb33..348319b4a 100644 --- a/CMakeScripts/Pod2man.cmake +++ b/CMakeScripts/Pod2man.cmake @@ -26,13 +26,13 @@ macro(pod2man PODFILE_FULL RELEASE SECTION CENTER) if(POD2MAN) if(LANG) set(MANPAGE_TARGET "man-${NAME}-${LANG}") - set(MANFILE_TEMP "${CMAKE_CURRENT_BINARY_DIR}/man/${NAME}.${LANG}.tmp") - set(MANFILE_FULL "${CMAKE_CURRENT_BINARY_DIR}/man/${NAME}.${LANG}.${SECTION}") + set(MANFILE_TEMP "${CMAKE_CURRENT_BINARY_DIR}/${NAME}.${LANG}.tmp") + set(MANFILE_FULL "${CMAKE_CURRENT_BINARY_DIR}/${NAME}.${LANG}.${SECTION}") set(MANFILE_DEST "${CMAKE_INSTALL_PREFIX}/${SHARE_INSTALL}/man/${LANG}/man${SECTION}") else() set(MANPAGE_TARGET "man-${NAME}") - set(MANFILE_TEMP "${CMAKE_CURRENT_BINARY_DIR}/man/${NAME}.tmp") - set(MANFILE_FULL "${CMAKE_CURRENT_BINARY_DIR}/man/${NAME}.${SECTION}") + set(MANFILE_TEMP "${CMAKE_CURRENT_BINARY_DIR}/${NAME}.tmp") + set(MANFILE_FULL "${CMAKE_CURRENT_BINARY_DIR}/${NAME}.${SECTION}") set(MANFILE_DEST "${CMAKE_INSTALL_PREFIX}/${SHARE_INSTALL}/man/man${SECTION}") endif() add_custom_command( diff --git a/man/CMakeLists.txt b/man/CMakeLists.txt new file mode 100644 index 000000000..8ee1548e4 --- /dev/null +++ b/man/CMakeLists.txt @@ -0,0 +1,23 @@ +# Load AUTHORS file contents into $INKSCAPE_AUTHORS +file(READ ${CMAKE_SOURCE_DIR}/AUTHORS content) +string(REGEX REPLACE "^([^\n#]+)\n" "\\1;\n" content_list "${content}") + +join(INKSCAPE_AUTHORS "," "${content_list}") + +foreach(podfile + inkscape.pod + inkscape.de.pod + inkscape.el.pod + inkscape.fr.pod + inkscape.ja.pod + inkscape.sk.pod + inkscape.zh_TW.pod + inkview.pod) + + set(POD_IN ${CMAKE_CURRENT_SOURCE_DIR}/${podfile}.in) + set(POD_OUT ${CMAKE_CURRENT_BINARY_DIR}/${podfile}) + + configure_file(${POD_IN} ${POD_OUT}) + + pod2man(${POD_OUT} ${INKSCAPE_VERSION} 1 "Inkscape Commands Manual") +endforeach() diff --git a/fix-roff-punct b/man/fix-roff-punct index dc3c96c10..dc3c96c10 100755 --- a/fix-roff-punct +++ b/man/fix-roff-punct |
