Page MenuHomePhabricator

[CMAKE] Move the manpages generation logic to doc/man
ClosedPublic

Authored by Fabien on Sep 17 2020, 14:57.

Details

Reviewers
deadalnix
Group Reviewers
Restricted Project
Commits
rABC14570c242b84: [CMAKE] Move the manpages generation logic to doc/man
Summary

The man pages generation is not part of the installation process, so
move it to doc/man where it belongs.
The install_manpage() interface now takes a list of pages to install, which can be empty.
This allows for adding the pages later by filling the MAN_PAGES target property.

Test Plan
ninja install-manpages

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Fabien requested review of this revision.Sep 17 2020, 14:57
deadalnix requested changes to this revision.Sep 17 2020, 15:31
deadalnix added a subscriber: deadalnix.
deadalnix added inline comments.
cmake/modules/InstallationHelper.cmake
139 ↗(On Diff #23551)

On a side not, this doesn't seems to be necessary now that autotools is depreacted

src/qt/CMakeLists.txt
344 ↗(On Diff #23551)

This was the right API.

This revision now requires changes to proceed.Sep 17 2020, 15:31

Improve the API, it looks like it used to.

The interface now takes any number of man pages, and make them a property of the target.
The benefit is that the same interface can be use to directly list the pages to install or they can be added later by filling the property.
A generator expression ensure that the list of files to install is evaluated at build time from the target property.

deadalnix requested changes to this revision.Sep 18 2020, 23:09
deadalnix added inline comments.
doc/man/CMakeLists.txt
42 ↗(On Diff #23576)

If I add a new executable, it is more likely that I add an entry here or that I miss it completely? Why do executable need to be listed here AND where they are defined? This API does not make sense.

This revision now requires changes to proceed.Sep 18 2020, 23:09

If no man page is set, assume the target has generated man pages and add it to a global property.
The man page generation targets are created after all the CMakeLists.txt have been traversed and will use this property as an entry point.

Yes, now this is good.

This revision is now accepted and ready to land.Sep 21 2020, 14:08