From: Zbigniew Jędrzejewski-Szmek Date: Wed, 27 Jan 2021 08:10:25 +0000 (+0100) Subject: meson: rename target to update-man-rules X-Git-Tag: v248-rc1~245^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e3c368f63c8ec71ba06e699ff46eb3e0d8e3bb0a;p=thirdparty%2Fsystemd.git meson: rename target to update-man-rules Same justification as for update-dbus-docs. --- diff --git a/docs/CODE_QUALITY.md b/docs/CODE_QUALITY.md index a59912a6761..53fabb3581d 100644 --- a/docs/CODE_QUALITY.md +++ b/docs/CODE_QUALITY.md @@ -44,7 +44,7 @@ available functionality: 7. Use `meson compile -C build hwdb-update` to automatically download and import the PCI, USB and OUI databases into hwdb. -8. Use `meson compile -C build man/update-man-rules` to update the meson rules for +8. Use `meson compile -C build update-man-rules` to update the meson rules for building man pages automatically from the docbook XML files included in `man/`. diff --git a/man/html.in b/man/html.in index c142f581de0..3ae02bd77d3 100755 --- a/man/html.in +++ b/man/html.in @@ -6,7 +6,7 @@ if [ -z "$1" ]; then exit 1 fi -# make sure the rules have been regenerated (in case man/update-man-rules was just run) +# make sure the rules have been regenerated (in case update-man-rules was just run) ninja -C "@BUILD_ROOT@" version.h target="man/$1.html" diff --git a/man/man.in b/man/man.in index 12eb332ee00..40b7476bc5e 100755 --- a/man/man.in +++ b/man/man.in @@ -6,7 +6,7 @@ if [ -z "$1" ]; then exit 1 fi -# make sure the rules have been regenerated (in case man/update-man-rules was just run) +# make sure the rules have been regenerated (in case update-man-rules was just run) ninja -C "@BUILD_ROOT@" version.h page="$(echo "$1" | sed 's/\./\\./')" diff --git a/man/meson.build b/man/meson.build index 327df94c27c..3cae8446cda 100644 --- a/man/meson.build +++ b/man/meson.build @@ -198,17 +198,6 @@ run_target( ############################################################ -custom_target( - 'update-man-rules', - output : 'update-man-rules', - command : ['sh', '-c', - 'cd @0@ && '.format(meson.build_root()) + - 'python3 @0@/tools/update-man-rules.py $(find @0@ -wholename "*/man/*.xml") >t && '.format(project_source_root) + - 'mv t @0@/rules/meson.build'.format(meson.current_source_dir())], - depend_files : custom_entities_ent) - -############################################################ - configure_file( input : 'man.in', output : 'man', diff --git a/man/rules/meson.build b/man/rules/meson.build index 4a23648a215..c13c8efc5c3 100644 --- a/man/rules/meson.build +++ b/man/rules/meson.build @@ -2,7 +2,7 @@ # Do not edit. Generated by update-man-rules.py. # Update with: -# ninja -C build man/update-man-rules +# ninja -C build update-man-rules manpages = [ ['binfmt.d', '5', [], 'ENABLE_BINFMT'], ['bootctl', '1', [], 'ENABLE_EFI'], diff --git a/meson.build b/meson.build index f1de3a87d36..569cac92816 100644 --- a/meson.build +++ b/meson.build @@ -3624,6 +3624,15 @@ if dbus_docs.length() > 0 endif endif +custom_target( + 'update-man-rules', + output : 'update-man-rules', + command : ['sh', '-c', + 'cd @0@ && '.format(meson.build_root()) + + 'python3 @0@/tools/update-man-rules.py $(find @0@ -wholename "*/man/*.xml") >t && '.format(project_source_root) + + 'mv t @0@/man/rules/meson.build'.format(meson.current_source_dir())], + depend_files : custom_entities_ent) + ############################################################ watchdog_opt = service_watchdog == '' ? 'disabled' : service_watchdog diff --git a/tools/update-man-rules.py b/tools/update-man-rules.py index 8221a37d9a9..31ed91c432e 100755 --- a/tools/update-man-rules.py +++ b/tools/update-man-rules.py @@ -51,7 +51,7 @@ MESON_HEADER = '''\ # Do not edit. Generated by update-man-rules.py. # Update with: -# ninja -C build man/update-man-rules +# ninja -C build update-man-rules manpages = [''' MESON_FOOTER = '''\