|
|
|
@ -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,6 +989,8 @@ macro( tde_create_handbook )
|
|
|
|
|
tde_message_fatal( "no source files" )
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
if( NOT _noindex )
|
|
|
|
|
|
|
|
|
|
# check for index.docbook
|
|
|
|
|
list( FIND _srcs "index.docbook" _find_index )
|
|
|
|
|
if( -1 EQUAL _find_index )
|
|
|
|
@ -998,10 +1009,11 @@ macro( tde_create_handbook )
|
|
|
|
|
|
|
|
|
|
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( )
|
|
|
|
|