about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog12
-rw-r--r--catgets/xopen-msg.awk5
-rw-r--r--intl/Makefile6
-rwxr-xr-xintl/tst-gettext.sh4
4 files changed, 24 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 4e8411f9bf..9be766b2a1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2018-02-18  Aurelien Jarno  <aurelien@aurel32.net>
+
+	[BZ #21508]
+	* catgets/xopen-msg.awk: Ignore POT-Creation-Date line.
+	* intl/Makefile ($(objpfx)tst-gettext-de.po): Generate
+	intl/tst-gettext-de.po from po/de.po by removing the
+	POT-Creation-Date line.
+	($(objpfx)msgs.h): Depend on $(objpfx)tst-gettext-de.po instead of
+	../po/de.po.
+	* intl/tst-gettext.sh: Use ${objpfx}tst-gettext-de.po instead of
+	../po/de.po.
+
 2018-02-17  Samuel Thibault  <samuel.thibault@ens-lyon.org>
 
 	* mach/Makefile (headers): Add mach/param.h.
diff --git a/catgets/xopen-msg.awk b/catgets/xopen-msg.awk
index a13d6fa06a..bab0f6b4ef 100644
--- a/catgets/xopen-msg.awk
+++ b/catgets/xopen-msg.awk
@@ -58,6 +58,11 @@ $1 ~ "msg(id|str)" {
     next
 }
 
+/^"POT-Creation-Date: [0-9-]+ [0-9:+-]+\\n"/ {
+    # Ignore POT-Creation-Date to match what is done in intl/Makefile.
+    next
+}
+
 /^".*"/ {
     # Append to current message
     sub(/^"/, "", $0)
diff --git a/intl/Makefile b/intl/Makefile
index 2219717a5a..672edf1b38 100644
--- a/intl/Makefile
+++ b/intl/Makefile
@@ -120,7 +120,11 @@ $(objpfx)tst-gettext6.out: $(gen-locales)
 $(objpfx)tst-translit.out: $(gen-locales)
 endif
 
-$(objpfx)msgs.h: po2test.awk ../po/de.po
+$(objpfx)tst-gettext-de.po: ../po/de.po
+	$(make-target-directory)
+	LC_ALL=C $(AWK) '!/^"POT-Creation-Date: [0-9-]+ [0-9:+-]+\\n"$$/' $^ > $@
+
+$(objpfx)msgs.h: po2test.awk $(objpfx)tst-gettext-de.po
 	$(make-target-directory)
 	LC_ALL=C $(AWK) -f $^ > $@
 
diff --git a/intl/tst-gettext.sh b/intl/tst-gettext.sh
index af9c7d7d92..0c65583149 100755
--- a/intl/tst-gettext.sh
+++ b/intl/tst-gettext.sh
@@ -42,9 +42,9 @@ mkdir -p ${objpfx}domaindir/existing-locale/LC_MESSAGES
 mkdir -p ${objpfx}domaindir/existing-locale/LC_TIME
 # Populate them.
 msgfmt -o ${objpfx}domaindir/existing-locale/LC_MESSAGES/existing-domain.mo \
-       -f ../po/de.po
+       -f ${objpfx}tst-gettext-de.po
 msgfmt -o ${objpfx}domaindir/existing-locale/LC_TIME/existing-time-domain.mo \
-       -f ../po/de.po
+       -f ${objpfx}tst-gettext-de.po
 
 # Now run the test.
 ${test_program_prefix_before_env} \