From 92b3c2dcff3e85ad3d455f6ab845d9a97d3b525b Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Mon, 7 Dec 2020 12:22:15 +0200 Subject: Rewrite meson build scripts into cmakelists --- doc/man/CMakeLists.txt | 9 +++++++++ doc/meson.build | 16 ---------------- 2 files changed, 9 insertions(+), 16 deletions(-) create mode 100644 doc/man/CMakeLists.txt delete mode 100644 doc/meson.build (limited to 'doc') diff --git a/doc/man/CMakeLists.txt b/doc/man/CMakeLists.txt new file mode 100644 index 0000000..309ff7c --- /dev/null +++ b/doc/man/CMakeLists.txt @@ -0,0 +1,9 @@ +set(MANPAGES smolbote.1;smolbote-profile.5;smolboterc.5) + +find_program(SCDOC scdoc) +foreach(F ${MANPAGES}) + add_custom_command(OUTPUT ${F} COMMAND ${SCDOC} < ${CMAKE_CURRENT_SOURCE_DIR}/${F}.scd > ${F} VERBATIM) +endforeach() + +add_custom_target(man DEPENDS ${MANPAGES}) +install(FILES smolbote.1 DESTINATION /usr/local/man) diff --git a/doc/meson.build b/doc/meson.build deleted file mode 100644 index 6490969..0000000 --- a/doc/meson.build +++ /dev/null @@ -1,16 +0,0 @@ -if not get_option('manpage') - subdir_done() -endif - -sh = find_program('sh', required: true, native: true, disabler: true) - -foreach f : [ 'smolbote.1', 'smolboterc.5', 'smolbote-profile.5' ] -manpage = custom_target(f, - input: 'man'/f+'.scd', - output: '@BASENAME@', - capture: true, - command: [ sh, meson.current_source_dir()/'man/genroff.sh', '@INPUT@' ], - install: true, - install_dir: get_option('mandir') -) -endforeach -- cgit v1.2.1