From 6ad9378c9a7bf10840c884286009956f51e4924c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Herrera?= Date: Thu, 16 Oct 2025 20:21:05 +0200 Subject: [PATCH] Fix update-po for the PGXS case The original formulation failed to take into account the fact that for the PGXS case, the source dir is not $(top_srcdir), so it ended up not doing anything. Handle it explicitly. Author: Ryo Matsumura Reviewed-by: Bryan Green Backpatch-through: 13 Discussion: https://postgr.es/m/TYCPR01MB113164770FB0B0BE6ED21E68EE8DCA@TYCPR01MB11316.jpnprd01.prod.outlook.com --- src/nls-global.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/nls-global.mk b/src/nls-global.mk index dfff472cb3f..73a6db10a1d 100644 --- a/src/nls-global.mk +++ b/src/nls-global.mk @@ -142,8 +142,13 @@ init-po: po/$(CATALOG_NAME).pot # For performance reasons, only calculate these when the user actually # requested update-po or a specific file. ifneq (,$(filter update-po %.po.new,$(MAKECMDGOALS))) +ifdef PGXS +ALL_LANGUAGES := $(shell find . -name '*.po' -print | sed 's,^.*/\([^/]*\).po$$,\1,' | LC_ALL=C sort -u) +all_compendia := $(shell find . -name '*.po' -print | LC_ALL=C sort) +else ALL_LANGUAGES := $(shell find $(top_srcdir) -name '*.po' -print | sed 's,^.*/\([^/]*\).po$$,\1,' | LC_ALL=C sort -u) all_compendia := $(shell find $(top_srcdir) -name '*.po' -print | LC_ALL=C sort) +endif else ALL_LANGUAGES = $(AVAIL_LANGUAGES) all_compendia = FORCE