diff options
author | samelian <samelian@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-18 23:17:24 +0000 |
---|---|---|
committer | samelian <samelian@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-18 23:17:24 +0000 |
commit | e98a3030ae5635c61bf78e30f1c73a5b38dc7a8b (patch) | |
tree | 4fc743370e866dc48adb5e05d4032f47c085a729 /cmake/modules | |
parent | 4ff1736d07f4137436bc4351ce45c30d08219c61 (diff) | |
download | other-e98a3030ae5635c61bf78e30f1c73a5b38dc7a8b.tar.gz other-e98a3030ae5635c61bf78e30f1c73a5b38dc7a8b.zip |
[kde-common/cmake] added NOINDEX directive to tde_create_handbook() macro
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kde-common@1228472 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'cmake/modules')
-rw-r--r-- | cmake/modules/TDEMacros.cmake | 52 |
1 files changed, 32 insertions, 20 deletions
diff --git a/cmake/modules/TDEMacros.cmake b/cmake/modules/TDEMacros.cmake index 54536de..12ccc60 100644 --- a/cmake/modules/TDEMacros.cmake +++ b/cmake/modules/TDEMacros.cmake @@ -894,6 +894,7 @@ macro( tde_create_handbook ) unset( _target ) unset( _dest ) + unset( _noindex ) unset( _srcs ) unset( _extra ) unset( _srcdir ) @@ -904,6 +905,12 @@ macro( tde_create_handbook ) foreach( _arg ${ARGN} ) + # found directive "NOINDEX" + if( "${_arg}" STREQUAL "NOINDEX" ) + set( _noindex 1 ) + set( _directive 1 ) + endif() + # found directive "FILES" if( "${_arg}" STREQUAL "FILES" ) unset( _srcs ) @@ -944,7 +951,7 @@ macro( tde_create_handbook ) unset( _directive ) elseif( _var ) if( _first_arg ) - set( _target "${_arg}-handbook" ) + set( _target "${_arg}" ) else() list( APPEND ${_var} ${_arg} ) endif() @@ -954,14 +961,16 @@ macro( tde_create_handbook ) endforeach() - # if no target specified, try to guess it from DESTIONATION + # if no target specified, try to guess it from DESTINATION if( NOT _target ) if( NOT _dest ) tde_message_fatal( "target name cannot be determined because DESTINATION is not set" ) endif() - string( REPLACE "/" "-" _target "${_dest}-handbook" ) + string( REPLACE "/" "-" _target "${_dest}" ) endif() + set( _target "${_target}-${_lang}-handbook" ) + # if no file specified, include all docbooks, stylesheets and images if( NOT _srcs ) file( GLOB _srcs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.docbook *.css *.png ) @@ -980,28 +989,31 @@ macro( tde_create_handbook ) tde_message_fatal( "no source files" ) endif() - # check for index.docbook - list( FIND _srcs "index.docbook" _find_index ) - if( -1 EQUAL _find_index ) - tde_message_fatal( "missing index.docbook file" ) - endif() + if( NOT _noindex ) - # check for srcdir - if( _srcdir ) - set( _srcdir "--srcdir=${_srcdir}" ) - endif() + # check for index.docbook + list( FIND _srcs "index.docbook" _find_index ) + if( -1 EQUAL _find_index ) + tde_message_fatal( "missing index.docbook file" ) + endif() + + # check for srcdir + if( _srcdir ) + set( _srcdir "--srcdir=${_srcdir}" ) + endif() - add_custom_command( - OUTPUT index.cache.bz2 - COMMAND ${KDE3_MEINPROC_EXECUTABLE} ${_srcdir} --check --cache index.cache.bz2 ${CMAKE_CURRENT_SOURCE_DIR}/index.docbook - DEPENDS ${_srcs} ) + add_custom_command( + OUTPUT index.cache.bz2 + COMMAND ${KDE3_MEINPROC_EXECUTABLE} ${_srcdir} --check --cache index.cache.bz2 ${CMAKE_CURRENT_SOURCE_DIR}/index.docbook + DEPENDS ${_srcs} ) - add_custom_target( ${_target} ALL DEPENDS index.cache.bz2 ) + add_custom_target( ${_target} ALL DEPENDS index.cache.bz2 ) - install( FILES - ${CMAKE_CURRENT_BINARY_DIR}/index.cache.bz2 ${_srcs} ${_extra} - DESTINATION ${_dest} ) + list( APPEND _srcs ${CMAKE_CURRENT_BINARY_DIR}/index.cache.bz2 ) + + endif() + install( FILES ${_srcs} ${_extra} DESTINATION ${_dest} ) tde_install_symlink( ${TDE_HTML_DIR}/${_lang}/common ${_dest} ) endmacro( ) |