blob: 56179274a2e3a52642a6639e648bfdac55a1112a (
plain)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
include $(top_srcdir)/xbuild.include
LC_BUILD=$(top_builddir)/build/locale
#old automake versions don't set datarootdir or localedir
INSTALL_DIR=$(DESTDIR)$(prefix)/share/locale
FILES = $(addsuffix .po, $(ALL_LINGUAS))
GMO_FILES = $(patsubst %.po,$(LC_BUILD)/%/LC_MESSAGES/$(PACKAGE).mo,$(FILES))
MO_FILES = $(foreach po,$(FILES), $(INSTALL_DIR)/$(basename $(po))/LC_MESSAGES/$(PACKAGE).mo)
all: | strip-mnemonics update-locale post-strip-mnemonics
update-locale: $(GMO_FILES)
update-po:
$(MDTOOL_RUN) gettext-update --sort -f:$(top_srcdir)/Main.sln
$(GMO_FILES): $(LC_BUILD)/%/LC_MESSAGES/$(PACKAGE).mo: %.po
$(MKDIR_P) $(dir $@)
msgfmt '$<' -o '$@'
if ENABLE_MACPLATFORM
strip-mnemonics:
mkdir -p backup
cp *.po backup
$(XBUILD) "StripMnemonics/StripMnemonics.sln"
mono StripMnemonics.exe .
post-strip-mnemonics:
mv backup/*.po .
rm -rf backup
else
strip-mnemonics:
post-strip-mnemonics:
endif
statistics:
@for LANGFILE in $(ALL_LINGUAS); do \
echo "$$LANGFILE.po:"; \
msgfmt -o /dev/null --verbose "$$LANGFILE.po"; \
done
$(MO_FILES): $(INSTALL_DIR)/%/LC_MESSAGES/$(PACKAGE).mo : $(LC_BUILD)/%/LC_MESSAGES/$(PACKAGE).mo
$(MKDIR_P) $(dir $@)
$(install_sh) '$<' '$@'
install-data-local: $(MO_FILES)
uninstall-local:
@for FILE in $(MO_FILES); do \
if test -e "$$FILE"; then \
echo "Removing $$FILE"; \
rm "$$FILE"; \
fi; \
done
CLEANFILES = $(GMO_FILES)
EXTRA_DIST = Makefile po.mdproj $(FILES)
include $(top_srcdir)/Makefile.include
|