bsd-user: OS-agnostic 64-bit SYSCTL types
[qemu/ar7.git] / po / Makefile
blob60ccd7d3bb7aacd1be41bb3bc0642f8bf9f5338e
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 VERSION=$(shell cat ../VERSION)
5 SRCS=$(filter-out messages.po,$(wildcard *.po))
6 OBJS=$(patsubst %.po,%.mo,$(SRCS))
8 SRC_PATH=..
10 -include ../config-host.mak
12 vpath %.po $(SRC_PATH)/po
14 all:
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
19 update: $(SRCS)
21 build: $(OBJS)
23 clean:
24 $(RM) $(OBJS)
26 install: $(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
33 %.mo: %.po
34 @msgfmt -o $@ $(SRC_PATH)/po/`basename $@ .mo`.po
36 messages.po: $(SRC_PATH)/ui/gtk.c
37 @xgettext -o $@ --foreign-user --package-name=QEMU --package-version=$(VERSION) --msgid-bugs-address=qemu-devel@nongnu.org -k_ -C $<
39 %.po: messages.po
40 @msgmerge $@ $< > $@.bak && mv $@.bak $@
42 .PHONY: clean all