After this commit, all man pages are generated using the same two steps: 1. Process a source $command.pod file with pod2man(1) to obtain a valid man page in $command.$section.in 2. Process $command.$section.in with sed(1) to obtain the final man page in $command.$section --- daemon/Makefile.am | 25 +++++++++--------- daemon/{libvirtd.pod.in => libvirtd.pod} | 0 src/Makefile.am | 34 ++++++++++--------------- src/locking/{virtlockd.pod.in => virtlockd.pod} | 0 src/logging/{virtlogd.pod.in => virtlogd.pod} | 0 tools/Makefile.am | 4 +-- 6 files changed, 27 insertions(+), 36 deletions(-) rename daemon/{libvirtd.pod.in => libvirtd.pod} (100%) rename src/locking/{virtlockd.pod.in => virtlockd.pod} (100%) rename src/logging/{virtlogd.pod.in => virtlogd.pod} (100%) diff --git a/daemon/Makefile.am b/daemon/Makefile.am index 13ae1c2..6a82cc9 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am @@ -70,7 +70,7 @@ EXTRA_DIST = \ libvirtd.uml.logrotate.in \ test_libvirtd.aug.in \ THREADS.txt \ - libvirtd.pod.in \ + libvirtd.pod \ libvirtd.8.in \ $(DAEMON_SOURCES) \ $(LIBVIRTD_CONF_SOURCES) \ @@ -162,13 +162,6 @@ augeastests_DATA = test_libvirtd.aug CLEANFILES += test_libvirtd.aug -libvirtd.8: libvirtd.8.in - $(AM_V_GEN)sed \ - -e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \ - -e 's|[@]localstatedir[@]|$(localstatedir)|g' \ - < $< > $@-t && \ - mv $@-t $@ - libvirtd_SOURCES = $(DAEMON_SOURCES) #-D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_POSIX_C_SOURCE=199506L @@ -514,12 +507,18 @@ install-data-local: install-data-sasl uninstall-local:: uninstall-data-sasl endif ! WITH_LIBVIRTD -POD2MAN = pod2man -c "Virtualization Support" \ - -r "$(PACKAGE)-$(VERSION)" -s 8 +POD2MAN = pod2man -c "Virtualization Support" -r "$(PACKAGE)-$(VERSION)" -libvirtd.8.in: libvirtd.pod.in $(top_srcdir)/configure.ac - $(AM_V_GEN)$(POD2MAN) --name LIBVIRTD $< $@ \ - && if grep 'POD ERROR' $@ ; then rm $@; exit 1; fi +%.8.in: %.pod + $(AM_V_GEN)$(POD2MAN) --section=8 $< $@ \ + && if grep 'POD ERROR' $@ ; then rm $@; exit 1; fi + +%.8: %.8.in $(top_srcdir)/configure.ac + $(AM_V_GEN)sed \ + -e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \ + -e 's|[@]localstatedir[@]|$(localstatedir)|g' \ + < $< > $@-t && \ + mv $@-t $@ # This is needed for clients too, so can't wrap in # the WITH_LIBVIRTD conditional diff --git a/daemon/libvirtd.pod.in b/daemon/libvirtd.pod similarity index 100% rename from daemon/libvirtd.pod.in rename to daemon/libvirtd.pod diff --git a/src/Makefile.am b/src/Makefile.am index c2ec53f..fcbcd44 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -2560,29 +2560,21 @@ virtlogd.init: logging/virtlogd.init.in $(top_builddir)/config.status chmod a+x $@-t && \ mv $@-t $@ -POD2MAN = pod2man -c "Virtualization Support" \ - -r "$(PACKAGE)-$(VERSION)" -s 8 +POD2MAN = pod2man -c "Virtualization Support" -r "$(PACKAGE)-$(VERSION)" -virtlockd.8.in: locking/virtlockd.pod.in $(top_srcdir)/configure.ac - $(AM_V_GEN)$(POD2MAN) --name VIRTLOCKD $< $@ \ - && if grep 'POD ERROR' $@ ; then rm $@; exit 1; fi +virtlockd.8.in: locking/virtlockd.pod + $(AM_V_GEN)$(POD2MAN) --section 8 $< $@ \ + && if grep 'POD ERROR' $@ ; then rm $@; exit 1; fi -virtlockd.8: virtlockd.8.in - $(AM_V_GEN)sed \ - -e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \ - -e 's|[@]localstatedir[@]|$(localstatedir)|g' \ - < $< > $@-t && \ - mv $@-t $@ - -virtlogd.8.in: logging/virtlogd.pod.in $(top_srcdir)/configure.ac - $(AM_V_GEN)$(POD2MAN) --name VIRTLOGD $< $@ \ - && if grep 'POD ERROR' $@ ; then rm $@; exit 1; fi +virtlogd.8.in: logging/virtlogd.pod + $(AM_V_GEN)$(POD2MAN) --section 8 $< $@ \ + && if grep 'POD ERROR' $@ ; then rm $@; exit 1; fi -virtlogd.8: virtlogd.8.in +%.8: %.8.in $(top_srcdir)/configure.ac $(AM_V_GEN)sed \ - -e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \ - -e 's|[@]localstatedir[@]|$(localstatedir)|g' \ - < $< > $@-t && \ + -e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \ + -e 's|[@]localstatedir[@]|$(localstatedir)|g' \ + < $< > $@-t && \ mv $@-t $@ if WITH_LIBVIRTD @@ -2601,14 +2593,14 @@ MAINTAINERCLEANFILES += virtlockd.8.in virtlogd.8.in EXTRA_DIST += \ locking/virtlockd.service.in \ locking/virtlockd.socket.in \ - locking/virtlockd.pod.in \ + locking/virtlockd.pod \ virtlockd.8.in \ locking/virtlockd.aug \ locking/virtlockd.conf \ locking/test_virtlockd.aug.in \ logging/virtlogd.service.in \ logging/virtlogd.socket.in \ - logging/virtlogd.pod.in \ + logging/virtlogd.pod \ virtlogd.8.in \ logging/virtlogd.aug \ logging/virtlogd.conf \ diff --git a/src/locking/virtlockd.pod.in b/src/locking/virtlockd.pod similarity index 100% rename from src/locking/virtlockd.pod.in rename to src/locking/virtlockd.pod diff --git a/src/logging/virtlogd.pod.in b/src/logging/virtlogd.pod similarity index 100% rename from src/logging/virtlogd.pod.in rename to src/logging/virtlogd.pod diff --git a/tools/Makefile.am b/tools/Makefile.am index eb9adb8..78bd22f 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -28,8 +28,6 @@ AM_LDFLAGS = \ $(NO_INDIRECT_LDFLAGS) \ $(NULL) -POD2MAN = pod2man -c "Virtualization Support" -r "$(PACKAGE)-$(VERSION)" - ICON_FILES = \ libvirt_win_icon_16x16.ico \ libvirt_win_icon_32x32.ico \ @@ -273,6 +271,8 @@ virsh_win_icon.$(OBJEXT): virsh_win_icon.rc --output-format coff --output $@ endif WITH_WIN_ICON +POD2MAN = pod2man -c "Virtualization Support" -r "$(PACKAGE)-$(VERSION)" + %.1.in: %.pod $(AM_V_GEN)$(POD2MAN) $< $@ \ && if grep 'POD ERROR' $@ ; then rm $@; exit 1; fi -- 2.5.5 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list