]> git.proxmox.com Git - qemu.git/blame - po/Makefile
PPC: Fix rldcl
[qemu.git] / po / Makefile
CommitLineData
834574ea
AL
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.
3
4VERSION=$(shell cat ../VERSION)
f8475655
AJ
5SRCS=$(filter-out messages.po,$(wildcard *.po))
6OBJS=$(patsubst %.po,%.mo,$(SRCS))
834574ea
AL
7
8SRC_PATH=..
9
10-include ../config-host.mak
11
12vpath %.po $(SRC_PATH)/po
13
14all:
15 @echo Use 'make update' to update translation files
16 @echo or us 'make build' or 'make install' to build and install
17 @echo the translation files
18
19update: $(SRCS)
20
21build: $(OBJS)
22
23clean:
24 $(RM) $(OBJS)
25
26install: $(OBJS)
27 for obj in $(OBJS); do \
28 base=`basename $$obj .mo`; \
29 $(INSTALL) -d $(DESTDIR)$(prefix)/share/locale/$$base/LC_MESSAGES; \
30 $(INSTALL) -m644 $$obj $(DESTDIR)$(prefix)/share/locale/$$base/LC_MESSAGES/qemu.mo; \
31 done
32
a23da659 33%.mo: %.po
834574ea
AL
34 @msgfmt -o $@ $(SRC_PATH)/po/`basename $@ .mo`.po
35
36messages.po: $(SRC_PATH)/ui/gtk.c
1b33b354 37 @xgettext -o $@ --foreign-user --package-name=QEMU --package-version=$(VERSION) --msgid-bugs-address=qemu-devel@nongnu.org -k_ -C $<
834574ea 38
f8475655 39%.po: messages.po
834574ea
AL
40 @msgmerge $@ $< > $@.bak && mv $@.bak $@
41
f8475655 42.PHONY: clean all