[CMake] Manual page generation
Michael Wild
themiwi at gmail.com
Fri Sep 24 07:04:46 EDT 2010
On 24. Sep, 2010, at 12:36 , Laszlo Papp wrote:
> Hi,
>
> What is wrong about the following CMakeLists.txt file ? I would like
> to generate manual pages, like this project does with autotools:
> http://projects.archlinux.org/pacman.git/tree/doc/Makefile.am
>
> Thank you in advance!
>
> ========================================================================================
>
> set(ASCIIDOC_MANS
> hacky.8
> akabei-create-db.8
> akabei.conf.5
> akabei.3
> )
>
> set(A2X_OPTS
> -no-xmllint
> -d manpage
> -f manpage
> --xsltproc-opts='-param man.endnotes.list.enabled 0 -param
> man.endnotes.are.numbered 0'
> )
>
> foreach(manpage ${ASCIIDOC_MANS})
> add_custom_command(OUTPUT ${manpage}
> COMMAND a2x ${A2X_OPTS}
> --asciidoc-opts="${AKABEI_VERSION_STRING}" ${manpage}.txt
> VERBATIM)
> endforeach(manpage)
>
> # install(FILES akabei.3.gz DESTINATION ${MAN_INSTALL_DIR}/man3/)
> # install(FILES akabei.conf.5.gz DESTINATION ${MAN_INSTALL_DIR}/man5/)
> # install(FILES hacky.8.gz DESTINATION ${MAN_INSTALL_DIR}/man8/)
>
> Best Regards,
> Laszlo Papp
You need a top-level target that depends on the individual manpages:
add_custom_target(man ALL
DEPENDS ${ASCIIDOC_MANS})
HTH
Michael
--
There is always a well-known solution to every human problem -- neat, plausible, and wrong.
H. L. Mencken
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100924/52cbea11/attachment.pgp>
More information about the CMake
mailing list