From 0bef46e6d535a423486f14a71c27a53ef639a61a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= Date: Mon, 31 May 2021 14:10:11 +0200 Subject: [PATCH] man: use one Makefile, use OpenZFS for .Os MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The prevailing style is to use either nothing, or the originating organisational umbrella (here: OpenZFS), and these aren't Linux manpages This also deduplicates the substitution code, and makes adding/removing sexions simpler in future Reviewed-by: Richard Laager Reviewed-by: Brian Behlendorf Signed-off-by: Ahelenia ZiemiaƄska Closes #12212 --- configure.ac | 3 -- man/Makefile.am | 117 ++++++++++++++++++++++++++++++++++++++++++- man/man1/Makefile.am | 12 ----- man/man5/Makefile.am | 16 ------ man/man8/Makefile.am | 102 ------------------------------------- 5 files changed, 116 insertions(+), 134 deletions(-) delete mode 100644 man/man1/Makefile.am delete mode 100644 man/man5/Makefile.am delete mode 100644 man/man8/Makefile.am diff --git a/configure.ac b/configure.ac index 077ad7c43f..27409c82f3 100644 --- a/configure.ac +++ b/configure.ac @@ -171,9 +171,6 @@ AC_CONFIG_FILES([ lib/libzstd/Makefile lib/libzutil/Makefile man/Makefile - man/man1/Makefile - man/man5/Makefile - man/man8/Makefile module/Kbuild module/Makefile module/avl/Makefile diff --git a/man/Makefile.am b/man/Makefile.am index 841cb9c4e6..4ad4aeaa40 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -1 +1,116 @@ -SUBDIRS = man1 man5 man8 +include $(top_srcdir)/config/Substfiles.am + +EXTRA_DIST += \ + man1/cstyle.1 + +dist_man_MANS = \ + man1/zhack.1 \ + man1/ztest.1 \ + man1/raidz_test.1 \ + man1/zvol_wait.1 \ + man1/arcstat.1 \ + \ + man5/vdev_id.conf.5 \ + man5/zpool-features.5 \ + man5/spl-module-parameters.5 \ + man5/zfs-module-parameters.5 \ + man5/zfs-events.5 \ + \ + man8/fsck.zfs.8 \ + man8/mount.zfs.8 \ + man8/vdev_id.8 \ + man8/zdb.8 \ + man8/zfs.8 \ + man8/zfsconcepts.8 \ + man8/zfsprops.8 \ + man8/zfs-allow.8 \ + man8/zfs-bookmark.8 \ + man8/zfs-change-key.8 \ + man8/zfs-clone.8 \ + man8/zfs-create.8 \ + man8/zfs-destroy.8 \ + man8/zfs-diff.8 \ + man8/zfs-get.8 \ + man8/zfs-groupspace.8 \ + man8/zfs-hold.8 \ + man8/zfs-inherit.8 \ + man8/zfs-jail.8 \ + man8/zfs-list.8 \ + man8/zfs-load-key.8 \ + man8/zfs-mount.8 \ + man8/zfs-program.8 \ + man8/zfs-project.8 \ + man8/zfs-projectspace.8 \ + man8/zfs-promote.8 \ + man8/zfs-receive.8 \ + man8/zfs-recv.8 \ + man8/zfs-redact.8 \ + man8/zfs-release.8 \ + man8/zfs-rename.8 \ + man8/zfs-rollback.8 \ + man8/zfs-send.8 \ + man8/zfs-set.8 \ + man8/zfs-share.8 \ + man8/zfs-snapshot.8 \ + man8/zfs-unallow.8 \ + man8/zfs-unjail.8 \ + man8/zfs-unload-key.8 \ + man8/zfs-unmount.8 \ + man8/zfs-upgrade.8 \ + man8/zfs-userspace.8 \ + man8/zfs-wait.8 \ + man8/zfs_ids_to_path.8 \ + man8/zgenhostid.8 \ + man8/zinject.8 \ + man8/zpool.8 \ + man8/zpoolconcepts.8 \ + man8/zpoolprops.8 \ + man8/zpool-add.8 \ + man8/zpool-attach.8 \ + man8/zpool-checkpoint.8 \ + man8/zpool-clear.8 \ + man8/zpool-create.8 \ + man8/zpool-destroy.8 \ + man8/zpool-detach.8 \ + man8/zpool-events.8 \ + man8/zpool-export.8 \ + man8/zpool-get.8 \ + man8/zpool-history.8 \ + man8/zpool-import.8 \ + man8/zpool-initialize.8 \ + man8/zpool-iostat.8 \ + man8/zpool-labelclear.8 \ + man8/zpool-list.8 \ + man8/zpool-offline.8 \ + man8/zpool-online.8 \ + man8/zpool-reguid.8 \ + man8/zpool-remove.8 \ + man8/zpool-reopen.8 \ + man8/zpool-replace.8 \ + man8/zpool-resilver.8 \ + man8/zpool-scrub.8 \ + man8/zpool-set.8 \ + man8/zpool-split.8 \ + man8/zpool-status.8 \ + man8/zpool-sync.8 \ + man8/zpool-trim.8 \ + man8/zpool-upgrade.8 \ + man8/zpool-wait.8 \ + man8/zstream.8 \ + man8/zstreamdump.8 \ + man8/zpool_influxdb.8 + +nodist_man_MANS = \ + man8/zed.8 \ + man8/zfs-mount-generator.8 + +SUBSTFILES += $(nodist_man_MANS) + + +if BUILD_LINUX +# The manual pager in most Linux distros defaults to "BSD" when .Os is blank, +# but leaving it blank makes things a lot easier on +# FreeBSD when OpenZFS is vendored in the base system. +install-data-hook: + cd $(DESTDIR)$(mandir) && $(SED) ${ac_inplace} -e 's/^\.Os$$/.Os OpenZFS/' $(dist_man_MANS) $(nodist_man_MANS) +endif diff --git a/man/man1/Makefile.am b/man/man1/Makefile.am deleted file mode 100644 index 8d7457a3e2..0000000000 --- a/man/man1/Makefile.am +++ /dev/null @@ -1,12 +0,0 @@ -dist_man_MANS = zhack.1 ztest.1 raidz_test.1 zvol_wait.1 arcstat.1 -EXTRA_DIST = cstyle.1 - -if BUILD_LINUX -# The man pager in most Linux distros defaults to BSD instead of Linux -# when .Os is blank, but leaving it blank makes things a lot easier on -# FreeBSD when OpenZFS is vendored in the base system. -install-data-hook: - cd $(DESTDIR)$(mandir)/man1; \ - $(SED) ${ac_inplace} -e 's/^\.Os$$/.Os Linux/' \ - $(dist_man_MANS) -endif diff --git a/man/man5/Makefile.am b/man/man5/Makefile.am deleted file mode 100644 index 9cbb2c08f3..0000000000 --- a/man/man5/Makefile.am +++ /dev/null @@ -1,16 +0,0 @@ -dist_man_MANS = \ - vdev_id.conf.5 \ - zpool-features.5 \ - spl-module-parameters.5 \ - zfs-module-parameters.5 \ - zfs-events.5 - -if BUILD_LINUX -# The man pager in most Linux distros defaults to BSD instead of Linux -# when .Os is blank, but leaving it blank makes things a lot easier on -# FreeBSD when OpenZFS is vendored in the base system. -install-data-hook: - cd $(DESTDIR)$(mandir)/man5; \ - $(SED) ${ac_inplace} -e 's/^\.Os$$/.Os Linux/' \ - $(dist_man_MANS) -endif diff --git a/man/man8/Makefile.am b/man/man8/Makefile.am deleted file mode 100644 index 602645180b..0000000000 --- a/man/man8/Makefile.am +++ /dev/null @@ -1,102 +0,0 @@ -include $(top_srcdir)/config/Substfiles.am - -dist_man_MANS = \ - fsck.zfs.8 \ - mount.zfs.8 \ - vdev_id.8 \ - zdb.8 \ - zfs.8 \ - zfsconcepts.8 \ - zfsprops.8 \ - zfs-allow.8 \ - zfs-bookmark.8 \ - zfs-change-key.8 \ - zfs-clone.8 \ - zfs-create.8 \ - zfs-destroy.8 \ - zfs-diff.8 \ - zfs-get.8 \ - zfs-groupspace.8 \ - zfs-hold.8 \ - zfs-inherit.8 \ - zfs-jail.8 \ - zfs-list.8 \ - zfs-load-key.8 \ - zfs-mount.8 \ - zfs-program.8 \ - zfs-project.8 \ - zfs-projectspace.8 \ - zfs-promote.8 \ - zfs-receive.8 \ - zfs-recv.8 \ - zfs-redact.8 \ - zfs-release.8 \ - zfs-rename.8 \ - zfs-rollback.8 \ - zfs-send.8 \ - zfs-set.8 \ - zfs-share.8 \ - zfs-snapshot.8 \ - zfs-unallow.8 \ - zfs-unjail.8 \ - zfs-unload-key.8 \ - zfs-unmount.8 \ - zfs-upgrade.8 \ - zfs-userspace.8 \ - zfs-wait.8 \ - zfs_ids_to_path.8 \ - zgenhostid.8 \ - zinject.8 \ - zpool.8 \ - zpoolconcepts.8 \ - zpoolprops.8 \ - zpool-add.8 \ - zpool-attach.8 \ - zpool-checkpoint.8 \ - zpool-clear.8 \ - zpool-create.8 \ - zpool-destroy.8 \ - zpool-detach.8 \ - zpool-events.8 \ - zpool-export.8 \ - zpool-get.8 \ - zpool-history.8 \ - zpool-import.8 \ - zpool-initialize.8 \ - zpool-iostat.8 \ - zpool-labelclear.8 \ - zpool-list.8 \ - zpool-offline.8 \ - zpool-online.8 \ - zpool-reguid.8 \ - zpool-remove.8 \ - zpool-reopen.8 \ - zpool-replace.8 \ - zpool-resilver.8 \ - zpool-scrub.8 \ - zpool-set.8 \ - zpool-split.8 \ - zpool-status.8 \ - zpool-sync.8 \ - zpool-trim.8 \ - zpool-upgrade.8 \ - zpool-wait.8 \ - zstream.8 \ - zstreamdump.8 \ - zpool_influxdb.8 - -nodist_man_MANS = \ - zed.8 \ - zfs-mount-generator.8 - -SUBSTFILES += $(nodist_man_MANS) - -if BUILD_LINUX -# The man pager in most Linux distros defaults to BSD instead of Linux -# when .Os is blank, but leaving it blank makes things a lot easier on -# FreeBSD when OpenZFS is vendored in the base system. -install-data-hook: - cd $(DESTDIR)$(mandir)/man8; \ - $(SED) ${ac_inplace} -e 's/^\.Os$$/.Os Linux/' \ - $(dist_man_MANS) $(nodist_man_MANS) -endif