forked from wesnoth/wesnoth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
30 lines (26 loc) · 921 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#
# This makefile was created with the sole purpose of emulating the
# makefiles of the rest of domains (and thus make updates easily
# scriptable).
#
DOMAIN= wesnoth-manpages
MSGMERGE = msgmerge
MSGFMT = msgfmt
.SUFFIXES: .gmo .po .po-update
.po.po-update:
@lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
tmpdir=`pwd`; \
echo "$$lang:"; \
echo "$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \
mv -f $$tmpdir/$$lang.new.po $$lang.po; \
else \
echo "msgmerge for $$lang.po failed!" 1>&2; \
rm -f $$tmpdir/$$lang.new.po; \
fi
# this dummy rule only displays the statistics, there is no need to
# generate .gmo files for po4a manpages
.po.gmo:
@lang=`echo $* | sed -e 's,.*/,,'`; \
echo "$(MSGFMT) --check-domain --statistics -o /dev/null $${lang}.po"; \
$(MSGFMT) --check-domain --statistics -o /dev/null $${lang}.po