Content-Length: 294441 | pFad | http://github.com/postgrespro/postgres/commit/30e749dece0e6502d4dd0a3b2892eab61f8c073b

66 Fix makefile logic to not break the build when xgettext is missing · postgrespro/postgres@30e749d · GitHub
Skip to content

Commit 30e749d

Browse files
committed
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.
1 parent 402e119 commit 30e749d

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/nls-global.mk

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,22 +45,26 @@ all-po: $(MO_FILES)
4545
%.mo: %.po
4646
$(MSGFMT) -o $@ $<
4747

48-
ifdef XGETTEXT
4948
ifeq ($(word 1,$(GETTEXT_FILES)),+)
5049
po/$(CATALOG_NAME).pot: $(word 2, $(GETTEXT_FILES)) $(MAKEFILE_LIST)
50+
ifdef XGETTEXT
5151
$(XGETTEXT) -D $(srcdir) -n $(addprefix -k, $(GETTEXT_TRIGGERS)) -f $<
5252
else
53+
@echo "You don't have 'xgettext'."; exit 1
54+
endif
55+
else # GETTEXT_FILES
5356
po/$(CATALOG_NAME).pot: $(GETTEXT_FILES) $(MAKEFILE_LIST)
5457
# Change to srcdir explicitly, don't rely on $^. That way we get
5558
# consistent #: file references in the po files.
59+
ifdef XGETTEXT
5660
$(XGETTEXT) -D $(srcdir) -n $(addprefix -k, $(GETTEXT_TRIGGERS)) $(GETTEXT_FILES)
61+
else
62+
@echo "You don't have 'xgettext'."; exit 1
5763
endif
64+
endif # GETTEXT_FILES
5865
@$(MKDIR_P) $(dir $@)
5966
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 >$@
6067
rm messages.po
61-
else # not XGETTEXT
62-
@echo "You don't have 'xgettext'."; exit 1
63-
endif # not XGETTEXT
6468

6569

6670
# catalog name extentions must match behavior of PG_TEXTDOMAIN() in c.h

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/30e749dece0e6502d4dd0a3b2892eab61f8c073b

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy