New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmake: build man pages #9074
cmake: build man pages #9074
Conversation
@cbodley would you mind taking a look? |
endforeach() | ||
|
||
install(FILES ${sphinx_output} ceph_selinux.8 | ||
DESTINATION ${CEPH_MAN_DIR}/man8) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could use more sophisticated way to determine the section instead hard-wiring it to man8. but since we only have *.8 man pages at this moment, let's install all of them into "man8" now.
7024c16
to
4e9b7a8
Compare
ceph-rest-api.8 | ||
ceph-post-file.8 | ||
DESTINATION ${CEPH_MAN_DIR}/man8) | ||
set(manpages_srcs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we list sphinx-build as one of the build dependencies, and i am not sure we will have a "make dist" for cmake (will cpack do this job?), so i put the generated man pages into the build directory instead of in "/man".
also it might be more natural if we have a CMakeLists.txt in into "/doc/man/8", and collect the man pages there. but i am good either way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure we will have a "make dist" for cmake
that's my understanding as well. i don't think we want to involve cpack, either
have a CMakeLists.txt in into "/doc/man/8", and collect the man pages there
i would prefer it this way too. for one, it would mean that the entries in manpages_srcs
would be relative to their CMAKE_CURRENT_SOURCE_DIR, rather than having to add the ${CMAKE_SOURCE_DIR}/doc/man/
prefix. it also solves the install to "man8" piece because each CMakeLists.txt could do its own install(). but i'm fine with putting this off until we need it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo on this line: manpages_srcs -> manpage_srcs
Thanks for taking this on @tchaikov, you're my hero! The install() part looks correct to me, but in testing 'make install' I'm getting the strangest errors:
The resulting directory looks like filesystem corruption:
..but I was able to reproduce when installing to different devices, and @alimaredia reproduced it on his machine as well. Digging further, I added some debugging to print the So it looks like we need to trim that trailing / off of the |
@tchaikov I pushed fixes for the issues I mentioned, feel free to cherry-pick them from https://github.com/cbodley/ceph/commits/wip-cmake-manpages |
4e9b7a8
to
6e62bed
Compare
Signed-off-by: Kefu Chai <kchai@redhat.com>
6e62bed
to
ef6b523
Compare
Signed-off-by: Kefu Chai <kchai@redhat.com>
@cbodley and @alimaredia thanks for testing this PR! i merged your changes and restructured the CMakeLists.txt so we don't need to hardcode the "/doc/man" path. |
rbdmap.8 | ||
rbd.8 | ||
DESTINATION ${CEPH_MAN_DIR}/man8) | ||
if(WITH_SELINUX) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WITH_SELINUX
is not supported yet in cmake, will leave it for another PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added in #9133
the new stuff in doc/ looks good. retested and everything seemed to work 👍 |
Signed-off-by: Kefu Chai kchai@redhat.com