Log In
New Account
  
Home My Page Project Cloud Code Snippets Project Openings Hermes
Summary Lists News SCM
3 GETTEXT_PACKAGE = hermes
4 PACKAGE = hermes
6 SHELL = /bin/sh
8 prefix = /opt/$(PACKAGE)
9 DATADIRNAME = share
10 itlocaledir = $(prefix)/$(DATADIRNAME)/locale
12 INSTALL = /scratchbox/tools/bin/install -c
13 INSTALL_DATA = ${INSTALL} -m 644
15 GMSGFMT = /scratchbox/tools/bin/msgfmt
16 MSGFMT = /scratchbox/tools/bin/msgfmt
17 XGETTEXT = /scratchbox/tools/bin/xgettext
18 MSGMERGE = /scratchbox/tools/bin/msgmerge 
20 PO_LINGUAS= fr_FR
22 USE_LINGUAS= fr_FR
24 POFILES=$(shell LINGUAS="$(PO_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done)
26 DISTFILES = Makefile POTFILES.in $(POFILES)
27 EXTRA_DISTFILES = ChangeLog POTFILES.skip Makevars LINGUAS
29 POTFILES = \
30         ../src/gui.py \
31 # This comment gets stripped out
33 CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.gmo "; done)
35 .SUFFIXES:
36 .SUFFIXES: .po .gmo .mo 
38 .po.mo:
39         $(MSGFMT) -o $@ $<
41 .po.gmo:
42         file=`echo $* | sed 's,.*/,,'`.gmo \
43           && rm -f $$file && $(GMSGFMT) -o $$file $<
45 all: compile
47 compile: $(CATALOGS)
49 $(GETTEXT_PACKAGE).pot: $(POTFILES)
50         $(XGETTEXT) --package-name=$(PACKAGE) -o $(GETTEXT_PACKAGE).pot $(POTFILES) 
52 install: all
53         linguas="$(USE_LINGUAS)"; \
54         for lang in $$linguas; do \
55           dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \
56           mkdir -p $$dir; \
57           if test -r $$lang.gmo; then \
58             $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
59             echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \
60           fi; \
61         done
63 clean:  
64         rm -f *.mo *.gmo
66 update-po: 
67         $(MAKE) $(GETTEXT_PACKAGE).pot
68         linguas="$(USE_LINGUAS)"; \
69         for lang in $$linguas; do \
70           echo "$$lang:"; \
71           if test -r $$lang.po; then \
72             $(MSGMERGE) -U $$lang.po $(GETTEXT_PACKAGE).pot; \
73           else \
74             cp $(GETTEXT_PACKAGE).pot $$lang.po; \
75           fi; \
76         done

Terms of Use    Privacy Policy    Contribution Guidelines    Feedback

Powered By GForge Collaborative Development Environment