diff options
| author | Allen Winter <winter@kde.org> | 2007-09-26 21:35:47 +0000 | 
|---|---|---|
| committer | Allen Winter <winter@kde.org> | 2007-09-26 21:35:47 +0000 | 
| commit | 4587ff182b62eab5c8c7e4816678b1ed207e7a90 (patch) | |
| tree | 8812d0c4ffbade4680741b4a1e14be66211481f4 | |
| parent | 8a5e72cd3f863ecfe04017d289874193f311cab2 (diff) | |
| download | extra-cmake-modules-4587ff182b62eab5c8c7e4816678b1ed207e7a90.tar.gz extra-cmake-modules-4587ff182b62eab5c8c7e4816678b1ed207e7a90.tar.bz2 | |
Sometimes we name our manpage docbook files as "man-foo.docbook",
but the contents of that same file will say to generate a manpage called foo.1.
(see <refentrytitle> in the docbook).
So, we change the kde4_create_manpage() macro to do a s+/man-+/+ when
creating the output file from the input file, i.e., man-foo.docbook
becomes foo.1.
The safer way would be to parse the docbook file, looking for
the <refentrytitle> value. Then create the output file from that.
Rather not, unless required later.
svn path=/trunk/KDE/kdelibs/; revision=717431
| -rw-r--r-- | modules/KDE4Macros.cmake | 15 | 
1 files changed, 6 insertions, 9 deletions
| diff --git a/modules/KDE4Macros.cmake b/modules/KDE4Macros.cmake index 0ce4961e..b0803423 100644 --- a/modules/KDE4Macros.cmake +++ b/modules/KDE4Macros.cmake @@ -277,11 +277,6 @@ macro (KDE4_CREATE_HANDBOOK _docbook)        add_custom_target(htmlhandbook DEPENDS ${_htmlDoc})     endif(KDE4_ENABLE_HTMLHANDBOOK) -# kde4_create_handbook(<docbook file> [INSTALL_DESTINATION <dir>] [SUBDIR <subdir>] ) -# e.g. kde4_create_handbook(index.docbook) -#      kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en ) -#      kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kinfocenter/dma) -     set(_args ${ARGN})     set(_installDest) @@ -320,6 +315,8 @@ macro (KDE4_CREATE_MANPAGE _docbook _section)     get_filename_component(_base ${_input} NAME_WE)     set(_doc ${CMAKE_CURRENT_BINARY_DIR}/${_base}.${_section}) +   # sometimes we have "man-" prepended +   string(REGEX REPLACE "/man-" "/" _outdoc ${_doc})     #Bootstrap     if (_kdeBootStrapping) @@ -330,11 +327,11 @@ macro (KDE4_CREATE_MANPAGE _docbook _section)        set(_bootstrapOption)     endif (_kdeBootStrapping) -   add_custom_command(OUTPUT ${_doc} -      COMMAND ${KDE4_MEINPROC_EXECUTABLE} --stylesheet ${_ssheet} --check ${_bootstrapOption} -o ${_doc} ${_input} +   add_custom_command(OUTPUT ${_outdoc} +      COMMAND ${KDE4_MEINPROC_EXECUTABLE} --stylesheet ${_ssheet} --check ${_bootstrapOption} ${_input}        DEPENDS ${_input} ${_KDE4_MEINPROC_EXECUTABLE_DEP} ${_ssheet}     ) -   add_custom_target(manpage ALL DEPENDS ${_doc}) +   add_custom_target(manpage ALL DEPENDS ${_outdoc})     set(_args ${ARGN}) @@ -357,7 +354,7 @@ macro (KDE4_CREATE_MANPAGE _docbook _section)     endif(_args)     if(_installDest) -      install(FILES ${_doc} DESTINATION ${_installDest}/man${_section}) +      install(FILES ${_outdoc} DESTINATION ${_installDest}/man${_section})     endif(_installDest)  endmacro (KDE4_CREATE_MANPAGE) | 
