~ubuntu-branches/ubuntu/quantal/xarchiver/quantal

« back to all changes in this revision

Viewing changes to po/Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2009-03-19 10:51:00 UTC
  • mfrom: (1.1.9 upstream) (2.2.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090319105100-vaivcmrm3zdqqhcs
Tags: 1:0.5.2+20090319+dfsg-1
* Adding lha to suggests (Closes: #512685).
* Updating standards version to 3.8.1.
* Adding upstream target in rules.
* Adding intltool to build-depends.
* Merging upstream version 0.5.2+20090319+dfsg:
  - fixes segment violation (Closes: #517488).
* Rediffing mime-types.patch.
* Updating mime file.
* Calling desktop debhelper in rules.

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 = xarchiver
 
21
PACKAGE = xarchiver
 
22
VERSION = 0.5.2svn-r29673
 
23
 
 
24
SHELL = /bin/sh
 
25
 
 
26
srcdir = .
 
27
top_srcdir = ..
 
28
top_builddir = ..
 
29
 
 
30
 
 
31
prefix = /usr/local
 
32
exec_prefix = ${prefix}
 
33
datadir = ${datarootdir}
 
34
datarootdir = ${prefix}/share
 
35
libdir = ${exec_prefix}/lib
 
36
DATADIRNAME = share
 
37
itlocaledir = $(prefix)/$(DATADIRNAME)/locale
 
38
subdir = po
 
39
install_sh = $(SHELL) /home/user/xarchiver-0.5.2+20090319+dfsg/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_ARGS = --keyword=Q_ --from-code=UTF-8
 
50
XGETTEXT = /usr/bin/xgettext $(XGETTEXT_ARGS)
 
51
INTLTOOL_UPDATE = /usr/bin/intltool-update
 
52
INTLTOOL_EXTRACT = /usr/bin/intltool-extract
 
53
MSGMERGE = XGETTEXT_ARGS="$(XGETTEXT_ARGS)" INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
 
54
GENPOT   = XGETTEXT_ARGS="$(XGETTEXT_ARGS)" INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot
 
55
 
 
56
ALL_LINGUAS = bg ca cs da de el en_GB es eu fi fr gl hu id ja nb nl pl pt_BR pt ru sq sv tr uk
 
57
 
 
58
PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; else echo "$(ALL_LINGUAS)"; fi)
 
59
 
 
60
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)
 
61
 
 
62
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)
 
63
 
 
64
POFILES=$(shell LINGUAS="$(PO_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done)
 
65
 
 
66
DISTFILES = Makefile.in.in POTFILES.in $(POFILES)
 
67
EXTRA_DISTFILES = ChangeLog POTFILES.skip Makevars LINGUAS
 
68
 
 
69
POTFILES = \
 
70
        ../src/7zip.c \
 
71
        ../src/add_dialog.c \
 
72
        ../src/archive.c \
 
73
        ../src/arj.c \
 
74
        ../src/bzip2.c \
 
75
        ../src/window.c \
 
76
        ../src/deb.c \
 
77
        ../src/extract_dialog.c \
 
78
        ../src/gzip.c \
 
79
        ../src/lha.c \
 
80
        ../src/interface.c \
 
81
        ../src/main.c \
 
82
        ../src/open-with-dlg.c \
 
83
        ../src/new_dialog.c \
 
84
        ../src/pref_dialog.c \
 
85
        ../src/rar.c \
 
86
        ../src/rpm.c \
 
87
        ../src/tar.c \
 
88
        ../src/zip.c \
 
89
        ../xarchiver.desktop.in
 
90
 
 
91
CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.gmo "; done)
 
92
 
 
93
.SUFFIXES:
 
94
.SUFFIXES: .po .pox .gmo .mo .msg .cat
 
95
 
 
96
.po.pox:
 
97
        $(MAKE) $(GETTEXT_PACKAGE).pot
 
98
        $(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox
 
99
 
 
100
.po.mo:
 
101
        $(MSGFMT) -o $@ $<
 
102
 
 
103
.po.gmo:
 
104
        file=`echo $* | sed 's,.*/,,'`.gmo \
 
105
          && rm -f $$file && $(GMSGFMT) -o $$file $<
 
106
 
 
107
.po.cat:
 
108
        sed -f ../intl/po2msg.sed < $< > $*.msg \
 
109
          && rm -f $@ && gencat $@ $*.msg
 
110
 
 
111
 
 
112
all: all-yes
 
113
 
 
114
all-yes: $(CATALOGS)
 
115
all-no:
 
116
 
 
117
$(GETTEXT_PACKAGE).pot: $(POTFILES)
 
118
        $(GENPOT)
 
119
 
 
120
install: install-data
 
121
install-data: install-data-yes
 
122
install-data-no: all
 
123
install-data-yes: all
 
124
        linguas="$(USE_LINGUAS)"; \
 
125
        for lang in $$linguas; do \
 
126
          dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \
 
127
          $(mkdir_p) $$dir; \
 
128
          if test -r $$lang.gmo; then \
 
129
            $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
 
130
            echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \
 
131
          else \
 
132
            $(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
 
133
            echo "installing $(srcdir)/$$lang.gmo as" \
 
134
                 "$$dir/$(GETTEXT_PACKAGE).mo"; \
 
135
          fi; \
 
136
          if test -r $$lang.gmo.m; then \
 
137
            $(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \
 
138
            echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \
 
139
          else \
 
140
            if test -r $(srcdir)/$$lang.gmo.m ; then \
 
141
              $(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \
 
142
                $$dir/$(GETTEXT_PACKAGE).mo.m; \
 
143
              echo "installing $(srcdir)/$$lang.gmo.m as" \
 
144
                   "$$dir/$(GETTEXT_PACKAGE).mo.m"; \
 
145
            else \
 
146
              true; \
 
147
            fi; \
 
148
          fi; \
 
149
        done
 
150
 
 
151
# Empty stubs to satisfy archaic automake needs
 
152
dvi info tags TAGS ID:
 
153
 
 
154
# Define this as empty until I found a useful application.
 
155
install-exec installcheck:
 
156
 
 
157
uninstall:
 
158
        linguas="$(USE_LINGUAS)"; \
 
159
        for lang in $$linguas; do \
 
160
          rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \
 
161
          rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \
 
162
        done
 
163
 
 
164
check: all $(GETTEXT_PACKAGE).pot
 
165
        rm -f missing notexist
 
166
        srcdir=$(srcdir) $(INTLTOOL_UPDATE) -m
 
167
        if [ -r missing -o -r notexist ]; then \
 
168
          exit 1; \
 
169
        fi
 
170
 
 
171
mostlyclean:
 
172
        rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp
 
173
        rm -f .intltool-merge-cache
 
174
 
 
175
clean: mostlyclean
 
176
 
 
177
distclean: clean
 
178
        rm -f Makefile Makefile.in POTFILES stamp-it
 
179
        rm -f *.mo *.msg *.cat *.cat.m *.gmo
 
180
 
 
181
maintainer-clean: distclean
 
182
        @echo "This command is intended for maintainers to use;"
 
183
        @echo "it deletes files that may require special tools to rebuild."
 
184
        rm -f Makefile.in.in
 
185
 
 
186
distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
 
187
dist distdir: $(DISTFILES)
 
188
        dists="$(DISTFILES)"; \
 
189
        extra_dists="$(EXTRA_DISTFILES)"; \
 
190
        for file in $$extra_dists; do \
 
191
          test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \
 
192
        done; \
 
193
        for file in $$dists; do \
 
194
          test -f $$file || file="$(srcdir)/$$file"; \
 
195
          ln $$file $(distdir) 2> /dev/null \
 
196
            || cp -p $$file $(distdir); \
 
197
        done
 
198
 
 
199
update-po: Makefile
 
200
        $(MAKE) $(GETTEXT_PACKAGE).pot
 
201
        tmpdir=`pwd`; \
 
202
        linguas="$(USE_LINGUAS)"; \
 
203
        for lang in $$linguas; do \
 
204
          echo "$$lang:"; \
 
205
          result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \
 
206
          if $$result; then \
 
207
            if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
 
208
              rm -f $$tmpdir/$$lang.new.po; \
 
209
            else \
 
210
              if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
 
211
                :; \
 
212
              else \
 
213
                echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
 
214
                rm -f $$tmpdir/$$lang.new.po; \
 
215
                exit 1; \
 
216
              fi; \
 
217
            fi; \
 
218
          else \
 
219
            echo "msgmerge for $$lang.gmo failed!"; \
 
220
            rm -f $$tmpdir/$$lang.new.po; \
 
221
          fi; \
 
222
        done
 
223
 
 
224
Makefile POTFILES: stamp-it
 
225
        @if test ! -f $@; then \
 
226
          rm -f stamp-it; \
 
227
          $(MAKE) stamp-it; \
 
228
        fi
 
229
 
 
230
stamp-it: Makefile.in.in $(top_builddir)/config.status POTFILES.in
 
231
        cd $(top_builddir) \
 
232
          && CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \
 
233
               $(SHELL) ./config.status
 
234
 
 
235
# Tell versions [3.59,3.63) of GNU make not to export all variables.
 
236
# Otherwise a system limit (for SysV at least) may be exceeded.
 
237
.NOEXPORT: