]> xenbits.xensource.com Git - libvirt.git/commitdiff
build: Perform post-processing on all man pages
authorAndrea Bolognani <abologna@redhat.com>
Tue, 12 Apr 2016 20:15:45 +0000 (22:15 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Mon, 25 Apr 2016 13:40:44 +0000 (15:40 +0200)
Man pages in daemon/ and src/ are being already subjected to this
post-processing step: make it so those in tools/ are as well.

tools/Makefile.am

index bee01804412f815bb656f0bd2cc738b2320e7c09..64212d5c401b13aba05316f35722c35839d494af 100644 (file)
@@ -51,6 +51,13 @@ EXTRA_DIST = \
        virt-sanlock-cleanup.pod                        \
        virt-xml-validate.pod                           \
        virsh.pod                                       \
+       virt-admin.1.in                                 \
+       virt-host-validate.1.in                         \
+       virt-login-shell.1.in                           \
+       virt-pki-validate.1.in                          \
+       virt-sanlock-cleanup.8.in                       \
+       virt-xml-validate.1.in                          \
+       virsh.1.in                                      \
        libvirt-guests.sysconf                          \
        virsh-edit.c                                    \
        virsh-domain.c                                  \
@@ -266,14 +273,28 @@ virsh_win_icon.$(OBJEXT): virsh_win_icon.rc
          --output-format coff --output $@
 endif WITH_WIN_ICON
 
-%.1: %.pod $(top_srcdir)/configure.ac
+%.1.in: %.pod
        $(AM_V_GEN)$(POD2MAN) $< $@ \
                && if grep 'POD ERROR' $@ ; then rm $@; exit 1; fi
 
-%.8: %.pod $(top_srcdir)/configure.ac
+%.8.in: %.pod
        $(AM_V_GEN)$(POD2MAN) --section=8 $< $@ \
                && if grep 'POD ERROR' $@ ; then rm $@; exit 1; fi
 
+%.1: %.1.in $(top_srcdir)/configure.ac
+       $(AM_V_GEN)sed \
+               -e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \
+               -e 's|[@]localstatedir[@]|$(localstatedir)|g' \
+               < $< > $@-t && \
+       mv $@-t $@
+
+%.8: %.8.in $(top_srcdir)/configure.ac
+       $(AM_V_GEN)sed \
+               -e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \
+               -e 's|[@]localstatedir[@]|$(localstatedir)|g' \
+               < $< > $@-t && \
+       mv $@-t $@
+
 install-data-local: install-init install-systemd
 
 uninstall-local: uninstall-init uninstall-systemd