target-arm: A64: Respect SPSEL in ERET SP restore
[qemu/ar7.git] / po / Makefile
blob669f8654a608be6e5f811ba23b0b4a16ff8f212f
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.
5 SRC_PATH=..
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))
16 vpath %.po $(PO_PATH)
18 all:
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."
22 update: $(SRCS)
24 build: $(OBJS)
26 clean:
27 $(RM) $(OBJS)
29 install: $(OBJS)
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; \
34 done
36 %.mo: %.po
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) \
43 --msgid-bugs-address=qemu-devel@nongnu.org -k_ -C ui/gtk.c | \
44 sed -e s/CHARSET/UTF-8/) >$@, " GEN $@")
46 $(PO_PATH)/%.po: $(PO_PATH)/messages.po
47 $(call quiet-command, msgmerge -q $@ $< > $@.bak && mv $@.bak $@, " GEN $@")
49 .PHONY: clean all