From 01d5501228515fb9b959b14a37b2b99a19b7b052 Mon Sep 17 00:00:00 2001 From: Kalle Olavi Niemitalo Date: Mon, 7 Jul 2008 09:43:35 +0300 Subject: [PATCH] po/Makefile: preset Project-Id-Version --- po/Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/po/Makefile b/po/Makefile index 772b5eb7..d2484e2e 100644 --- a/po/Makefile +++ b/po/Makefile @@ -1,6 +1,13 @@ top_builddir=.. include $(top_builddir)/Makefile.config +# We prefer the capitalized name for Project-Id-Version. +ifeq ($(PACKAGE), elinks) +PRETTY_PACKAGE = ELinks +else +PRETTY_PACKAGE = $(PACKAGE) +endif + # Where to install the catalog files. localedir = $(datadir)/locale @@ -81,6 +88,9 @@ $(srcdir)$(PACKAGE).pot: $(POTFILES_ABS_LIST) $(srcdir)perl/msgaccel-prepare -f $(POTFILES_ABS_LIST) test -f $(PACKAGE).po $(PERL) -I"$(srcdir)perl" $(srcdir)perl/msgaccel-prepare -S"$(top_srcdir)" $(PACKAGE).po +# GNU gettext 0.17 supports xgettext --package-version but is GPLv3+. +# This rule already requires Perl so use that instead. + $(PERL) -pi -e 's/(^"Project-Id-Version: )PACKAGE VERSION/$$1$(PRETTY_PACKAGE) $(VERSION)/i and $$found=1 unless $$found' $(PACKAGE).po mv -f $(PACKAGE).po $(srcdir)$(PACKAGE).pot