summaryrefslogtreecommitdiff
path: root/rules.make
diff options
context:
space:
mode:
authorTobias Quathamer <toddy@debian.org>2006-10-01 09:02:20 +0000
committerTobias Quathamer <toddy@debian.org>2006-10-01 09:02:20 +0000
commit29eead15d2a925056f8aeb86ff83e1be24d5c0b7 (patch)
tree92bb5acbb765c7d85c2488670356e0c232672999 /rules.make
parentfd9a787ca7d02d7be5d81429515d9a8ca77daf71 (diff)
downloadiso-codes-29eead15d2a925056f8aeb86ff83e1be24d5c0b7.tar.gz
Enable a check for wrong encodings of .po files
Diffstat (limited to 'rules.make')
-rw-r--r--rules.make12
1 files changed, 12 insertions, 0 deletions
diff --git a/rules.make b/rules.make
index 7e85a19d..da0466c0 100644
--- a/rules.make
+++ b/rules.make
@@ -2,6 +2,18 @@
%.mo: %.po
$(MSGFMT) --verbose --check $< -o $@
+.PHONY: check-content
+check-content:
+ @grep "Content-Type" *po | grep -v "UTF-8" && touch found-non-utf.stamp || true
+ @if [ -e found-non-utf.stamp ]; then \
+ echo "*********"; \
+ echo "* Error *"; \
+ echo "*********"; \
+ echo "At least one file is not encoded in UTF-8. Please check."; \
+ rm -f found-non-utf.stamp; \
+ false; \
+ fi
+
localedir = $(datadir)/locale
install-data-hook: $(mofiles)