diff options
-rw-r--r-- | doc/local.mk | 47 | ||||
-rw-r--r-- | po/doc/local.mk | 9 |
2 files changed, 33 insertions, 23 deletions
diff --git a/doc/local.mk b/doc/local.mk index b81172939b..38862bc28e 100644 --- a/doc/local.mk +++ b/doc/local.mk @@ -97,7 +97,7 @@ MAINTAINERCLEANFILES = $(OS_CONFIG_EXAMPLES_TEXI) $(TRANSLATED_INFO) # reference is not translated, which means it references a section that does not # exist. define xref_command -$(top_srcdir)/pre-inst-env $(GUILE) --no-auto-compile \ +$(top_builddir)/pre-inst-env $(GUILE) --no-auto-compile \ "$(top_srcdir)/build-aux/convert-xref.scm" \ $@.tmp $< endef @@ -106,40 +106,43 @@ endef # because the path extension is not 'pot'. dummy_pot = $(shell mktemp --suffix=.pot) -$(srcdir)/%D%/guix.%.texi: po/doc/guix-manual.%.po $(srcdir)/%D%/contributing.%.texi guix/build/po.go +%D%: + $(AM_V_GEN)$(MKDIR_P) "$@" + +%D%/guix.%.texi: po/doc/guix-manual.%.po %D%/contributing.%.texi \ + guix/build/po.go | %D% -$(AM_V_PO4A)$(PO4A) --no-update \ --variable localized="$@.tmp" \ - --variable master="%D%/guix.texi" \ + --variable master="$(srcdir)/%D%/guix.texi" \ --variable po="$<" \ --variable pot=$(dummy_pot) \ - po/doc/po4a.cfg + $(srcdir)/po/doc/po4a.cfg -sed -i "s|guix\.info|$$(basename "$@" | sed 's|texi$$|info|')|" "$@.tmp" -$(AM_V_POXREF)LC_ALL=en_US.UTF-8 $(xref_command) -mv "$@.tmp" "$@" -$(srcdir)/%D%/guix-cookbook.%.texi: po/doc/guix-cookbook.%.po guix/build/po.go +%D%/guix-cookbook.%.texi: po/doc/guix-cookbook.%.po guix/build/po.go | %D% -$(AM_V_PO4A)$(PO4A) --no-update \ --variable localized="$@.tmp" \ - --variable master="%D%/guix-cookbook.texi" \ + --variable master="$(srcdir)/%D%/guix-cookbook.texi" \ --variable po="$<" \ --variable pot=$(dummy_pot) \ - po/doc/po4a.cfg + $(srcdir)/po/doc/po4a.cfg -sed -i "s|guix-cookbook\.info|$$(basename "$@" | sed 's|texi$$|info|')|" "$@.tmp" -$(AM_V_POXREF)LC_ALL=en_US.UTF-8 $(xref_command) -mv "$@.tmp" "$@" -$(srcdir)/%D%/contributing.%.texi: po/doc/guix-manual.%.po guix/build/po.go +%D%/contributing.%.texi: po/doc/guix-manual.%.po guix/build/po.go | %D% -$(AM_V_PO4A)$(PO4A) --no-update \ --variable localized="$@.tmp" \ - --variable master="%D%/contributing.texi" \ + --variable master="$(srcdir)/%D%/contributing.texi" \ --variable po="$<" \ --variable pot=$(dummy_pot) \ - po/doc/po4a.cfg + $(srcdir)/po/doc/po4a.cfg -$(AM_V_POXREF)LC_ALL=en_US.UTF-8 $(xref_command) -mv "$@.tmp" "$@" -%D%/os-config-%.texi: gnu/system/examples/%.tmpl - $(AM_V_GEN)$(MKDIR_P) "`dirname $@`"; \ +%D%/os-config-%.texi: gnu/system/examples/%.tmpl | %D% cp "$<" "$@" infoimagedir = $(infodir)/images @@ -161,23 +164,27 @@ DOT_OPTIONS = \ -Nfontsize=9 -Nheight=.1 -Nwidth=.1 .dot.png: - $(AM_V_DOT)$(DOT) -Tpng $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp" - $(AM_V_at)mv "$(srcdir)/$@.tmp" "$(srcdir)/$@" + $(AM_V_GEN)$(MKDIR_P) "$$(dirname "$@")" + $(AM_V_DOT)$(DOT) -Tpng $(DOT_OPTIONS) < "$<" > "$@.tmp" + $(AM_V_at)mv "$@.tmp" "$@" .dot.pdf: + $(AM_V_GEN)$(MKDIR_P) "$$(dirname "$@")" $(AM_V_DOT)set -e; export TZ=UTC0; \ - $(DOT) -Tpdf $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp" + $(DOT) -Tpdf $(DOT_OPTIONS) < "$<" > "$@.tmp" $(AM_V_at)sed -ri \ -e 's,(/CreationDate \(D:).*\),\119700101000000),' \ - "$(srcdir)/$@.tmp" - $(AM_V_at)mv "$(srcdir)/$@.tmp" "$(srcdir)/$@" + "$@.tmp" + $(AM_V_at)mv "$@.tmp" "$@" .dot.eps: - $(AM_V_DOT)$(DOT) -Teps $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp" - $(AM_v_at)! grep -q %%CreationDate "$(srcdir)/$@.tmp" - $(AM_V_at)mv "$(srcdir)/$@.tmp" "$@" + $(AM_V_GEN)$(MKDIR_P) "$$(dirname "$@")" + $(AM_V_DOT)$(DOT) -Teps $(DOT_OPTIONS) < "$<" > "$@.tmp" + $(AM_v_at)! grep -q %%CreationDate "$@.tmp" + $(AM_V_at)mv "$@.tmp" "$@" .png.eps: + $(AM_V_GEN)$(MKDIR_P) "$$(dirname "$@")" $(AM_V_GEN)convert "$<" "$@-tmp.eps" $(AM_V_at)mv "$@-tmp.eps" "$@" diff --git a/po/doc/local.mk b/po/doc/local.mk index 2fa604340b..97db02ab61 100644 --- a/po/doc/local.mk +++ b/po/doc/local.mk @@ -41,20 +41,23 @@ EXTRA_DIST = \ $(DOC_PO_FILES) \ $(DOC_COOKBOOK_PO_FILES) -%D%/%.pot: $(srcdir)/doc/%.texi +%D%: + $(AM_V_GEN)$(MKDIR_P) $@ + +%D%/%.pot: $(srcdir)/doc/%.texi | %D% $(AM_V_PO4A)$(PO4A) --no-translations -M UTF-8 \ --package-version "$(VERSION)" \ --variable master="$<" \ --variable pot="$@-t" \ --variable po=/dev/null \ --variable localized=/dev/null \ - $(POT_OPTIONS) %D%/po4a.cfg + $(POT_OPTIONS) $(srcdir)/%D%/po4a.cfg date="$$(git log --pretty=format:%ci -n 1 -- $< 2>/dev/null \ || echo $(SOURCE_DATE_EPOCH))" \ sed -ri -e "s,^(.POT-Creation-Date: )[^\]*,\1$$date," "$@-t" mv "$@-t" "$@" -%D%/guix-manual.pot: %D%/guix.pot %D%/contributing.pot +%D%/guix-manual.pot: %D%/guix.pot %D%/contributing.pot | %D% msgcat $^ > "$@-t" date="$$(git log --pretty=format:%ci -n 1 -- $< 2>/dev/null \ || echo $(SOURCE_DATE_EPOCH))" \ |