summaryrefslogtreecommitdiff
path: root/src/nls-global.mk
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2010-10-14 22:15:46 +0300
committerPeter Eisentraut <peter_e@gmx.net>2010-10-14 23:16:46 +0300
commit30e749dece0e6502d4dd0a3b2892eab61f8c073b (patch)
tree4486a07acfc78463d22565a4380d0298e8fbb773 /src/nls-global.mk
parent402e11913fe05a7523828554cc2de3f1eb982d9c (diff)
downloadpostgresql-30e749dece0e6502d4dd0a3b2892eab61f8c073b.tar.gz
Fix makefile logic to not break the build when xgettext is missing
xgettext is only required when make init-po is run manually; it is not required for a build. The intent to handle that was already there, but the ifdef's were in the wrong place.
Diffstat (limited to 'src/nls-global.mk')
-rw-r--r--src/nls-global.mk12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/nls-global.mk b/src/nls-global.mk
index 9ba2cfd94e..32b3c0fbd6 100644
--- a/src/nls-global.mk
+++ b/src/nls-global.mk
@@ -45,22 +45,26 @@ all-po: $(MO_FILES)
%.mo: %.po
$(MSGFMT) -o $@ $<
-ifdef XGETTEXT
ifeq ($(word 1,$(GETTEXT_FILES)),+)
po/$(CATALOG_NAME).pot: $(word 2, $(GETTEXT_FILES)) $(MAKEFILE_LIST)
+ifdef XGETTEXT
$(XGETTEXT) -D $(srcdir) -n $(addprefix -k, $(GETTEXT_TRIGGERS)) -f $<
else
+ @echo "You don't have 'xgettext'."; exit 1
+endif
+else # GETTEXT_FILES
po/$(CATALOG_NAME).pot: $(GETTEXT_FILES) $(MAKEFILE_LIST)
# Change to srcdir explicitly, don't rely on $^. That way we get
# consistent #: file references in the po files.
+ifdef XGETTEXT
$(XGETTEXT) -D $(srcdir) -n $(addprefix -k, $(GETTEXT_TRIGGERS)) $(GETTEXT_FILES)
+else
+ @echo "You don't have 'xgettext'."; exit 1
endif
+endif # GETTEXT_FILES
@$(MKDIR_P) $(dir $@)
sed -e '1,18 { s/SOME DESCRIPTIVE TITLE./LANGUAGE message translation file for $(CATALOG_NAME)/;s/PACKAGE/PostgreSQL/g;s/VERSION/$(MAJORVERSION)/g;s/YEAR/'`date +%Y`'/g; }' messages.po >$@
rm messages.po
-else # not XGETTEXT
- @echo "You don't have 'xgettext'."; exit 1
-endif # not XGETTEXT
# catalog name extentions must match behavior of PG_TEXTDOMAIN() in c.h