source: trunk/third/gst-plugins/po/Makefile.in.in @ 21011

Revision 21011, 10.3 KB checked in by ghudson, 20 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r21010, which included commits to RCS files with non-trunk default branches.
Line 
1# Makefile for PO directory in any package using GNU gettext.
2# Copyright (C) 1995-1997, 2000-2002 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
3#
4# This file can be copied and used freely without restrictions.  It can
5# be used in projects which are not available under the GNU General Public
6# License but which still want to provide support for the GNU gettext
7# functionality.
8# Please note that the actual code of GNU gettext is covered by the GNU
9# General Public License and is *not* in the public domain.
10
11PACKAGE = @PACKAGE@
12VERSION = @VERSION@
13
14# thomas: add GETTEXT_PACKAGE substitution as used in Makevars
15GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
16
17SHELL = /bin/sh
18@SET_MAKE@
19
20srcdir = @srcdir@
21top_srcdir = @top_srcdir@
22VPATH = @srcdir@
23
24prefix = @prefix@
25exec_prefix = @exec_prefix@
26datadir = @datadir@
27localedir = $(datadir)/locale
28gettextsrcdir = $(datadir)/gettext/po
29
30INSTALL = @INSTALL@
31INSTALL_DATA = @INSTALL_DATA@
32MKINSTALLDIRS = @MKINSTALLDIRS@
33mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac`
34
35GMSGFMT = @GMSGFMT@
36MSGFMT = @MSGFMT@
37XGETTEXT = @XGETTEXT@
38MSGMERGE = msgmerge
39MSGMERGE_UPDATE = @MSGMERGE@ --update
40MSGINIT = msginit
41MSGCONV = msgconv
42MSGFILTER = msgfilter
43
44POFILES = @POFILES@
45GMOFILES = @GMOFILES@
46UPDATEPOFILES = @UPDATEPOFILES@
47DUMMYPOFILES = @DUMMYPOFILES@
48DISTFILES.common = Makefile.in.in Makevars remove-potcdate.sin \
49$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
50DISTFILES = $(DISTFILES.common) POTFILES.in $(DOMAIN).pot \
51$(POFILES) $(GMOFILES) \
52$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
53
54POTFILES = \
55
56CATALOGS = @CATALOGS@
57
58# Makevars gets inserted here. (Don't remove this line!)
59
60.SUFFIXES:
61.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-update
62
63.po.mo:
64        @echo "$(MSGFMT) -c -o $@ $<"; \
65        $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
66
67.po.gmo:
68        @lang=`echo $* | sed -e 's,.*/,,'`; \
69        test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
70        echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \
71        cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
72
73.sin.sed:
74        sed -e '/^#/d' $< > t-$@
75        mv t-$@ $@
76
77
78all: all-@USE_NLS@
79
80all-yes: $(CATALOGS)
81all-no:
82
83# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
84# otherwise packages like GCC can not be built if only parts of the source
85# have been downloaded.
86
87$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
88        $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
89          --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \
90          --files-from=$(srcdir)/POTFILES.in \
91          --copyright-holder='$(COPYRIGHT_HOLDER)'
92        test ! -f $(DOMAIN).po || { \
93          if test -f $(srcdir)/$(DOMAIN).pot; then \
94            sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
95            sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
96            if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
97              rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
98            else \
99              rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
100              mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
101            fi; \
102          else \
103            mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
104          fi; \
105        }
106
107$(srcdir)/$(DOMAIN).pot:
108        $(MAKE) $(DOMAIN).pot-update
109
110$(POFILES): $(srcdir)/$(DOMAIN).pot
111        @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
112        test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
113        echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \
114        cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot
115
116
117install: install-exec install-data
118install-exec:
119install-data: install-data-@USE_NLS@
120        if test "$(PACKAGE)" = "gettext"; then \
121          $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
122          for file in $(DISTFILES.common); do \
123            $(INSTALL_DATA) $(srcdir)/$$file \
124                            $(DESTDIR)$(gettextsrcdir)/$$file; \
125          done; \
126        else \
127          : ; \
128        fi
129install-data-no: all
130install-data-yes: all
131        $(mkinstalldirs) $(DESTDIR)$(datadir)
132        @catalogs='$(CATALOGS)'; \
133        for cat in $$catalogs; do \
134          cat=`basename $$cat`; \
135          lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
136          dir=$(localedir)/$$lang/LC_MESSAGES; \
137          $(mkinstalldirs) $(DESTDIR)$$dir; \
138          if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
139          $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
140          echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
141          for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
142            if test -n "$$lc"; then \
143              if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
144                link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
145                mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
146                mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
147                (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
148                 for file in *; do \
149                   if test -f $$file; then \
150                     ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
151                   fi; \
152                 done); \
153                rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
154              else \
155                if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
156                  :; \
157                else \
158                  rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
159                  mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
160                fi; \
161              fi; \
162              rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
163              ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
164              ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
165              cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
166              echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \
167            fi; \
168          done; \
169        done
170
171install-strip: install
172
173installdirs: installdirs-exec installdirs-data
174installdirs-exec:
175installdirs-data: installdirs-data-@USE_NLS@
176        if test "$(PACKAGE)" = "gettext"; then \
177          $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
178        else \
179          : ; \
180        fi
181installdirs-data-no:
182installdirs-data-yes:
183        $(mkinstalldirs) $(DESTDIR)$(datadir)
184        @catalogs='$(CATALOGS)'; \
185        for cat in $$catalogs; do \
186          cat=`basename $$cat`; \
187          lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
188          dir=$(localedir)/$$lang/LC_MESSAGES; \
189          $(mkinstalldirs) $(DESTDIR)$$dir; \
190          for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
191            if test -n "$$lc"; then \
192              if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
193                link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
194                mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
195                mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
196                (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
197                 for file in *; do \
198                   if test -f $$file; then \
199                     ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
200                   fi; \
201                 done); \
202                rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
203              else \
204                if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
205                  :; \
206                else \
207                  rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
208                  mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
209                fi; \
210              fi; \
211            fi; \
212          done; \
213        done
214
215# Define this as empty until I found a useful application.
216installcheck:
217
218uninstall: uninstall-exec uninstall-data
219uninstall-exec:
220uninstall-data: uninstall-data-@USE_NLS@
221        if test "$(PACKAGE)" = "gettext"; then \
222          for file in $(DISTFILES.common); do \
223            rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
224          done; \
225        else \
226          : ; \
227        fi
228uninstall-data-no:
229uninstall-data-yes:
230        catalogs='$(CATALOGS)'; \
231        for cat in $$catalogs; do \
232          cat=`basename $$cat`; \
233          lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
234          for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \
235            rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
236          done; \
237        done
238
239check: all
240
241dvi info tags TAGS ID:
242
243mostlyclean:
244        rm -f remove-potcdate.sed
245        rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
246        rm -fr *.o
247
248clean: mostlyclean
249
250distclean: clean
251        rm -f Makefile Makefile.in POTFILES *.mo
252
253maintainer-clean: distclean
254        @echo "This command is intended for maintainers to use;"
255        @echo "it deletes files that may require special tools to rebuild."
256        rm -f $(GMOFILES)
257
258distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
259dist distdir:
260        $(MAKE) update-po
261        @$(MAKE) dist2
262# This is a separate target because 'update-po' must be executed before.
263dist2: $(DISTFILES)
264        dists="$(DISTFILES)"; \
265        if test -f $(srcdir)/ChangeLog; then dists="$$dists ChangeLog"; fi; \
266        if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
267        for file in $$dists; do \
268          if test -f $$file; then \
269            cp -p $$file $(distdir); \
270          else \
271            cp -p $(srcdir)/$$file $(distdir); \
272          fi; \
273        done
274
275update-po: Makefile
276        $(MAKE) $(DOMAIN).pot-update
277        $(MAKE) $(UPDATEPOFILES)
278        $(MAKE) update-gmo
279
280# General rule for updating PO files.
281
282.nop.po-update:
283        @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
284        if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; fi; \
285        tmpdir=`pwd`; \
286        echo "$$lang:"; \
287        test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
288        echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
289        cd $(srcdir); \
290        if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \
291          if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
292            rm -f $$tmpdir/$$lang.new.po; \
293          else \
294            if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
295              :; \
296            else \
297              echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
298              exit 1; \
299            fi; \
300          fi; \
301        else \
302          echo "msgmerge for $$lang.po failed!" 1>&2; \
303          rm -f $$tmpdir/$$lang.new.po; \
304        fi
305
306$(DUMMYPOFILES):
307
308update-gmo: Makefile $(GMOFILES)
309        @:
310
311Makefile: Makefile.in.in $(top_builddir)/config.status POTFILES.in
312        cd $(top_builddir) \
313          && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
314               $(SHELL) ./config.status
315
316force:
317
318# Tell versions [3.59,3.63) of GNU make not to export all variables.
319# Otherwise a system limit (for SysV at least) may be exceeded.
320.NOEXPORT:
Note: See TracBrowser for help on using the repository browser.