reduce number of warning messages when building docs
Warnings were emitted for every info file (twice) instead of once.
This commit is contained in:
parent
2860b68bc2
commit
d9d4876755
1 changed files with 12 additions and 11 deletions
|
|
@ -34,6 +34,14 @@ if (BUILD_DOCS)
|
||||||
find_program(MAN2HTML man2html)
|
find_program(MAN2HTML man2html)
|
||||||
find_program(GROFF groff)
|
find_program(GROFF groff)
|
||||||
set(ledger_info_files ledger3.texi ledger-mode.texi)
|
set(ledger_info_files ledger3.texi ledger-mode.texi)
|
||||||
|
|
||||||
|
if (NOT MAKEINFO)
|
||||||
|
message(WARNING "Could not find makeinfo. Info version of documentation cannot be built.")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (NOT TEXI2PDF OR NOT TEX)
|
||||||
|
message(WARNING "Could not find texi2pdf or tex. PDF version of documentation will not be built.")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
@ -41,9 +49,7 @@ endif()
|
||||||
foreach(file ${ledger_info_files})
|
foreach(file ${ledger_info_files})
|
||||||
get_filename_component(file_base ${file} NAME_WE)
|
get_filename_component(file_base ${file} NAME_WE)
|
||||||
|
|
||||||
if (NOT MAKEINFO)
|
if (MAKEINFO)
|
||||||
message(WARNING "Could not find makeinfo. Info version of documentation cannot be built.")
|
|
||||||
else()
|
|
||||||
add_custom_command(OUTPUT ${file_base}.info
|
add_custom_command(OUTPUT ${file_base}.info
|
||||||
COMMAND makeinfo --force --no-split -o ${file_base}.info ${CMAKE_CURRENT_SOURCE_DIR}/${file}
|
COMMAND makeinfo --force --no-split -o ${file_base}.info ${CMAKE_CURRENT_SOURCE_DIR}/${file}
|
||||||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${file}
|
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${file}
|
||||||
|
|
@ -51,20 +57,15 @@ foreach(file ${ledger_info_files})
|
||||||
list(APPEND ledger_doc_files ${file_base}.info)
|
list(APPEND ledger_doc_files ${file_base}.info)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (BUILD_WEB_DOCS)
|
if (BUILD_WEB_DOCS AND MAKEINFO)
|
||||||
if (NOT MAKEINFO)
|
|
||||||
message(WARNING "Could not find makeinfo. HTML version of documentation cannot be built.")
|
|
||||||
endif()
|
|
||||||
add_custom_command(OUTPUT ${file_base}.html
|
add_custom_command(OUTPUT ${file_base}.html
|
||||||
COMMAND makeinfo --force --html --no-split -o ${file_base}.html ${CMAKE_CURRENT_SOURCE_DIR}/${file}
|
COMMAND makeinfo --force --html --no-split -o ${file_base}.html ${CMAKE_CURRENT_SOURCE_DIR}/${file}
|
||||||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${file}
|
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${file}
|
||||||
VERBATIM)
|
VERBATIM)
|
||||||
list(APPEND ledger_doc_files ${file_base}.html)
|
list(APPEND ledger_doc_files ${file_base}.html)
|
||||||
endif(BUILD_WEB_DOCS)
|
endif()
|
||||||
|
|
||||||
if (NOT TEXI2PDF OR NOT TEX)
|
if (TEXI2PDF AND TEX)
|
||||||
message(WARNING "Could not find texi2pdf or tex. PDF version of documentation will not be built.")
|
|
||||||
else()
|
|
||||||
if (BUILD_A4_PDF)
|
if (BUILD_A4_PDF)
|
||||||
set(papersize --texinfo=@afourpaper)
|
set(papersize --texinfo=@afourpaper)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue