summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2020-05-31 20:18:46 +0200
committerSlávek Banko <slavek.banko@axis.cz>2020-06-07 14:44:55 +0200
commitfc6faad222c61a586710387ebe673c49feb7b39c (patch)
treefba3a7a21875866dec4ad39eb7d40fd6856f4705
parentd428cb79108e112a915c594263523e2c708e4a5d (diff)
downloadabakus-fc6faad222c61a586710387ebe673c49feb7b39c.tar.gz
abakus-fc6faad222c61a586710387ebe673c49feb7b39c.zip
Use common cmake rules for documentation.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit 4057927e594b2a6d2e851d9a3f2cae2ef04a6a73)
-rw-r--r--doc/CMakeLists.txt33
-rw-r--r--doc/en/CMakeLists.txt12
-rw-r--r--doc/en/SConscript12
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)