~ubuntu-branches/ubuntu/trusty/libintl-perl/trusty

« back to all changes in this revision

Viewing changes to sample/simplecal/po/Makefile

  • Committer: Package Import Robot
  • Author(s): Peter Eisentraut
  • Date: 2013-06-29 21:23:42 UTC
  • mfrom: (1.2.3)
  • Revision ID: package-import@ubuntu.com-20130629212342-3te0y4h5x26hb79b
Tags: 1.23-1
* New upstream release
* Updated standards version
* Changed to Debhelper level 9
* Added build-arch and build-indep targets
* Fixed application of Debian build flags for hardening

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
srcdir = .
4
4
libdir = ../lib
5
5
 
6
 
#CATALOGS = $(addsuffix .po, LINGUAS)
7
 
CATALOGS = $(LINGUAS)
8
 
MO_FILES = $(addsuffix .mo, $(LINGUAS))
 
6
CATALOGS  = $(LINGUAS)
 
7
MO_FILES = $(addsuffix .gmo, $(LINGUAS))
9
8
 
10
9
MSGMERGE = msgmerge
11
10
MSGFMT   = msgfmt
26
25
        @echo "  update-po                 - merge po files"
27
26
        @echo "  update-mo                 - regenerate mo files"
28
27
        @echo "  install                   - install mo files"
29
 
        @echo "  all                       - all of the above"
 
28
        @echo "  all                       - all of the above"
30
29
 
31
 
POTFILES = $(srcdir)/POTFILES.in \
32
 
        $(shell cat $(srcdir)/POTFILES.in) 
 
30
POTFILES = $(srcdir)/POTFILES \
 
31
        $(shell cat $(srcdir)/POTFILES) 
33
32
 
34
33
pot: $(TD).pot 
35
34
 
36
35
clean:
37
 
        rm -f *~ *.bak *.mo
 
36
        rm -f *~ *.bak *.gmo
38
37
 
39
 
# FIXME: The parameter --from-code is only needed if your sources contain
40
 
# any 8 bit data (even in comments).  UTF-8 is only a guess here, but it
41
 
# will at least accept any 8 bit data.
42
 
#
43
 
# The parameter "--language=perl" is not strictly needed because the
44
 
# source language of all our files will be auto-detected by xgettext
45
 
# by their filename extension.  You should even avoid this parameter
46
 
# if you want to extract strings from multiple source languages.
47
38
$(TD).pot: $(POTFILES)
48
39
        $(XGETTEXT) --output=$(srcdir)/$(TD).pox --from-code=utf-8 \
49
 
                --add-comments=TRANSLATORS: --files-from=$(srcdir)/POTFILES.in \
 
40
                --add-comments=TRANSLATORS: --files-from=$(srcdir)/POTFILES \
50
41
                --copyright-holder="$(COPYRIGHT_HOLDER)" \
51
42
                --msgid-bugs-address="$(MSGID_BUGS_ADDRESS)" \
52
43
                --keyword --keyword='$$__' --keyword=__ --keyword=__x \
53
44
                --keyword=__n:1,2 --keyword=__nx:1,2 --keyword=__xn:1,2 \
54
45
                --keyword=__p:1c,2 --keyword=__np:1c,2,3 \
55
46
                --keyword=__npx:1c,2,3 --keyword=N__ --keyword=N__n:1,2 \
56
 
                --keyword=N__p:1c,2 --keyword=N__np:1c,2,3 --keyword=%__ \
57
 
                --language=perl && \
 
47
                --keyword=N__p:1c,2 --keyword=N__np:1c,2,3 --keyword=%__ && \
58
48
        rm -f $@ && mv $(TD).pox $@
59
49
 
60
50
install: $(MO_FILES)
64
54
        for lang in $$languages; do \
65
55
                mkdir -p "$$targetdir/$$lang/LC_MESSAGES" || exit 1; \
66
56
                dest="$$targetdir/$$lang/LC_MESSAGES/$(TD).mo"; \
67
 
                cat="$$lang.mo"; \
 
57
                cat="$$lang.gmo"; \
68
58
                echo "installing $$cat as $$dest"; \
69
59
                cp -f $$cat $$dest && chmod 644 $$dest || exit 1; \
70
60
        done
90
80
        done
91
81
 
92
82
.SUFFIXES:
93
 
.SUFFIXES: .po .mo
 
83
.SUFFIXES: .po .gmo
94
84
 
95
 
.po.mo:
 
85
.po.gmo:
96
86
        $(MSGFMT) --check --statistics --verbose -o $@ $<
97
87