From 90709d8d2279c5812b8c62494c78b54a12f0baef Mon Sep 17 00:00:00 2001 From: Andrea Bolognani Date: Tue, 12 Apr 2016 21:32:21 +0200 Subject: [PATCH] build: Build man pages in $(builddir) No file should be created inside $(srcdir) during build. --- daemon/Makefile.am | 6 +++--- src/Makefile.am | 10 +++++----- tools/Makefile.am | 10 ++++------ 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/daemon/Makefile.am b/daemon/Makefile.am index b3bcb9611e..32ecd4cca4 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am @@ -161,7 +161,7 @@ augeastests_DATA = test_libvirtd.aug CLEANFILES += test_libvirtd.aug -libvirtd.8: $(srcdir)/libvirtd.8.in +libvirtd.8: libvirtd.8.in $(AM_V_GEN)sed \ -e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \ -e 's|[@]localstatedir[@]|$(localstatedir)|g' \ @@ -507,7 +507,7 @@ endif ! WITH_LIBVIRTD POD2MAN = pod2man -c "Virtualization Support" \ -r "$(PACKAGE)-$(VERSION)" -s 8 -$(srcdir)/libvirtd.8.in: libvirtd.pod.in $(top_srcdir)/configure.ac +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 @@ -530,4 +530,4 @@ endif ! WITH_SASL CLEANFILES += $(BUILT_SOURCES) $(man8_MANS) CLEANFILES += *.cov *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda -MAINTAINERCLEANFILES = $(srcdir)/libvirtd.8.in $(DAEMON_GENERATED) +MAINTAINERCLEANFILES = libvirtd.8.in $(DAEMON_GENERATED) diff --git a/src/Makefile.am b/src/Makefile.am index 09389a82b2..11f2731014 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -2565,22 +2565,22 @@ virtlogd.init: logging/virtlogd.init.in $(top_builddir)/config.status POD2MAN = pod2man -c "Virtualization Support" \ -r "$(PACKAGE)-$(VERSION)" -s 8 -$(srcdir)/virtlockd.8.in: locking/virtlockd.pod.in $(top_srcdir)/configure.ac +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: $(srcdir)/virtlockd.8.in +virtlockd.8: virtlockd.8.in $(AM_V_GEN)sed \ -e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \ -e 's|[@]localstatedir[@]|$(localstatedir)|g' \ < $< > $@-t && \ mv $@-t $@ -$(srcdir)/virtlogd.8.in: logging/virtlogd.pod.in $(top_srcdir)/configure.ac +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: $(srcdir)/virtlogd.8.in +virtlogd.8: virtlogd.8.in $(AM_V_GEN)sed \ -e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \ -e 's|[@]localstatedir[@]|$(localstatedir)|g' \ @@ -2598,7 +2598,7 @@ endif WITH_LIBVIRTD CLEANFILES += test_virtlockd.aug virtlockd.8 \ test_virtlogd.aug virtlogd.8 -MAINTAINERCLEANFILES += $(srcdir)/virtlockd.8.in $(srcdir)/virtlogd.8.in +MAINTAINERCLEANFILES += virtlockd.8.in virtlogd.8.in EXTRA_DIST += \ locking/virtlockd.service.in \ diff --git a/tools/Makefile.am b/tools/Makefile.am index e414498bfc..bee0180441 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -267,14 +267,12 @@ virsh_win_icon.$(OBJEXT): virsh_win_icon.rc endif WITH_WIN_ICON %.1: %.pod $(top_srcdir)/configure.ac - $(AM_V_GEN)$(POD2MAN) $< $(srcdir)/$@ \ - && if grep 'POD ERROR' $(srcdir)/$@ ; then \ - rm $(srcdir)/$@; exit 1; fi + $(AM_V_GEN)$(POD2MAN) $< $@ \ + && if grep 'POD ERROR' $@ ; then rm $@; exit 1; fi %.8: %.pod $(top_srcdir)/configure.ac - $(AM_V_GEN)$(POD2MAN) --section=8 $< $(srcdir)/$@ \ - && if grep 'POD ERROR' $(srcdir)/$@ ; then \ - rm $(srcdir)/$@; exit 1; fi + $(AM_V_GEN)$(POD2MAN) --section=8 $< $@ \ + && if grep 'POD ERROR' $@ ; then rm $@; exit 1; fi install-data-local: install-init install-systemd