po-docs: If *.pod files are missing, tell user to run 'make update-po'.

I'm now fairly convinced it's not possible to do this automatically.
However we should at least tell the user what needs to be done.
This commit is contained in:
Richard W.M. Jones
2013-11-25 17:02:29 +00:00
parent d81c577eff
commit 1ea1646e6f
3 changed files with 28 additions and 17 deletions

1
.gitignore vendored
View File

@@ -355,7 +355,6 @@ Makefile.in
/po-docs/*/*.8
/po-docs/po4a.conf
/po-docs/*/*.pod
/po-docs/*/stamp-update-po
/podwrapper.1
/podwrapper.pl
/po/*.gmo

View File

@@ -23,7 +23,7 @@ include $(top_srcdir)/subdir-rules.mk
LINGUA = $(shell basename -- `pwd`)
CLEANFILES = *.1 *.3 *.5 stamp-update-po
CLEANFILES = *.1 *.3 *.5
# Before 1.23.23, the old Perl tools were called *.pl.
CLEANFILES += *.pl
@@ -143,13 +143,19 @@ virt-sysprep.1: virt-sysprep.pod sysprep-extra-options.pod sysprep-operations.po
--section 8 \
$<
# Ensure that the first time we build from git, since guestfs.pod
# hasn't been built yet, build it.
$(podfiles): stamp-update-po
stamp-update-po:
if [ ! -f guestfs.pod ]; then make -C .. update-po; fi
touch $@
# If a POD file is missing, the user needs to run make update-po.
# This cannot be done automatically by make because it would be unsafe
# to run po4a or update podfiles potentially in parallel. Therefore
# tell the user what to do and stop.
$(podfiles):
@if ! test -f $@; then \
echo "***"; \
echo "*** You need to run the following commands:"; \
echo "*** rm po-docs/podfiles; make -C po-docs update-po"; \
echo "*** After that, rerun make."; \
echo "***"; \
exit 1; \
fi
# XXX Can automake do this properly?
install-data-hook:

View File

@@ -23,7 +23,7 @@ include $(top_srcdir)/subdir-rules.mk
LINGUA = $(shell basename -- `pwd`)
CLEANFILES = *.1 *.3 *.5 stamp-update-po
CLEANFILES = *.1 *.3 *.5
# Before 1.23.23, the old Perl tools were called *.pl.
CLEANFILES += *.pl
@@ -143,13 +143,19 @@ virt-sysprep.1: virt-sysprep.pod sysprep-extra-options.pod sysprep-operations.po
--section 8 \
$<
# Ensure that the first time we build from git, since guestfs.pod
# hasn't been built yet, build it.
$(podfiles): stamp-update-po
stamp-update-po:
if [ ! -f guestfs.pod ]; then make -C .. update-po; fi
touch $@
# If a POD file is missing, the user needs to run make update-po.
# This cannot be done automatically by make because it would be unsafe
# to run po4a or update podfiles potentially in parallel. Therefore
# tell the user what to do and stop.
$(podfiles):
@if ! test -f $@; then \
echo "***"; \
echo "*** You need to run the following commands:"; \
echo "*** rm po-docs/podfiles; make -C po-docs update-po"; \
echo "*** After that, rerun make."; \
echo "***"; \
exit 1; \
fi
# XXX Can automake do this properly?
install-data-hook: