summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/CMakeLists.txt73
-rw-r--r--doc/Makefile.am1
-rw-r--r--doc/en/CMakeLists.txt1
-rw-r--r--doc/en/Makefile.am2
-rw-r--r--doc/tdeioslave/CMakeLists.txt1
-rw-r--r--doc/tdeioslave/Makefile.am1
-rw-r--r--doc/tdeioslave/en/CMakeLists.txt1
-rw-r--r--doc/tdeioslave/en/Makefile.am1
-rw-r--r--doc/tdeioslave/en/msits/CMakeLists.txt1
-rw-r--r--doc/tdeioslave/en/msits/Makefile.am2
10 files changed, 70 insertions, 14 deletions
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index 185eab9..0adf3d2 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -1,3 +1,70 @@
-add_subdirectory( man )
-tde_conditional_add_subdirectory( WITH_TDE en )
-tde_conditional_add_subdirectory( WITH_TDE tdeioslave )
+
+if( WITH_TDE )
+
+string( REGEX REPLACE "[ \r\n\t]+" ";" _linguas "$ENV{LINGUAS}" )
+
+# base documentation
+file( GLOB _dirs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} * )
+list( REMOVE_ITEM _dirs html man tdeioslave )
+
+foreach( _dir IN LISTS _dirs )
+ if( IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${_dir}
+ 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()
+
+
+# tdeioslave documentation
+file( GLOB _dirs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/tdeioslave tdeioslave/*/* )
+
+foreach( _dir IN LISTS _dirs )
+ get_filename_component( _lang ${_dir} PATH )
+ get_filename_component( _protocol ${_dir} NAME )
+ if( IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/tdeioslave/${_dir}
+ AND NOT "${_lang}" STREQUAL "man"
+ AND ( "${_lang}" STREQUAL "en" OR
+ "${_linguas}" MATCHES "^;*$" OR
+ ";${_linguas};" MATCHES ";${_lang};" ))
+ file( GLOB _doc_files
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/tdeioslave/${_dir}
+ tdeioslave/${_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 tdeioslave/${_dir}
+ ${_noindex}
+ LANG ${_lang}
+ DESTINATION tdeioslave/${_protocol}
+ )
+ endif()
+ endif()
+endforeach()
+
+endif( WITH_TDE )
+
+
+if( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/man/CMakeLists.txt )
+ add_subdirectory( man )
+endif()
diff --git a/doc/Makefile.am b/doc/Makefile.am
deleted file mode 100644
index ed8dc31..0000000
--- a/doc/Makefile.am
+++ /dev/null
@@ -1 +0,0 @@
-SUBDIRS = en tdeioslave
diff --git a/doc/en/CMakeLists.txt b/doc/en/CMakeLists.txt
deleted file mode 100644
index ba3ef3e..0000000
--- a/doc/en/CMakeLists.txt
+++ /dev/null
@@ -1 +0,0 @@
-tde_create_handbook( DESTINATION ${PROJECT_NAME} )
diff --git a/doc/en/Makefile.am b/doc/en/Makefile.am
deleted file mode 100644
index 72e7ae5..0000000
--- a/doc/en/Makefile.am
+++ /dev/null
@@ -1,2 +0,0 @@
-KDE_LANG = en
-KDE_DOCS = kchmviewer
diff --git a/doc/tdeioslave/CMakeLists.txt b/doc/tdeioslave/CMakeLists.txt
deleted file mode 100644
index c938175..0000000
--- a/doc/tdeioslave/CMakeLists.txt
+++ /dev/null
@@ -1 +0,0 @@
-add_subdirectory( en )
diff --git a/doc/tdeioslave/Makefile.am b/doc/tdeioslave/Makefile.am
deleted file mode 100644
index 81fee21..0000000
--- a/doc/tdeioslave/Makefile.am
+++ /dev/null
@@ -1 +0,0 @@
-SUBDIRS = en
diff --git a/doc/tdeioslave/en/CMakeLists.txt b/doc/tdeioslave/en/CMakeLists.txt
deleted file mode 100644
index a91f2c1..0000000
--- a/doc/tdeioslave/en/CMakeLists.txt
+++ /dev/null
@@ -1 +0,0 @@
-add_subdirectory( msits )
diff --git a/doc/tdeioslave/en/Makefile.am b/doc/tdeioslave/en/Makefile.am
deleted file mode 100644
index d520be4..0000000
--- a/doc/tdeioslave/en/Makefile.am
+++ /dev/null
@@ -1 +0,0 @@
-SUBDIRS = msits
diff --git a/doc/tdeioslave/en/msits/CMakeLists.txt b/doc/tdeioslave/en/msits/CMakeLists.txt
deleted file mode 100644
index fcbaa9b..0000000
--- a/doc/tdeioslave/en/msits/CMakeLists.txt
+++ /dev/null
@@ -1 +0,0 @@
-tde_create_handbook( DESTINATION tdeioslave/msits )
diff --git a/doc/tdeioslave/en/msits/Makefile.am b/doc/tdeioslave/en/msits/Makefile.am
deleted file mode 100644
index dc2ad98..0000000
--- a/doc/tdeioslave/en/msits/Makefile.am
+++ /dev/null
@@ -1,2 +0,0 @@
-KDE_LANG = en
-KDE_DOCS = tdeioslave/msits