aboutsummaryrefslogtreecommitdiff
path: root/doc/local.mk
diff options
context:
space:
mode:
authorW. Kosior <koszko@koszko.org>2024-06-29 10:14:53 +0200
committerW. Kosior <koszko@koszko.org>2024-09-04 21:02:08 +0200
commit77f3bf6270a37daef984a81b4ca37399d1fda0b1 (patch)
treea537da371f1b39f14a0ab3b683e4285308a2bf43 /doc/local.mk
parent505258172e7bc2b67469b395cb46e38ef2f3069e (diff)
downloadguix-77f3bf6270a37daef984a81b4ca37399d1fda0b1.tar.gz
guix-77f3bf6270a37daef984a81b4ca37399d1fda0b1.zip
build: Fix doc generation in VPATH builds.
* po/doc/local.mk: For every target make sure destination directory beneath $(top_builddir) exists. Don't write files beneath $(top_srcdir). * doc/local.mk: ditto. Change-Id: I18898edbf228fdf944646a72d278c3fc5daeafe4
Diffstat (limited to 'doc/local.mk')
-rw-r--r--doc/local.mk47
1 files changed, 27 insertions, 20 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" "$@"