Systemd/man/man.in
Zbigniew Jędrzejewski-Szmek e9bbff18e1 meson: add build/man/man and build/man/html to build and display pages
Man page generation is generally very slow. I prefer to use -Dman=false when
developing systemd, and only build specific pages when introducing changes.
Those two little helper tools make it easy:

$ build/man/man systemd.link
$ build/man/html systemd.link

will show systemd.link.8 and systemd.link.html from the build directory build/.
2019-05-09 18:17:28 +02:00

16 lines
339 B
Bash
Executable file

#!/bin/sh
set -e
if [ -z "$1" ]; then
echo "Use: $0 page-name (with no section suffix)"
exit 1
fi
target=$(ninja -C "@BUILD_ROOT@" -t query man/man | grep -E -m1 "man/$1\.[0-9]$" | awk '{print $2}')
if [ -z "$target" ]; then
echo "Cannot find page $1"
exit 1
fi
ninja -C "@BUILD_ROOT@" "$target"
exec man build/"$target"