summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÁlvaro Herrera2025-10-16 18:21:05 +0000
committerÁlvaro Herrera2025-10-16 18:21:05 +0000
commitf768f5a7d408c7a5efe45d49136818f7d4d0a62a (patch)
tree9e6aeb66b061f35e0e837816bf24704ccb3800e2
parent12b0c0e51b2fed1f36816a0ea53a4f8e44455ec1 (diff)
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 <matsumura.ryo@fujitsu.com> Reviewed-by: Bryan Green <dbryan.green@gmail.com> Backpatch-through: 13 Discussion: https://postgr.es/m/TYCPR01MB113164770FB0B0BE6ED21E68EE8DCA@TYCPR01MB11316.jpnprd01.prod.outlook.com
-rw-r--r--src/nls-global.mk5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nls-global.mk b/src/nls-global.mk
index 30b40ffe2ab..cda330a85f9 100644
--- a/src/nls-global.mk
+++ b/src/nls-global.mk
@@ -132,8 +132,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