diff options
author | Andrea Bolognani <abologna@redhat.com> | 2016-04-13 18:52:12 +0200 |
---|---|---|
committer | Andrea Bolognani <abologna@redhat.com> | 2016-04-25 15:40:44 +0200 |
commit | 49ba028aed38414e3c28adf0a1d0ae8118432d31 (patch) | |
tree | 3184fe7325a8836d9a6eb8c70730fe56265f4928 /tools | |
parent | f806febbdf6c3e51bd085a31e3c1c047357fca15 (diff) | |
download | libvirt-49ba028aed38414e3c28adf0a1d0ae8118432d31.tar.gz |
build: Replace variables in man pages
We can't use eg. @sysconfdir@ directly in the .pod file, because
pod2man(1) will interpret that as a variable name and format it
accordingly.
Instead, we use eg. SYSCONFDIR and use a subsequent sed(1) call
to turn it into the expected @sysconfdir@.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/Makefile.am | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/tools/Makefile.am b/tools/Makefile.am index 7ade4e4b66..9302ee8aef 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -280,12 +280,24 @@ 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 + $(AM_V_GEN)$(POD2MAN) $< $@-t1 && \ + if grep 'POD ERROR' $@-t1; then rm $@-t1; exit 1; fi && \ + sed \ + -e 's|SYSCONFDIR|\@sysconfdir\@|g' \ + -e 's|LOCALSTATEDIR|\@localstatedir\@|g' \ + < $@-t1 > $@-t2 && \ + rm -f $@-t1 && \ + mv $@-t2 $@ %.8.in: %.pod - $(AM_V_GEN)$(POD2MAN) --section=8 $< $@ \ - && if grep 'POD ERROR' $@ ; then rm $@; exit 1; fi + $(AM_V_GEN)$(POD2MAN) --section=8 $< $@-t1 && \ + if grep 'POD ERROR' $@-t1; then rm $@-t1; exit 1; fi && \ + sed \ + -e 's|SYSCONFDIR|\@sysconfdir\@|g' \ + -e 's|LOCALSTATEDIR|\@localstatedir\@|g' \ + < $@-t1 > $@-t2 && \ + rm -f $@-t1 && \ + mv $@-t2 $@ %.1: %.1.in $(top_srcdir)/configure.ac $(AM_V_GEN)sed \ |