~ricmm/+junk/unity-lens_music-sc

« back to all changes in this revision

Viewing changes to po/Makefile

  • Committer: Ricardo Mendoza
  • Date: 2012-09-05 14:20:15 UTC
  • Revision ID: ricardo.mendoza@canonical.com-20120905142015-prem6hiyfshwgm8q
Initial commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Makefile for program source directory in GNU NLS utilities package.
 
2
# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
 
3
# Copyright (C) 2004-2008 Rodney Dawes <dobey.pwns@gmail.com>
 
4
#
 
5
# This file may be copied and used freely without restrictions.  It may
 
6
# be used in projects which are not available under a GNU Public License,
 
7
# but which still want to provide support for the GNU gettext functionality.
 
8
#
 
9
# - Modified by Owen Taylor <otaylor@redhat.com> to use GETTEXT_PACKAGE
 
10
#   instead of PACKAGE and to look for po2tbl in ./ not in intl/
 
11
#
 
12
# - Modified by jacob berkman <jacob@ximian.com> to install
 
13
#   Makefile.in.in and po2tbl.sed.in for use with glib-gettextize
 
14
#
 
15
# - Modified by Rodney Dawes <dobey.pwns@gmail.com> for use with intltool
 
16
#
 
17
# We have the following line for use by intltoolize:
 
18
# INTLTOOL_MAKEFILE
 
19
 
 
20
GETTEXT_PACKAGE = unity-lens-music
 
21
PACKAGE = unity-lens-music
 
22
VERSION = 6.6.0
 
23
 
 
24
SHELL = /bin/bash
 
25
 
 
26
srcdir = .
 
27
top_srcdir = ..
 
28
top_builddir = ..
 
29
 
 
30
 
 
31
prefix = /usr
 
32
exec_prefix = ${prefix}
 
33
datadir = ${datarootdir}
 
34
datarootdir = ${prefix}/share
 
35
libdir = ${prefix}/lib/x86_64-linux-gnu
 
36
DATADIRNAME = share
 
37
itlocaledir = $(prefix)/$(DATADIRNAME)/locale
 
38
subdir = po
 
39
install_sh = ${SHELL} /gentoo/home/ricmm/canonical/ps-integration/lens-work-1025333/unity-lens-music-6.6.0/install-sh
 
40
# Automake >= 1.8 provides /bin/mkdir -p.
 
41
# Until it can be supposed, use the safe fallback:
 
42
mkdir_p = $(install_sh) -d
 
43
 
 
44
INSTALL = /usr/bin/install -c
 
45
INSTALL_DATA = ${INSTALL} -m 644
 
46
 
 
47
GMSGFMT = /usr/bin/msgfmt
 
48
MSGFMT = /usr/bin/msgfmt
 
49
XGETTEXT = /usr/bin/xgettext
 
50
INTLTOOL_UPDATE = /usr/bin/intltool-update
 
51
INTLTOOL_EXTRACT = /usr/bin/intltool-extract
 
52
MSGMERGE = INTLTOOL_EXTRACT="$(INTLTOOL_EXTRACT)" XGETTEXT="$(XGETTEXT)" srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
 
53
GENPOT   = INTLTOOL_EXTRACT="$(INTLTOOL_EXTRACT)" XGETTEXT="$(XGETTEXT)" srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot
 
54
 
 
55
ALL_LINGUAS = 
 
56
 
 
57
PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; else echo "$(ALL_LINGUAS)"; fi)
 
58
 
 
59
USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep \^$$lang$$ $(srcdir)/LINGUAS 2>/dev/null`" -o -n "`echo $$ALINGUAS|tr ' ' '\n'|grep \^$$lang$$`"; then printf "$$lang "; fi; done; fi)
 
60
 
 
61
USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)" -o -n "$(LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done)
 
62
 
 
63
POFILES=$(shell LINGUAS="$(PO_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done)
 
64
 
 
65
DISTFILES = Makefile.in.in POTFILES.in $(POFILES)
 
66
EXTRA_DISTFILES = ChangeLog POTFILES.skip Makevars LINGUAS
 
67
 
 
68
POTFILES = \
 
69
        ../src/daemon.vala \
 
70
        ../src/main.vala \
 
71
        ../src/banshee-scope.vala \
 
72
        ../src/rhythmbox-scope.vala \
 
73
        ../src/simple-scope.vala \
 
74
        ../src/musicstore-scope.vala \
 
75
        ../music.lens.in.in
 
76
 
 
77
CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.gmo "; done)
 
78
 
 
79
.SUFFIXES:
 
80
.SUFFIXES: .po .pox .gmo .mo .msg .cat
 
81
 
 
82
AM_DEFAULT_VERBOSITY = 0
 
83
INTLTOOL_V_MSGFMT = $(INTLTOOL__v_MSGFMT_$(V))
 
84
INTLTOOL__v_MSGFMT_= $(INTLTOOL__v_MSGFMT_$(AM_DEFAULT_VERBOSITY))
 
85
INTLTOOL__v_MSGFMT_0 = @echo "  MSGFMT" $@;
 
86
 
 
87
.po.pox:
 
88
        $(MAKE) $(GETTEXT_PACKAGE).pot
 
89
        $(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox
 
90
 
 
91
.po.mo:
 
92
        $(INTLTOOL_V_MSGFMT)$(MSGFMT) -o $@ $<
 
93
 
 
94
.po.gmo:
 
95
        $(INTLTOOL_V_MSGFMT)file=`echo $* | sed 's,.*/,,'`.gmo \
 
96
          && rm -f $$file && $(GMSGFMT) -o $$file $<
 
97
 
 
98
.po.cat:
 
99
        sed -f ../intl/po2msg.sed < $< > $*.msg \
 
100
          && rm -f $@ && gencat $@ $*.msg
 
101
 
 
102
 
 
103
all: all-yes
 
104
 
 
105
all-yes: $(CATALOGS)
 
106
all-no:
 
107
 
 
108
$(GETTEXT_PACKAGE).pot: $(POTFILES)
 
109
        $(GENPOT)
 
110
 
 
111
install: install-data
 
112
install-data: install-data-yes
 
113
install-data-no: all
 
114
install-data-yes: all
 
115
        linguas="$(USE_LINGUAS)"; \
 
116
        for lang in $$linguas; do \
 
117
          dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \
 
118
          $(mkdir_p) $$dir; \
 
119
          if test -r $$lang.gmo; then \
 
120
            $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
 
121
            echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \
 
122
          else \
 
123
            $(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
 
124
            echo "installing $(srcdir)/$$lang.gmo as" \
 
125
                 "$$dir/$(GETTEXT_PACKAGE).mo"; \
 
126
          fi; \
 
127
          if test -r $$lang.gmo.m; then \
 
128
            $(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \
 
129
            echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \
 
130
          else \
 
131
            if test -r $(srcdir)/$$lang.gmo.m ; then \
 
132
              $(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \
 
133
                $$dir/$(GETTEXT_PACKAGE).mo.m; \
 
134
              echo "installing $(srcdir)/$$lang.gmo.m as" \
 
135
                   "$$dir/$(GETTEXT_PACKAGE).mo.m"; \
 
136
            else \
 
137
              true; \
 
138
            fi; \
 
139
          fi; \
 
140
        done
 
141
 
 
142
# Empty stubs to satisfy archaic automake needs
 
143
dvi info ctags tags CTAGS TAGS ID:
 
144
 
 
145
# Define this as empty until I found a useful application.
 
146
install-exec installcheck:
 
147
 
 
148
uninstall:
 
149
        linguas="$(USE_LINGUAS)"; \
 
150
        for lang in $$linguas; do \
 
151
          rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \
 
152
          rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \
 
153
        done
 
154
 
 
155
check: all $(GETTEXT_PACKAGE).pot
 
156
        rm -f missing notexist
 
157
        srcdir=$(srcdir) $(INTLTOOL_UPDATE) -m
 
158
        if [ -r missing -o -r notexist ]; then \
 
159
          exit 1; \
 
160
        fi
 
161
 
 
162
mostlyclean:
 
163
        rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp
 
164
        rm -f .intltool-merge-cache
 
165
 
 
166
clean: mostlyclean
 
167
 
 
168
distclean: clean
 
169
        rm -f Makefile Makefile.in POTFILES stamp-it
 
170
        rm -f *.mo *.msg *.cat *.cat.m *.gmo
 
171
 
 
172
maintainer-clean: distclean
 
173
        @echo "This command is intended for maintainers to use;"
 
174
        @echo "it deletes files that may require special tools to rebuild."
 
175
        rm -f Makefile.in.in
 
176
 
 
177
distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
 
178
dist distdir: $(DISTFILES)
 
179
        dists="$(DISTFILES)"; \
 
180
        extra_dists="$(EXTRA_DISTFILES)"; \
 
181
        for file in $$extra_dists; do \
 
182
          test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \
 
183
        done; \
 
184
        for file in $$dists; do \
 
185
          test -f $$file || file="$(srcdir)/$$file"; \
 
186
          ln $$file $(distdir) 2> /dev/null \
 
187
            || cp -p $$file $(distdir); \
 
188
        done
 
189
 
 
190
update-po: Makefile
 
191
        $(MAKE) $(GETTEXT_PACKAGE).pot
 
192
        tmpdir=`pwd`; \
 
193
        linguas="$(USE_LINGUAS)"; \
 
194
        for lang in $$linguas; do \
 
195
          echo "$$lang:"; \
 
196
          result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \
 
197
          if $$result; then \
 
198
            if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
 
199
              rm -f $$tmpdir/$$lang.new.po; \
 
200
            else \
 
201
              if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
 
202
                :; \
 
203
              else \
 
204
                echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
 
205
                rm -f $$tmpdir/$$lang.new.po; \
 
206
                exit 1; \
 
207
              fi; \
 
208
            fi; \
 
209
          else \
 
210
            echo "msgmerge for $$lang.gmo failed!"; \
 
211
            rm -f $$tmpdir/$$lang.new.po; \
 
212
          fi; \
 
213
        done
 
214
 
 
215
Makefile POTFILES: stamp-it
 
216
        @if test ! -f $@; then \
 
217
          rm -f stamp-it; \
 
218
          $(MAKE) stamp-it; \
 
219
        fi
 
220
 
 
221
stamp-it: Makefile.in.in $(top_builddir)/config.status POTFILES.in
 
222
        cd $(top_builddir) \
 
223
          && CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \
 
224
               $(SHELL) ./config.status
 
225
 
 
226
# Tell versions [3.59,3.63) of GNU make not to export all variables.
 
227
# Otherwise a system limit (for SysV at least) may be exceeded.
 
228
.NOEXPORT: