Releasing debian version 0.6.3-1.
[debian/lxappearance.git] / po / Makefile.in.in
CommitLineData
08024023
DB
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>
eddc0c49 3# Copyright (C) 2004-2008 Rodney Dawes <dobey.pwns@gmail.com>
08024023 4#
eddc0c49
DB
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,
08024023 7# but which still want to provide support for the GNU gettext functionality.
08024023
DB
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
eddc0c49
DB
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
08024023
DB
19
20GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
21PACKAGE = @PACKAGE@
22VERSION = @VERSION@
23
eddc0c49 24SHELL = @SHELL@
08024023
DB
25
26srcdir = @srcdir@
27top_srcdir = @top_srcdir@
eddc0c49 28top_builddir = @top_builddir@
08024023
DB
29VPATH = @srcdir@
30
31prefix = @prefix@
32exec_prefix = @exec_prefix@
08024023 33datadir = @datadir@
eddc0c49 34datarootdir = @datarootdir@
08024023 35libdir = @libdir@
1d775636 36localedir = @localedir@
08024023 37subdir = po
eddc0c49
DB
38install_sh = @install_sh@
39# Automake >= 1.8 provides @mkdir_p@.
40# Until it can be supposed, use the safe fallback:
41mkdir_p = $(install_sh) -d
08024023
DB
42
43INSTALL = @INSTALL@
44INSTALL_DATA = @INSTALL_DATA@
08024023 45
08024023
DB
46GMSGFMT = @GMSGFMT@
47MSGFMT = @MSGFMT@
08024023 48XGETTEXT = @XGETTEXT@
eddc0c49
DB
49INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
50INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
7f605299
DB
51MSGMERGE = INTLTOOL_EXTRACT="$(INTLTOOL_EXTRACT)" XGETTEXT="$(XGETTEXT)" srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
52GENPOT = INTLTOOL_EXTRACT="$(INTLTOOL_EXTRACT)" XGETTEXT="$(XGETTEXT)" srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot
eddc0c49
DB
53
54ALL_LINGUAS = @ALL_LINGUAS@
55
56PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; else echo "$(ALL_LINGUAS)"; fi)
08024023 57
8df2f63a 58USER_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)
08024023 59
eddc0c49 60USE_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)
08024023 61
eddc0c49 62POFILES=$(shell LINGUAS="$(PO_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done)
08024023 63
eddc0c49
DB
64DISTFILES = Makefile.in.in POTFILES.in $(POFILES)
65EXTRA_DISTFILES = ChangeLog POTFILES.skip Makevars LINGUAS
08024023
DB
66
67POTFILES = \
eddc0c49 68# This comment gets stripped out
08024023 69
eddc0c49 70CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.gmo "; done)
08024023
DB
71
72.SUFFIXES:
eddc0c49 73.SUFFIXES: .po .pox .gmo .mo .msg .cat
08024023 74
7f605299
DB
75AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
76INTLTOOL_V_MSGFMT = $(INTLTOOL__v_MSGFMT_$(V))
77INTLTOOL__v_MSGFMT_= $(INTLTOOL__v_MSGFMT_$(AM_DEFAULT_VERBOSITY))
78INTLTOOL__v_MSGFMT_0 = @echo " MSGFMT" $@;
79
08024023
DB
80.po.pox:
81 $(MAKE) $(GETTEXT_PACKAGE).pot
1d775636 82 $(MSGMERGE) $* $(GETTEXT_PACKAGE).pot -o $*.pox
08024023
DB
83
84.po.mo:
7f605299 85 $(INTLTOOL_V_MSGFMT)$(MSGFMT) -o $@ $<
08024023
DB
86
87.po.gmo:
7f605299 88 $(INTLTOOL_V_MSGFMT)file=`echo $* | sed 's,.*/,,'`.gmo \
eddc0c49 89 && rm -f $$file && $(GMSGFMT) -o $$file $<
08024023
DB
90
91.po.cat:
92 sed -f ../intl/po2msg.sed < $< > $*.msg \
eddc0c49 93 && rm -f $@ && gencat $@ $*.msg
08024023
DB
94
95
96all: all-@USE_NLS@
97
98all-yes: $(CATALOGS)
99all-no:
100
eddc0c49
DB
101$(GETTEXT_PACKAGE).pot: $(POTFILES)
102 $(GENPOT)
103
104install: install-data
08024023
DB
105install-data: install-data-@USE_NLS@
106install-data-no: all
107install-data-yes: all
eddc0c49
DB
108 linguas="$(USE_LINGUAS)"; \
109 for lang in $$linguas; do \
1d775636 110 dir=$(DESTDIR)$(localedir)/$$lang/LC_MESSAGES; \
eddc0c49
DB
111 $(mkdir_p) $$dir; \
112 if test -r $$lang.gmo; then \
113 $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
114 echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \
08024023 115 else \
eddc0c49
DB
116 $(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
117 echo "installing $(srcdir)/$$lang.gmo as" \
118 "$$dir/$(GETTEXT_PACKAGE).mo"; \
08024023 119 fi; \
eddc0c49
DB
120 if test -r $$lang.gmo.m; then \
121 $(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \
122 echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \
08024023 123 else \
eddc0c49
DB
124 if test -r $(srcdir)/$$lang.gmo.m ; then \
125 $(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \
126 $$dir/$(GETTEXT_PACKAGE).mo.m; \
127 echo "installing $(srcdir)/$$lang.gmo.m as" \
128 "$$dir/$(GETTEXT_PACKAGE).mo.m"; \
08024023
DB
129 else \
130 true; \
131 fi; \
132 fi; \
133 done
eddc0c49
DB
134
135# Empty stubs to satisfy archaic automake needs
1469f737 136dvi info ctags tags CTAGS TAGS ID:
08024023
DB
137
138# Define this as empty until I found a useful application.
eddc0c49 139install-exec installcheck:
08024023
DB
140
141uninstall:
eddc0c49
DB
142 linguas="$(USE_LINGUAS)"; \
143 for lang in $$linguas; do \
1d775636
AG
144 rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \
145 rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \
08024023 146 done
08024023 147
eddc0c49
DB
148check: all $(GETTEXT_PACKAGE).pot
149 rm -f missing notexist
150 srcdir=$(srcdir) $(INTLTOOL_UPDATE) -m
151 if [ -r missing -o -r notexist ]; then \
152 exit 1; \
153 fi
08024023
DB
154
155mostlyclean:
eddc0c49
DB
156 rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp
157 rm -f .intltool-merge-cache
08024023
DB
158
159clean: mostlyclean
160
161distclean: clean
eddc0c49
DB
162 rm -f Makefile Makefile.in POTFILES stamp-it
163 rm -f *.mo *.msg *.cat *.cat.m *.gmo
08024023
DB
164
165maintainer-clean: distclean
166 @echo "This command is intended for maintainers to use;"
167 @echo "it deletes files that may require special tools to rebuild."
eddc0c49 168 rm -f Makefile.in.in
08024023 169
eddc0c49
DB
170distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
171dist distdir: $(DISTFILES)
08024023 172 dists="$(DISTFILES)"; \
eddc0c49
DB
173 extra_dists="$(EXTRA_DISTFILES)"; \
174 for file in $$extra_dists; do \
175 test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \
176 done; \
08024023 177 for file in $$dists; do \
eddc0c49
DB
178 test -f $$file || file="$(srcdir)/$$file"; \
179 ln $$file $(distdir) 2> /dev/null \
180 || cp -p $$file $(distdir); \
08024023
DB
181 done
182
183update-po: Makefile
184 $(MAKE) $(GETTEXT_PACKAGE).pot
185 tmpdir=`pwd`; \
eddc0c49
DB
186 linguas="$(USE_LINGUAS)"; \
187 for lang in $$linguas; do \
08024023 188 echo "$$lang:"; \
eddc0c49
DB
189 result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \
190 if $$result; then \
191 if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
08024023
DB
192 rm -f $$tmpdir/$$lang.new.po; \
193 else \
194 if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
195 :; \
196 else \
197 echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
198 rm -f $$tmpdir/$$lang.new.po; \
199 exit 1; \
200 fi; \
201 fi; \
202 else \
eddc0c49 203 echo "msgmerge for $$lang.gmo failed!"; \
08024023
DB
204 rm -f $$tmpdir/$$lang.new.po; \
205 fi; \
206 done
207
eddc0c49
DB
208Makefile POTFILES: stamp-it
209 @if test ! -f $@; then \
210 rm -f stamp-it; \
211 $(MAKE) stamp-it; \
212 fi
213
214stamp-it: Makefile.in.in $(top_builddir)/config.status POTFILES.in
215 cd $(top_builddir) \
216 && CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \
08024023
DB
217 $(SHELL) ./config.status
218
219# Tell versions [3.59,3.63) of GNU make not to export all variables.
220# Otherwise a system limit (for SysV at least) may be exceeded.
221.NOEXPORT: