提交 6db98a2d 编写于 作者: E Eric Blake

build: don't require pod2man for tarball builds

Right now, 'man libvirtd' includes information that depends on
configure results, so it must be generated on the fly and live
in $(builddir); however, requiring pod2man on all end user
machines is overkill.  Meanwhile, 'man virsh' doesn't mention
any configure results, so it can be built at 'make dist' time.
If that situation changes in the future, we can generate virsh.1
in the same way that we generate libvirtd.8.

* daemon/Makefile.am (libvirtd.8.in): New rule, to run pod2man in
advance of distribution.
(libvirtd.8): Use only sed from tarball.
(EXTRA_DIST): Ship new file.
(libvirtd.pod): Delete unused rule.
(man8_MANS): Let automake know which section to use.
(CLEANFILES, MAINTAINERCLEANFILES): Adjust to new files.
* tools/Makefile.am (dist_man1_MANS): Distribute pre-built man
pages, fine since they don't require any substitution.
(virt-xml-validate.1, virt-pki-validate.1): Change input source.
(virsh.1): Build into srcdir.
(CLEANFILES, MAINTAINERCLEANFILES): Adjust to new build style.
* daemon/.gitignore: Update.
Reported by Diego Elio Pettenò.
上级 994e7567
......@@ -8,6 +8,7 @@ libvirt_qemud
libvirtd
libvirtd.init
libvirtd*.logrotate
libvirtd.pod
libvirtd.8
libvirtd.8.in
libvirtd.pod
probes.h
......@@ -38,6 +38,7 @@ EXTRA_DIST = \
test_libvirtd.aug \
THREADING.txt \
libvirtd.pod.in \
libvirtd.8.in \
libvirtd.stp \
$(AVAHI_SOURCES) \
$(DAEMON_SOURCES)
......@@ -46,7 +47,7 @@ BUILT_SOURCES =
if WITH_LIBVIRTD
man_MANS = libvirtd.8
man8_MANS = libvirtd.8
sbin_PROGRAMS = libvirtd
......@@ -62,7 +63,7 @@ augeastests_DATA = test_libvirtd.aug
POD2MAN = pod2man -c "Virtualization Support" \
-r "$(PACKAGE)-$(VERSION)" -s 8
libvirtd.pod: libvirtd.pod.in
libvirtd.8: $(srcdir)/libvirtd.8.in
sed \
-e 's![@]sysconfdir[@]!$(sysconfdir)!g' \
-e 's![@]localstatedir[@]!$(localstatedir)!g' \
......@@ -70,7 +71,7 @@ libvirtd.pod: libvirtd.pod.in
< $< > $@-t
mv $@-t $@
libvirtd.8: libvirtd.pod
$(srcdir)/libvirtd.8.in: libvirtd.pod.in
$(AM_V_GEN)$(POD2MAN) $< $@
libvirtd_SOURCES = $(DAEMON_SOURCES)
......@@ -338,5 +339,6 @@ uninstall-data-sasl:
endif
CLEANFILES += $(BUILT_SOURCES) $(man_MANS) libvirtd.pod
CLEANFILES += $(BUILT_SOURCES) $(man8_MANS)
CLEANFILES += *.cov *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda
MAINTAINERCLEANFILES = $(srcdir)/libvirtd.8.in
......@@ -19,22 +19,22 @@ EXTRA_DIST = \
bin_SCRIPTS = virt-xml-validate virt-pki-validate
bin_PROGRAMS = virsh
man1_MANS = virt-xml-validate.1 virt-pki-validate.1 virsh.1
dist_man1_MANS = virt-xml-validate.1 virt-pki-validate.1 virsh.1
virt-xml-validate: virt-xml-validate.in Makefile
$(AM_V_GEN)sed -e 's,@SCHEMADIR@,$(pkgdatadir)/schemas,' < $< > $@ \
|| (rm $@ && exit 1) && chmod +x $@
virt-xml-validate.1: virt-xml-validate
$(AM_V_GEN)$(POD2MAN) $< $@
virt-xml-validate.1: virt-xml-validate.in
$(AM_V_GEN)$(POD2MAN) $< $(srcdir)/$@
virt-pki-validate: virt-pki-validate.in Makefile
$(AM_V_GEN)sed -e 's,@SYSCONFDIR@,$(sysconfdir),' < $< > $@ \
|| (rm $@ && exit 1) && chmod +x $@
virt-pki-validate.1: virt-pki-validate
$(AM_V_GEN)$(POD2MAN) $< $@
virt-pki-validate.1: virt-pki-validate.in
$(AM_V_GEN)$(POD2MAN) $< $(srcdir)/$@
virsh_SOURCES = \
console.c console.h \
......@@ -123,7 +123,7 @@ virsh_win_icon.$(OBJEXT): virsh_win_icon.rc
endif
virsh.1: virsh.pod
$(AM_V_GEN)$(POD2MAN) $< $@
$(AM_V_GEN)$(POD2MAN) $< $(srcdir)/$@
install-data-local: install-init
......@@ -162,7 +162,8 @@ libvirt-guests.init:
endif # LIBVIRT_INIT_SCRIPT_RED_HAT
CLEANFILES = $(bin_SCRIPTS) $(man1_MANS)
CLEANFILES = $(bin_SCRIPTS)
CLEANFILES += *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda *.i *.s
MAINTAINERCLEANFILES = $(dist_man1_MANS)
DISTCLEANFILES = $(BUILT_SOURCES)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册