1 # This makefile is very special as it's meant to build as part of the build
2 # process and also within the source tree to update the translation files.
4 # Set SRC_PATH for in-tree builds without configuration.
7 -include ../config-host.mak
8 include $(SRC_PATH)/rules.mak
10 PO_PATH=$(SRC_PATH)/po
12 VERSION=$(shell cat $(SRC_PATH)/VERSION)
13 SRCS=$(filter-out $(PO_PATH)/messages.po,$(wildcard $(PO_PATH)/*.po))
14 OBJS=$(patsubst $(PO_PATH)/%.po,%.mo,$(SRCS))
19 @echo "Use 'make update' to update translation files or use 'make build'"
20 @echo "or 'make install' to build and install the translation files."
30 for obj in $(OBJS); do \
31 base=`basename $$obj .mo`; \
32 $(INSTALL) -d $(DESTDIR)$(prefix)/share/locale/$$base/LC_MESSAGES; \
33 $(INSTALL) -m644 $$obj $(DESTDIR)$(prefix)/share/locale/$$base/LC_MESSAGES/qemu.mo; \
37 $(call quiet-command, msgfmt -o $@ $<, " GEN $@")
39 $(PO_PATH)/messages.po: $(SRC_PATH)/ui/gtk.c
40 $(call quiet-command, ( cd $(SRC_PATH) && \
41 xgettext -o - --from-code=UTF-8 --foreign-user \
42 --package-name=QEMU --package-version=$(VERSION) \
44 sed -e s/CHARSET/UTF-8/) >$@, " GEN $@")
46 $(PO_PATH)/%.po: $(PO_PATH)/messages.po