mirror of
https://github.com/postgres/postgres.git
synced 2025-06-10 09:21:54 +03:00
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.
This commit is contained in:
@ -45,22 +45,26 @@ all-po: $(MO_FILES)
|
|||||||
%.mo: %.po
|
%.mo: %.po
|
||||||
$(MSGFMT) -o $@ $<
|
$(MSGFMT) -o $@ $<
|
||||||
|
|
||||||
ifdef XGETTEXT
|
|
||||||
ifeq ($(word 1,$(GETTEXT_FILES)),+)
|
ifeq ($(word 1,$(GETTEXT_FILES)),+)
|
||||||
po/$(CATALOG_NAME).pot: $(word 2, $(GETTEXT_FILES)) $(MAKEFILE_LIST)
|
po/$(CATALOG_NAME).pot: $(word 2, $(GETTEXT_FILES)) $(MAKEFILE_LIST)
|
||||||
|
ifdef XGETTEXT
|
||||||
$(XGETTEXT) -D $(srcdir) -n $(addprefix -k, $(GETTEXT_TRIGGERS)) -f $<
|
$(XGETTEXT) -D $(srcdir) -n $(addprefix -k, $(GETTEXT_TRIGGERS)) -f $<
|
||||||
else
|
else
|
||||||
|
@echo "You don't have 'xgettext'."; exit 1
|
||||||
|
endif
|
||||||
|
else # GETTEXT_FILES
|
||||||
po/$(CATALOG_NAME).pot: $(GETTEXT_FILES) $(MAKEFILE_LIST)
|
po/$(CATALOG_NAME).pot: $(GETTEXT_FILES) $(MAKEFILE_LIST)
|
||||||
# Change to srcdir explicitly, don't rely on $^. That way we get
|
# Change to srcdir explicitly, don't rely on $^. That way we get
|
||||||
# consistent #: file references in the po files.
|
# consistent #: file references in the po files.
|
||||||
|
ifdef XGETTEXT
|
||||||
$(XGETTEXT) -D $(srcdir) -n $(addprefix -k, $(GETTEXT_TRIGGERS)) $(GETTEXT_FILES)
|
$(XGETTEXT) -D $(srcdir) -n $(addprefix -k, $(GETTEXT_TRIGGERS)) $(GETTEXT_FILES)
|
||||||
|
else
|
||||||
|
@echo "You don't have 'xgettext'."; exit 1
|
||||||
endif
|
endif
|
||||||
|
endif # GETTEXT_FILES
|
||||||
@$(MKDIR_P) $(dir $@)
|
@$(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 >$@
|
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
|
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
|
# catalog name extentions must match behavior of PG_TEXTDOMAIN() in c.h
|
||||||
|
Reference in New Issue
Block a user