diff --git a/docs/CODE_QUALITY.md b/docs/CODE_QUALITY.md index a59912a6761..0933a0e4953 100644 --- a/docs/CODE_QUALITY.md +++ b/docs/CODE_QUALITY.md @@ -41,10 +41,10 @@ available functionality: symbols of `libsystemd.so` and `libudev.so` with the list of man pages. Symbols lacking documentation are highlighted. -7. Use `meson compile -C build hwdb-update` to automatically download and import the +7. Use `meson compile -C build update-hwdb` 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/docs/RELEASE.md b/docs/RELEASE.md index 59144641070..31a06515a11 100644 --- a/docs/RELEASE.md +++ b/docs/RELEASE.md @@ -10,7 +10,7 @@ layout: default 2. Update the contributors list in NEWS (`meson compile -C build git-contrib`) 3. Update the time and place in NEWS 4. [RC1] Update version and library numbers in `meson.build` -5. Check dbus docs with `meson compile -C build man/update-dbus-docs` +5. Check dbus docs with `meson compile -C build update-dbus-docs` 6. Tag the release: `version=vXXX-rcY && git tag -s "${version}" -m "systemd ${version}"` 7. Do `meson compile -C build` 8. Make sure that the version string and package string match: `build/systemctl --version` diff --git a/hwdb.d/meson.build b/hwdb.d/meson.build index 6a3456263a8..54c6f4d5e2d 100644 --- a/hwdb.d/meson.build +++ b/hwdb.d/meson.build @@ -66,9 +66,9 @@ endif ############################################################ run_target( - 'hwdb-update', - command : [hwdb_update_sh, meson.current_source_dir()]) + 'update-hwdb', + command : [update_hwdb_sh, meson.current_source_dir()]) run_target( - 'autosuspend-update', - command : [autosuspend_update_sh, project_source_root]) + 'update-hwdb-autosuspend', + command : [update_hwdb_autosuspend_sh, project_source_root]) 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 88e06b384a0..3cae8446cda 100644 --- a/man/meson.build +++ b/man/meson.build @@ -198,36 +198,6 @@ run_target( ############################################################ -if dbus_docs.length() > 0 - custom_target( - 'update-dbus-docs', - output : 'update-dbus-docs', - command : [update_dbus_docs_py, - '--build-dir=@0@'.format(project_build_root), - '@INPUT@'], - input : dbus_docs) - - if conf.get('BUILD_MODE') == 'BUILD_MODE_DEVELOPER' - test('dbus-docs-fresh', - update_dbus_docs_py, - args : ['--build-dir=@0@'.format(project_build_root), - '--test'] + dbus_docs) - 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@/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 6d18355b0c6..60d8dc7abc4 100644 --- a/meson.build +++ b/meson.build @@ -1589,8 +1589,8 @@ conf.set10('ENABLE_EFI', have) ############################################################ -autosuspend_update_sh = find_program('tools/autosuspend-update.sh') -hwdb_update_sh = find_program('tools/hwdb-update.sh') +update_hwdb_sh = find_program('tools/update-hwdb.sh') +update_hwdb_autosuspend_sh = find_program('tools/update-hwdb-autosuspend.sh') make_autosuspend_rules_py = find_program('tools/make-autosuspend-rules.py') make_directive_index_py = find_program('tools/make-directive-index.py') make_man_index_py = find_program('tools/make-man-index.py') @@ -3605,6 +3605,34 @@ run_target( depends : [man, libsystemd, libudev], command : [check_api_docs_sh, libsystemd.full_path(), libudev.full_path()]) +############################################################ + +if dbus_docs.length() > 0 + custom_target( + 'update-dbus-docs', + output : 'update-dbus-docs', + command : [update_dbus_docs_py, + '--build-dir=@0@'.format(project_build_root), + '@INPUT@'], + input : dbus_docs) + + if conf.get('BUILD_MODE') == 'BUILD_MODE_DEVELOPER' + test('dbus-docs-fresh', + update_dbus_docs_py, + args : ['--build-dir=@0@'.format(project_build_root), + '--test'] + dbus_docs) + 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-dbus-docs.py b/tools/update-dbus-docs.py index 8fea0b8a007..ebe67af836f 100755 --- a/tools/update-dbus-docs.py +++ b/tools/update-dbus-docs.py @@ -322,4 +322,4 @@ if __name__ == '__main__': if opts.test and outdated: exit(f'Outdated pages: {", ".join(outdated)}\n' - f'Hint: ninja -C {opts.build_dir} man/update-dbus-docs') + f'Hint: ninja -C {opts.build_dir} update-dbus-docs') diff --git a/tools/autosuspend-update.sh b/tools/update-hwdb-autosuspend.sh similarity index 100% rename from tools/autosuspend-update.sh rename to tools/update-hwdb-autosuspend.sh diff --git a/tools/hwdb-update.sh b/tools/update-hwdb.sh similarity index 100% rename from tools/hwdb-update.sh rename to tools/update-hwdb.sh 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 = '''\