]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: run a no-op build to generate man rules
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 23 Mar 2020 19:39:23 +0000 (20:39 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 27 Mar 2020 19:12:44 +0000 (20:12 +0100)
When a new page is added using man/update-man-rules, ninja doesn't know
about the new target until a build is initiated, so build/man/man and
build/man/html would fail. Force a trivial build to regenerate the rules
before calling 'ninja -t'.

man/html.in
man/man.in

index bc9a668c23f0a6dc8a0ca15bca09834ef16db0cf..c09d300d6fc81c64bf5cada4f870133c5dc935e2 100755 (executable)
@@ -6,6 +6,9 @@ if [ -z "$1" ]; then
     exit 1
 fi
 
+# make sure the rules have been regenrated (in case man/update-man-rules was just run)
+ninja -C "@BUILD_ROOT@" version.h
+
 target="man/$1.html"
 ninja -C "@BUILD_ROOT@" "$target"
 set -x
index 75680b860c7a9faca10e543976a6fcaaa1c47766..812c6767fcb06ff57146192de06f5734ebddad64 100755 (executable)
@@ -6,6 +6,9 @@ if [ -z "$1" ]; then
     exit 1
 fi
 
+# make sure the rules have been regenrated (in case man/update-man-rules was just run)
+ninja -C "@BUILD_ROOT@" version.h
+
 page="$(echo "$1" | sed 's/\./\\./')"
 target=$(ninja -C "@BUILD_ROOT@" -t query man/man | grep -E -m1 "man/$page\.[0-9]$" | awk '{print $2}')
 if [ -z "$target" ]; then