summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-04-11 18:37:14 +0100
committerRichard W.M. Jones <rjones@redhat.com>2012-04-11 22:51:00 +0100
commit5a677a964c31bc0d90ddfc16ef39ad240c684354 (patch)
treed96133965801046f93596c71f15dce3c8c027d42
parent71a9db762679042372731c78f876424225bf92bd (diff)
downloadlibguestfs-5a677a964c31bc0d90ddfc16ef39ad240c684354.tar.gz
libguestfs-5a677a964c31bc0d90ddfc16ef39ad240c684354.tar.xz
libguestfs-5a677a964c31bc0d90ddfc16ef39ad240c684354.zip
po-docs: Allow parallel builds in po-docs directory.
The first time the directory is checked out from git, there are no *.pod files. In a parallel build, the first thread notices this and runs the 'make -C .. update-po' rule, but the other threads also try to run at the same time and fail. (cherry picked from commit 3e164f15b77230b0961048893d03ec588fc8ab0e)
-rw-r--r--.gitignore1
-rw-r--r--po-docs/ja/Makefile.am11
-rw-r--r--po-docs/uk/Makefile.am11
3 files changed, 17 insertions, 6 deletions
diff --git a/.gitignore b/.gitignore
index b0b9158f..dbd7f8c0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -271,6 +271,7 @@ po-docs/*/*.3
po-docs/*/*.pl
po-docs/po4a.conf
po-docs/*/*.pod
+/po-docs/*/stamp-update-po
podwrapper.sh
po/en@boldquot.header
po/en@quot.header
diff --git a/po-docs/ja/Makefile.am b/po-docs/ja/Makefile.am
index 2aa26bf8..8fc48a11 100644
--- a/po-docs/ja/Makefile.am
+++ b/po-docs/ja/Makefile.am
@@ -21,7 +21,7 @@
LINGUA = $(shell basename -- `pwd`)
-CLEANFILES = *.1 *.3
+CLEANFILES = *.1 *.3 stamp-update-po
MANPAGES = \
guestfs.3 \
@@ -45,12 +45,14 @@ MANPAGES = \
virt-sparsify.1 \
virt-sysprep.1
+podfiles := $(shell for f in `cat ../podfiles`; do basename $$f; done)
+
# Ship the POD files and the translated manpages in the tarball. This
# just simplifies building from the tarball, at a small cost in extra
# size.
EXTRA_DIST = \
$(MANPAGES) \
- $(shell for f in `cat ../podfiles`; do basename $$f; done)
+ $(podfiles)
all-local: $(MANPAGES)
@@ -78,8 +80,11 @@ guestfish.1: guestfish.pod guestfish-actions.pod guestfish-commands.pod
# Ensure that the first time we build from git, since guestfs.pod
# hasn't been built yet, build it.
-guestfs.pod:
+$(podfiles): stamp-update-po
+
+stamp-update-po:
if [ ! -f guestfs.pod ]; then make -C .. update-po; fi
+ touch $@
# XXX Can automake do this properly?
install-data-hook:
diff --git a/po-docs/uk/Makefile.am b/po-docs/uk/Makefile.am
index 2aa26bf8..8fc48a11 100644
--- a/po-docs/uk/Makefile.am
+++ b/po-docs/uk/Makefile.am
@@ -21,7 +21,7 @@
LINGUA = $(shell basename -- `pwd`)
-CLEANFILES = *.1 *.3
+CLEANFILES = *.1 *.3 stamp-update-po
MANPAGES = \
guestfs.3 \
@@ -45,12 +45,14 @@ MANPAGES = \
virt-sparsify.1 \
virt-sysprep.1
+podfiles := $(shell for f in `cat ../podfiles`; do basename $$f; done)
+
# Ship the POD files and the translated manpages in the tarball. This
# just simplifies building from the tarball, at a small cost in extra
# size.
EXTRA_DIST = \
$(MANPAGES) \
- $(shell for f in `cat ../podfiles`; do basename $$f; done)
+ $(podfiles)
all-local: $(MANPAGES)
@@ -78,8 +80,11 @@ guestfish.1: guestfish.pod guestfish-actions.pod guestfish-commands.pod
# Ensure that the first time we build from git, since guestfs.pod
# hasn't been built yet, build it.
-guestfs.pod:
+$(podfiles): stamp-update-po
+
+stamp-update-po:
if [ ! -f guestfs.pod ]; then make -C .. update-po; fi
+ touch $@
# XXX Can automake do this properly?
install-data-hook: