From b54b8f5b25403cf3b9623804b2491ec78a8b913e Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Tue, 21 May 2024 01:29:20 +0200 Subject: build: replace autotools with cmake this patch removes all the autoconf/automake/libtool build infrastructure and replaces it with cmake. notable default behavior changes: - man pages are not pre-built, and are not built by default, must be enabled with `-DBUILD_MANPAGES=ON`. removed features: - srpm packaging, to be reintroduced at some point. - deb packaging, now handled externally via rafaelmartins/deb.rgm.io more stuff must be missing, please report bugs! --- man/CMakeLists.txt | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 man/CMakeLists.txt (limited to 'man') diff --git a/man/CMakeLists.txt b/man/CMakeLists.txt new file mode 100644 index 0000000..e5666cd --- /dev/null +++ b/man/CMakeLists.txt @@ -0,0 +1,69 @@ +# SPDX-FileCopyrightText: 2024 Rafael G. Martins +# SPDX-License-Identifier: BSD-3-Clause + +option(BUILD_MANPAGES "Build manpages." OFF) +if(BUILD_MANPAGES) + find_program(RONN ronn REQUIRED) + + set(man1 + blogc.1 + blogc-git-receiver.1 + blogc-make.1 + blogc-runserver.1 + ) + + set(man5 + blogcfile.5 + ) + + set(man7 + blogc-pagination.7 + blogc-source.7 + blogc-template.7 + blogc-toctree.7 + ) + + set(manpages + ${man1} + ${man5} + ${man7} + ) + + foreach(man ${manpages}) + add_custom_command( + OUTPUT ${man} + COMMAND + ${RONN} + --roff + --organization "Rafael G. Martins" + --manual "blogc Manual" + --output-dir ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/${man}.ronn + DEPENDS ${man}.ronn + ) + + add_custom_target(man-${man} + ALL + DEPENDS ${man} + ) + endforeach() + + foreach(man ${man1}) + install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/${man} + DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 + ) + endforeach() + foreach(man ${man5}) + install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/${man} + DESTINATION ${CMAKE_INSTALL_MANDIR}/man5 + ) + endforeach() + foreach(man ${man7}) + install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/${man} + DESTINATION ${CMAKE_INSTALL_MANDIR}/man7 + ) + endforeach() +endif() -- cgit v1.2.3-18-g5258