blob: afdcea34628b881fdcca9235d7ac8aa5d883d68d (
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
|
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: $(GMO_FILES)
update-po:
$(MDTOOL_RUN) gettext-update -f:$(top_srcdir)/Main.sln
$(GMO_FILES): $(LC_BUILD)/%/LC_MESSAGES/$(PACKAGE).mo: %.po
$(mkdir_p) $(dir $@)
msgfmt '$<' -o '$@'
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 $(FILES)
include $(top_srcdir)/Makefile.include
|