ovs-sim is a funny utility since it only works from a build tree, not from an installed OVS. That means that we shouldn't install its manpage when we run "make install". But we do want to install the manpage when we're inside ovs-sim itself, so that the user can invoke "man ovs-sim" from its nested shell.
This commit makes this happen. Suggested-by: Roi Dayan <r...@mellanox.com> Signed-off-by: Ben Pfaff <b...@ovn.org> --- Documentation/automake.mk | 12 ++++++++---- rhel/openvswitch-fedora.spec.in | 1 - rhel/openvswitch.spec.in | 1 - utilities/ovs-sim.in | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Documentation/automake.mk b/Documentation/automake.mk index 2202df45b6cc..bc728dff3157 100644 --- a/Documentation/automake.mk +++ b/Documentation/automake.mk @@ -110,7 +110,7 @@ DOC_SOURCE = \ Documentation/internals/contributing/libopenvswitch-abi.rst \ Documentation/internals/contributing/submitting-patches.rst \ Documentation/requirements.txt \ - $(addprefix Documentation/ref/,$(RST_MANPAGES)) + $(addprefix Documentation/ref/,$(RST_MANPAGES) $(RST_MANPAGES_NOINST)) FLAKE8_PYFILES += Documentation/conf.py EXTRA_DIST += $(DOC_SOURCE) @@ -158,8 +158,12 @@ RST_MANPAGES = \ ovs-vlan-test.8.rst \ ovsdb-server.7.rst \ ovsdb.5.rst \ - ovsdb.7.rst \ - ovs-sim.1.rst + ovsdb.7.rst + +# rST formatted manpages that we don't want to install because they +# document stuff that only works with a build tree, not with an +# installed OVS. +RST_MANPAGES_NOINST = ovs-sim.1.rst # The GNU standards say that these variables should control # installation directories for manpages in each section. Automake @@ -202,7 +206,7 @@ INSTALL_DATA_LOCAL += install-man-rst if HAVE_SPHINX install-man-rst: docs-check @$(set_mandirs); \ - for rst in $(RST_MANPAGES); do \ + for rst in $(RST_MANPAGES) $(EXTRA_RST_MANPAGES); do \ $(extract_stem_and_section); \ echo " $(MKDIR_P) '$(DESTDIR)'\"$$mandir\""; \ $(MKDIR_P) '$(DESTDIR)'"$$mandir"; \ diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/openvswitch-fedora.spec.in index 9be16ffe7a31..22d0235f7131 100644 --- a/rhel/openvswitch-fedora.spec.in +++ b/rhel/openvswitch-fedora.spec.in @@ -320,7 +320,6 @@ install -p -D -m 0755 \ # remove unpackaged files rm -f $RPM_BUILD_ROOT%{_bindir}/ovs-parse-backtrace \ $RPM_BUILD_ROOT%{_sbindir}/ovs-vlan-bug-workaround \ - $RPM_BUILD_ROOT%{_mandir}/man1/ovs-sim.1 \ $RPM_BUILD_ROOT%{_mandir}/man8/ovs-vlan-bug-workaround.8 %check diff --git a/rhel/openvswitch.spec.in b/rhel/openvswitch.spec.in index e8be048aa27f..2c5f0409a078 100644 --- a/rhel/openvswitch.spec.in +++ b/rhel/openvswitch.spec.in @@ -100,7 +100,6 @@ rm \ $RPM_BUILD_ROOT/usr/share/man/man8/ovs-test.8 \ $RPM_BUILD_ROOT/usr/share/man/man8/ovs-l3ping.8 \ $RPM_BUILD_ROOT/usr/sbin/ovs-vlan-bug-workaround \ - $RPM_BUILD_ROOT/usr/share/man/man1/ovs-sim.1 \ $RPM_BUILD_ROOT/usr/share/man/man8/ovs-vlan-bug-workaround.8 \ $RPM_BUILD_ROOT/usr/bin/ovn-* \ $RPM_BUILD_ROOT/usr/share/man/man?/ovn-* \ diff --git a/utilities/ovs-sim.in b/utilities/ovs-sim.in index 72436c08941b..47329da212d4 100755 --- a/utilities/ovs-sim.in +++ b/utilities/ovs-sim.in @@ -466,7 +466,7 @@ export -f ovn_attach # Easy access to OVS manpages. mkdir $sim_base/man mandir=`cd $sim_base/man && pwd` -(cd "$sim_builddir" && ${MAKE-make} install-man install-man-rst mandir=$mandir >/dev/null) +(cd "$sim_builddir" && ${MAKE-make} install-man install-man-rst mandir=$mandir EXTRA_RST_MANPAGES=ovs-sim.1.rst >/dev/null) MANPATH=$mandir:; export MANPATH export scripts -- 2.16.1 _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev