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>
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.
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/
12
# - Modified by jacob berkman <jacob@ximian.com> to install
13
# Makefile.in.in and po2tbl.sed.in for use with glib-gettextize
15
# - Modified by Rodney Dawes <dobey.pwns@gmail.com> for use with intltool
17
# We have the following line for use by intltoolize:
20
GETTEXT_PACKAGE = xarchiver
22
VERSION = 0.5.2svn-r29673
32
exec_prefix = ${prefix}
33
datadir = ${datarootdir}
34
datarootdir = ${prefix}/share
35
libdir = ${exec_prefix}/lib
37
itlocaledir = $(prefix)/$(DATADIRNAME)/locale
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
44
INSTALL = /usr/bin/install -c
45
INSTALL_DATA = ${INSTALL} -m 644
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
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
58
PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; else echo "$(ALL_LINGUAS)"; fi)
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)
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)
64
POFILES=$(shell LINGUAS="$(PO_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done)
66
DISTFILES = Makefile.in.in POTFILES.in $(POFILES)
67
EXTRA_DISTFILES = ChangeLog POTFILES.skip Makevars LINGUAS
77
../src/extract_dialog.c \
82
../src/open-with-dlg.c \
84
../src/pref_dialog.c \
89
../xarchiver.desktop.in
91
CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.gmo "; done)
94
.SUFFIXES: .po .pox .gmo .mo .msg .cat
97
$(MAKE) $(GETTEXT_PACKAGE).pot
98
$(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox
104
file=`echo $* | sed 's,.*/,,'`.gmo \
105
&& rm -f $$file && $(GMSGFMT) -o $$file $<
108
sed -f ../intl/po2msg.sed < $< > $*.msg \
109
&& rm -f $@ && gencat $@ $*.msg
117
$(GETTEXT_PACKAGE).pot: $(POTFILES)
120
install: install-data
121
install-data: install-data-yes
123
install-data-yes: all
124
linguas="$(USE_LINGUAS)"; \
125
for lang in $$linguas; do \
126
dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \
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"; \
132
$(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
133
echo "installing $(srcdir)/$$lang.gmo as" \
134
"$$dir/$(GETTEXT_PACKAGE).mo"; \
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"; \
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"; \
151
# Empty stubs to satisfy archaic automake needs
152
dvi info tags TAGS ID:
154
# Define this as empty until I found a useful application.
155
install-exec installcheck:
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; \
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 \
172
rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp
173
rm -f .intltool-merge-cache
178
rm -f Makefile Makefile.in POTFILES stamp-it
179
rm -f *.mo *.msg *.cat *.cat.m *.gmo
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."
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"; \
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); \
200
$(MAKE) $(GETTEXT_PACKAGE).pot
202
linguas="$(USE_LINGUAS)"; \
203
for lang in $$linguas; do \
205
result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \
207
if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
208
rm -f $$tmpdir/$$lang.new.po; \
210
if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
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; \
219
echo "msgmerge for $$lang.gmo failed!"; \
220
rm -f $$tmpdir/$$lang.new.po; \
224
Makefile POTFILES: stamp-it
225
@if test ! -f $@; then \
230
stamp-it: Makefile.in.in $(top_builddir)/config.status POTFILES.in
232
&& CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \
233
$(SHELL) ./config.status
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.