mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-14 08:01:49 -05:00
Made latest man page generation enhancements Mac friendly.
Non-Debug build on *nix platforms now require a2x, it is optional for other build configurations. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@4050 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
0e6ca32fe2
commit
d69644e628
@ -375,6 +375,7 @@ if (APPLE)
|
|||||||
set (WSJT_QT_CONF_DESTINATION ${CMAKE_PROJECT_NAME}.app/Contents/Resources)
|
set (WSJT_QT_CONF_DESTINATION ${CMAKE_PROJECT_NAME}.app/Contents/Resources)
|
||||||
set (WSJT_SHARE_DESTINATION ${CMAKE_PROJECT_NAME}.app/Contents/Resources)
|
set (WSJT_SHARE_DESTINATION ${CMAKE_PROJECT_NAME}.app/Contents/Resources)
|
||||||
set (WSJT_DOC_DESTINATION ${CMAKE_PROJECT_NAME}.app/Contents/Resources)
|
set (WSJT_DOC_DESTINATION ${CMAKE_PROJECT_NAME}.app/Contents/Resources)
|
||||||
|
set (WSJT_MANPAGE_DESTINATION ${CMAKE_PROJECT_NAME}.app/Contents/Resources)
|
||||||
set (WSJT_BIN_DESTINATION ${CMAKE_PROJECT_NAME}.app/Contents/MacOS)
|
set (WSJT_BIN_DESTINATION ${CMAKE_PROJECT_NAME}.app/Contents/MacOS)
|
||||||
endif (APPLE)
|
endif (APPLE)
|
||||||
|
|
||||||
@ -623,7 +624,9 @@ qt5_use_modules (wsjtx Widgets OpenGL Network Multimedia)
|
|||||||
|
|
||||||
if (UNIX)
|
if (UNIX)
|
||||||
add_subdirectory (manpages)
|
add_subdirectory (manpages)
|
||||||
add_subdirectory (debian)
|
if (NOT APPLE)
|
||||||
|
add_subdirectory (debian)
|
||||||
|
endif (NOT APPLE)
|
||||||
add_dependencies (wsjtx manpages debian)
|
add_dependencies (wsjtx manpages debian)
|
||||||
endif (UNIX)
|
endif (UNIX)
|
||||||
|
|
||||||
|
2
debian/CMakeLists.txt
vendored
2
debian/CMakeLists.txt
vendored
@ -19,7 +19,7 @@ configure_file (
|
|||||||
@ONLY)
|
@ONLY)
|
||||||
|
|
||||||
add_custom_target (debian
|
add_custom_target (debian
|
||||||
COMMAND ${GZIP_EXECUTABLE} --keep --best --force changelog
|
COMMAND ${GZIP_EXECUTABLE} -9 --force changelog
|
||||||
DEPENDS changelog.in
|
DEPENDS changelog.in
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
COMMENT "Compressing Debian changelog"
|
COMMENT "Compressing Debian changelog"
|
||||||
|
@ -4,16 +4,14 @@ set (ASCIIDOC_MANS
|
|||||||
|
|
||||||
find_program (A2X_EXECUTABLE NAMES a2x a2x.py)
|
find_program (A2X_EXECUTABLE NAMES a2x a2x.py)
|
||||||
if (NOT A2X_EXECUTABLE)
|
if (NOT A2X_EXECUTABLE)
|
||||||
message (SEND_ERROR "Failed to find a2x.")
|
if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||||
|
message (SEND_ERROR "Failed to find a2x which is required for release builds on *nix platforms.")
|
||||||
|
else (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||||
|
message (WARNING "Failed to find a2x skipping manpage generation.")
|
||||||
|
endif (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||||
endif ()
|
endif ()
|
||||||
find_program (GZIP_EXECUTABLE NAMES gzip)
|
find_program (GZIP_EXECUTABLE NAMES gzip)
|
||||||
if (NOT GZIP_EXECUTABLE)
|
|
||||||
message (SEND_ERROR "Failed to find gzip.")
|
|
||||||
endif ()
|
|
||||||
find_program (SED_EXECUTABLE NAMES sed)
|
find_program (SED_EXECUTABLE NAMES sed)
|
||||||
if (NOT SED_EXECUTABLE)
|
|
||||||
message (SEND_ERROR "Failed to find sed.")
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
set (XSLTPROC_OPTS
|
set (XSLTPROC_OPTS
|
||||||
"-param man.endnotes.list.enabled 0 -param man.endnotes.are.numbered 0"
|
"-param man.endnotes.list.enabled 0 -param man.endnotes.are.numbered 0"
|
||||||
@ -26,7 +24,7 @@ set (A2X_OPTS
|
|||||||
)
|
)
|
||||||
|
|
||||||
set (MANPAGES)
|
set (MANPAGES)
|
||||||
if (A2X_EXECUTABLE AND GZIP_EXECUTABLE)
|
if (A2X_EXECUTABLE AND GZIP_EXECUTABLE AND SED_EXECUTABLE)
|
||||||
file (MAKE_DIRECTORY man)
|
file (MAKE_DIRECTORY man)
|
||||||
foreach (f IN LISTS ASCIIDOC_MANS)
|
foreach (f IN LISTS ASCIIDOC_MANS)
|
||||||
get_filename_component (d "${f}" PATH)
|
get_filename_component (d "${f}" PATH)
|
||||||
@ -41,9 +39,9 @@ if (A2X_EXECUTABLE AND GZIP_EXECUTABLE)
|
|||||||
add_custom_command (OUTPUT "${o}.gz"
|
add_custom_command (OUTPUT "${o}.gz"
|
||||||
COMMAND ${CMAKE_COMMAND} ARGS -E make_directory "${d}"
|
COMMAND ${CMAKE_COMMAND} ARGS -E make_directory "${d}"
|
||||||
COMMAND ${A2X_EXECUTABLE} ARGS ${A2X_OPTS} -D "${d}" "${f}"
|
COMMAND ${A2X_EXECUTABLE} ARGS ${A2X_OPTS} -D "${d}" "${f}"
|
||||||
COMMAND ${GZIP_EXECUTABLE} ARGS -r --force --best "${o}"
|
COMMAND ${GZIP_EXECUTABLE} ARGS -f9 "${o}"
|
||||||
COMMAND ${SED_EXECUTABLE} ARGS --in-place "s@.so @.so man${section}/@" "${d}/*.${section}"
|
COMMAND ${SED_EXECUTABLE} ARGS -e "'s@.so @&man${section}/@'" -i "''" "${d}/*.${section}"
|
||||||
COMMAND ${GZIP_EXECUTABLE} ARGS -r --force --best "${d}/*.${section}"
|
COMMAND ${GZIP_EXECUTABLE} ARGS -f9 "${d}/*.${section}"
|
||||||
DEPENDS "${f}"
|
DEPENDS "${f}"
|
||||||
COMMENT "Generating ${o}.gz"
|
COMMENT "Generating ${o}.gz"
|
||||||
)
|
)
|
||||||
@ -54,6 +52,6 @@ if (A2X_EXECUTABLE AND GZIP_EXECUTABLE)
|
|||||||
DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/man
|
DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/man
|
||||||
DESTINATION ${WSJT_MANPAGE_DESTINATION}
|
DESTINATION ${WSJT_MANPAGE_DESTINATION}
|
||||||
)
|
)
|
||||||
endif (A2X_EXECUTABLE AND GZIP_EXECUTABLE)
|
endif (A2X_EXECUTABLE AND GZIP_EXECUTABLE AND SED_EXECUTABLE)
|
||||||
|
|
||||||
add_custom_target (manpages DEPENDS ${MANPAGES})
|
add_custom_target (manpages DEPENDS ${MANPAGES})
|
||||||
|
Loading…
Reference in New Issue
Block a user