diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2020-05-31 20:18:46 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2020-05-31 20:18:46 +0200 |
commit | 4057927e594b2a6d2e851d9a3f2cae2ef04a6a73 (patch) | |
tree | b8865bb270bcd801222a93435e0fb18aeadf6ebb /doc | |
parent | 568928e9f0fc4ee544133e52a5881d6307d78529 (diff) | |
download | abakus-4057927e594b2a6d2e851d9a3f2cae2ef04a6a73.tar.gz abakus-4057927e594b2a6d2e851d9a3f2cae2ef04a6a73.zip |
Use common cmake rules for documentation.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/CMakeLists.txt | 33 | ||||
-rw-r--r-- | doc/en/CMakeLists.txt | 12 | ||||
-rw-r--r-- | doc/en/SConscript | 12 |
3 files changed, 25 insertions, 32 deletions
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index cd4611d..2fbde7f 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -1,13 +1,30 @@ file( GLOB _dirs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} * ) string( REGEX REPLACE "[ \r\n\t]+" ";" _linguas "$ENV{LINGUAS}" ) -foreach( _dir ${_dirs} ) - if( IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${_dir} AND - EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_dir}/CMakeLists.txt ) - if( "${_dir}" STREQUAL "en" OR - "${_linguas}" MATCHES "^;*$" OR - ";${_linguas};" MATCHES ";${_dir};" ) - add_subdirectory( ${_dir} ) - endif( ) +foreach( _dir IN LISTS _dirs ) + if( IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${_dir} + AND NOT "${_dir}" STREQUAL "man" + AND ( "${_dir}" STREQUAL "en" OR + "${_linguas}" MATCHES "^;*$" OR + ";${_linguas};" MATCHES ";${_dir};" )) + file( GLOB _doc_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/${_dir} ${_dir}/*.docbook ) + if( _doc_files ) + list( FIND _doc_files "index.docbook" _find_index ) + if( -1 EQUAL _find_index ) + set( _noindex "NOINDEX" ) + else() + unset( _noindex ) + endif() + tde_create_handbook( + SOURCE_BASEDIR ${_dir} + ${_noindex} + LANG ${_dir} + DESTINATION ${PROJECT_NAME} + ) + endif() endif() endforeach() + +if( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/man/CMakeLists.txt ) + add_subdirectory( man ) +endif() diff --git a/doc/en/CMakeLists.txt b/doc/en/CMakeLists.txt deleted file mode 100644 index 68a3d33..0000000 --- a/doc/en/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -################################################# -# -# (C) 2011 Timothy Pearson -# kb9vqf (AT) pearsoncomputing.net -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -tde_create_handbook( LANG en DESTINATION abakus ) diff --git a/doc/en/SConscript b/doc/en/SConscript deleted file mode 100644 index ef81fcd..0000000 --- a/doc/en/SConscript +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/python - -Import('env') - -import glob - -sources = glob.glob("*.png") - -destination = 'abakus' -for lang in ['en']: - for pic in sources: - env.KDEinstall('KDEDOC', "%s/%s" % (lang, destination), pic) |