diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2019-04-30 17:32:52 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2019-04-30 18:11:15 +0200 |
| commit | 81824af6a4b30368ed497686976c26f742bc6c8a (patch) | |
| tree | c02f57c2c07143f34ef478674e45f003c090dfac | |
| parent | e4b2866cd015a52973063c0b389cf328ef0b9d18 (diff) | |
build: 'guix-manual.*.po' no longer depends on 'guix-manual.pot'.
That dependency was causing a failure when building from a fresh
checkout since commit d60225d5caabfb6409e3277c0512cd4c0fa63d72 because
'guix-manual.pot' was no longer around and there's no rule to make it.
This commit replaces the 'guix-manual.%.po' target by a phony target,
'doc-po-update-%', without any dependency.
* po/doc/local.mk ($(srcdir)/po/doc/guix-manual.%.po): Rename to...
(doc-po-update-%): ... this. Remove dependencies.
Change how 'lang' is computed; compute $output and $input, and replace
occurrences of $@ and $< with those.
(doc-po-update): Adjust accordingly.
| -rw-r--r-- | po/doc/local.mk | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/po/doc/local.mk b/po/doc/local.mk index b6262b1fd89..cb5266c6234 100644 --- a/po/doc/local.mk +++ b/po/doc/local.mk | |||
| @@ -30,22 +30,24 @@ POT_OPTIONS = --package-name "guix" --package-version "$(VERSION)" \ | |||
| 30 | --copyright-holder "Ludovic Courtès" \ | 30 | --copyright-holder "Ludovic Courtès" \ |
| 31 | --msgid-bugs-address "ludo@gnu.org" | 31 | --msgid-bugs-address "ludo@gnu.org" |
| 32 | 32 | ||
| 33 | $(srcdir)/po/doc/guix-manual.%.po: $(srcdir)/po/doc/guix-manual.pot | 33 | doc-po-update-%: |
| 34 | @lang=`echo $$(basename "$@") | sed -e 's|^guix-manual.||' -e 's|.po$$||'` ;\ | 34 | @lang=`echo "$@" | sed -e's/^doc-po-update-//'` ; \ |
| 35 | if test -f "$@"; then \ | 35 | output="$(srcdir)/po/doc/guix-manual.$$lang.po" ; \ |
| 36 | input="$(srcdir)/po/doc/guix-manual.pot" ; \ | ||
| 37 | if test -f "$$output"; then \ | ||
| 36 | test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ | 38 | test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ |
| 37 | echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $@ $<"; \ | 39 | echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $$output $$input"; \ |
| 38 | cd $(srcdir) \ | 40 | cd $(srcdir) \ |
| 39 | && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ | 41 | && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ |
| 40 | '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ | 42 | '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ |
| 41 | $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $@ $<;; \ | 43 | $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) "$$output" "$$input";; \ |
| 42 | *) \ | 44 | *) \ |
| 43 | $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $@ $<;; \ | 45 | $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} "$$output" "$$input";; \ |
| 44 | esac; \ | 46 | esac; \ |
| 45 | }; \ | 47 | }; \ |
| 46 | touch "$@"; \ | 48 | touch "$$output"; \ |
| 47 | else \ | 49 | else \ |
| 48 | echo "File $@ does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \ | 50 | echo "File $$output does not exist. If you are a translator, you can create it with 'msginit'." 1>&2; \ |
| 49 | exit 1; \ | 51 | exit 1; \ |
| 50 | fi | 52 | fi |
| 51 | 53 | ||
| @@ -65,8 +67,9 @@ doc-pot-update: | |||
| 65 | rm -f $(addprefix $(srcdir)/po/doc/, $(TMP_POT_FILES)) | 67 | rm -f $(addprefix $(srcdir)/po/doc/, $(TMP_POT_FILES)) |
| 66 | 68 | ||
| 67 | doc-po-update: doc-pot-update | 69 | doc-po-update: doc-pot-update |
| 68 | for f in $(DOC_PO_FILES); do \ | 70 | for f in $(DOC_PO_FILES); do \ |
| 69 | $(MAKE) "$$f"; \ | 71 | lang="`echo "$$f" | $(SED) -es'|.*/guix-manual\.\(.*\)\.po$$|\1|g'`"; \ |
| 72 | $(MAKE) "doc-po-update-$$lang"; \ | ||
| 70 | done | 73 | done |
| 71 | 74 | ||
| 72 | .PHONY: doc-po-update doc-pot-update | 75 | .PHONY: doc-po-update doc-pot-update |
