diff --git a/.gitignore b/.gitignore index e2ea9ce77..43f9f402e 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/po-docs/ja/Makefile.am b/po-docs/ja/Makefile.am index f74ee42b6..da1bcc303 100644 --- a/po-docs/ja/Makefile.am +++ b/po-docs/ja/Makefile.am @@ -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: diff --git a/po-docs/uk/Makefile.am b/po-docs/uk/Makefile.am index f74ee42b6..da1bcc303 100644 --- a/po-docs/uk/Makefile.am +++ b/po-docs/uk/Makefile.am @@ -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: