]> git.saurik.com Git - wxWidgets.git/blob - locale/Makefile
doc.cpp
[wxWidgets.git] / locale / Makefile
1 # this is the makefile for generating wxstd.po message catalog file and
2 # building lang.mo files from the translated lang.po catalogs
3
4 # this makefile may be invoked to build either wxstd.po or any lang.mo
5
6 # the programs we use (TODO: use configure to detect them)
7 MSGFMT=msgfmt
8 MSGMERGE=msgmerge
9 XGETTEXT=xgettext
10 XARGS=xargs
11
12 # common xgettext args: C++ syntax, use the specified macro names as markers
13 XGETTEXT_ARGS=-C -k_ -kwxTRANSLATE -s
14
15 # implicit rules
16 %.mo: %.po
17 $(MSGFMT) -o $@ $<
18
19 # a PO file must be updated from wxstd.po to include new translations
20 %.po: wxstd.po
21 if [ -f $@ ]; then $(MSGMERGE) $@ wxstd.po > $@.new && mv $@.new $@; else cp wxstd.po $@; fi
22
23 wxstd.po:
24 find ../include -name "*.h" | $(XARGS) $(XGETTEXT) $(XGETTEXT_ARGS) -o wxstd.po
25 find ../src -name "*.cpp" | $(XARGS) $(XGETTEXT) $(XGETTEXT_ARGS) -o wxstd.po
26
27 # targets depending on this one will be always remade
28 FORCE:
29
30 # $Id$