From 77f3bf6270a37daef984a81b4ca37399d1fda0b1 Mon Sep 17 00:00:00 2001 From: "W. Kosior" Date: Sat, 29 Jun 2024 10:14:53 +0200 Subject: 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 --- po/doc/local.mk | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'po') 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))" \ -- cgit v1.2.3