r999: maintainers added to README_en.
[cinelerra_cv/mob.git] / po / Makefile.in.in
blobba906aa84d6840ad4efe4651fab8dec736ba1ed6
1 # Makefile for PO directory in any package using GNU gettext.
2 # Copyright (C) 1995-1997, 2000-2003 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
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.
11 PACKAGE = @PACKAGE@
12 VERSION = @VERSION@
14 SHELL = /bin/sh
15 @SET_MAKE@
17 srcdir = @srcdir@
18 top_srcdir = @top_srcdir@
19 VPATH = @srcdir@
21 prefix = @prefix@
22 exec_prefix = @exec_prefix@
23 datadir = @datadir@
24 localedir = $(datadir)/locale
25 gettextsrcdir = $(datadir)/gettext/po
27 INSTALL = @INSTALL@
28 INSTALL_DATA = @INSTALL_DATA@
29 mkinstalldirs = mkdir -m 0755 -p --
31 GMSGFMT = @GMSGFMT@
32 MSGFMT = @MSGFMT@
33 XGETTEXT = @XGETTEXT@
34 MSGMERGE = msgmerge
35 MSGMERGE_UPDATE = @MSGMERGE@ --update
36 MSGINIT = msginit
37 MSGCONV = msgconv
38 MSGFILTER = msgfilter
40 POFILES = @POFILES@
41 GMOFILES = @GMOFILES@
42 UPDATEPOFILES = @UPDATEPOFILES@
43 DUMMYPOFILES = @DUMMYPOFILES@
44 DISTFILES.common = Makefile.in.in remove-potcdate.sin \
45 $(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
46 DISTFILES = $(DISTFILES.common) Makevars POTFILES.in $(DOMAIN).pot stamp-po \
47 $(POFILES) $(GMOFILES) \
48 $(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
50 POTFILES = \
52 CATALOGS = @CATALOGS@
54 # Makevars gets inserted here. (Don't remove this line!)
56 .SUFFIXES:
57 .SUFFIXES: .po .gmo .mo .sed .sin .nop .po-update
59 .po.mo:
60         @echo "$(MSGFMT) -c -o $@ $<"; \
61         $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
63 .po.gmo:
64         @lang=`echo $* | sed -e 's,.*/,,'`; \
65         test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
66         echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \
67         cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
69 .sin.sed:
70         sed -e '/^#/d' $< > t-$@
71         mv t-$@ $@
74 all: all-@USE_NLS@
76 all-yes: stamp-po
77 all-no:
79 # stamp-po is a timestamp denoting the last time at which the CATALOGS have
80 # been loosely updated. Its purpose is that when a developer or translator
81 # checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
82 # "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent
83 # invocations of "make" will do nothing. This timestamp would not be necessary
84 # if updating the $(CATALOGS) would always touch them; however, the rule for
85 # $(POFILES) has been designed to not touch files that don't need to be
86 # changed.
87 stamp-po: $(srcdir)/$(DOMAIN).pot
88         test -z "$(CATALOGS)" || $(MAKE) $(CATALOGS)
89         @echo "touch stamp-po"
90         @echo timestamp > stamp-poT
91         @mv stamp-poT stamp-po
93 # Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
94 # otherwise packages like GCC can not be built if only parts of the source
95 # have been downloaded.
97 # This target rebuilds $(DOMAIN).pot; it is an expensive operation.
98 # Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
99 $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
100         $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
101           --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \
102           --files-from=$(srcdir)/POTFILES.in \
103           --copyright-holder='$(COPYRIGHT_HOLDER)' \
104           --msgid-bugs-address='$(MSGID_BUGS_ADDRESS)'
105         test ! -f $(DOMAIN).po || { \
106           if test -f $(srcdir)/$(DOMAIN).pot; then \
107             sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
108             sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
109             if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
110               rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
111             else \
112               rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
113               mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
114             fi; \
115           else \
116             mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
117           fi; \
118         }
120 # This rule has no dependencies: we don't need to update $(DOMAIN).pot at
121 # every "make" invocation, only create it when it is missing.
122 # Only "make $(DOMAIN).pot-update" or "make dist" will force an update.
123 $(srcdir)/$(DOMAIN).pot:
124         $(MAKE) $(DOMAIN).pot-update
126 # This target rebuilds a PO file if $(DOMAIN).pot has changed.
127 # Note that a PO file is not touched if it doesn't need to be changed.
128 $(POFILES): $(srcdir)/$(DOMAIN).pot
129         @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
130         test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
131         echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \
132         cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot
135 install: install-exec install-data
136 install-exec:
137 install-data: install-data-@USE_NLS@
138         if test "$(PACKAGE)" = "gettext-tools"; then \
139           $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
140           for file in $(DISTFILES.common) Makevars.template; do \
141             $(INSTALL_DATA) $(srcdir)/$$file \
142                             $(DESTDIR)$(gettextsrcdir)/$$file; \
143           done; \
144           for file in Makevars; do \
145             rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
146           done; \
147         else \
148           : ; \
149         fi
150 install-data-no: all
151 install-data-yes: all
152         $(mkinstalldirs) $(DESTDIR)$(datadir)
153         @catalogs='$(CATALOGS)'; \
154         for cat in $$catalogs; do \
155           cat=`basename $$cat`; \
156           lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
157           dir=$(localedir)/$$lang/LC_MESSAGES; \
158           $(mkinstalldirs) $(DESTDIR)$$dir; \
159           if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
160           $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
161           echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
162           for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
163             if test -n "$$lc"; then \
164               if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
165                 link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
166                 mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
167                 mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
168                 (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
169                  for file in *; do \
170                    if test -f $$file; then \
171                      ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
172                    fi; \
173                  done); \
174                 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
175               else \
176                 if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
177                   :; \
178                 else \
179                   rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
180                   mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
181                 fi; \
182               fi; \
183               rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
184               ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
185               ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
186               cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
187               echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \
188             fi; \
189           done; \
190         done
192 install-strip: install
194 installdirs: installdirs-exec installdirs-data
195 installdirs-exec:
196 installdirs-data: installdirs-data-@USE_NLS@
197         if test "$(PACKAGE)" = "gettext-tools"; then \
198           $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
199         else \
200           : ; \
201         fi
202 installdirs-data-no:
203 installdirs-data-yes:
204         $(mkinstalldirs) $(DESTDIR)$(datadir)
205         @catalogs='$(CATALOGS)'; \
206         for cat in $$catalogs; do \
207           cat=`basename $$cat`; \
208           lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
209           dir=$(localedir)/$$lang/LC_MESSAGES; \
210           $(mkinstalldirs) $(DESTDIR)$$dir; \
211           for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
212             if test -n "$$lc"; then \
213               if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
214                 link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
215                 mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
216                 mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
217                 (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
218                  for file in *; do \
219                    if test -f $$file; then \
220                      ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
221                    fi; \
222                  done); \
223                 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
224               else \
225                 if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
226                   :; \
227                 else \
228                   rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
229                   mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
230                 fi; \
231               fi; \
232             fi; \
233           done; \
234         done
236 # Define this as empty until I found a useful application.
237 installcheck:
239 uninstall: uninstall-exec uninstall-data
240 uninstall-exec:
241 uninstall-data: uninstall-data-@USE_NLS@
242         if test "$(PACKAGE)" = "gettext-tools"; then \
243           for file in $(DISTFILES.common) Makevars.template; do \
244             rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
245           done; \
246         else \
247           : ; \
248         fi
249 uninstall-data-no:
250 uninstall-data-yes:
251         catalogs='$(CATALOGS)'; \
252         for cat in $$catalogs; do \
253           cat=`basename $$cat`; \
254           lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
255           for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \
256             rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
257           done; \
258         done
260 check: all
262 info dvi ps pdf html tags TAGS ctags CTAGS ID:
264 mostlyclean:
265         rm -f remove-potcdate.sed
266         rm -f stamp-poT
267         rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
268         rm -fr *.o
270 clean: mostlyclean
272 distclean: clean
273         rm -f Makefile Makefile.in POTFILES *.mo
275 maintainer-clean: distclean
276         @echo "This command is intended for maintainers to use;"
277         @echo "it deletes files that may require special tools to rebuild."
278         rm -f stamp-po $(GMOFILES)
280 distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
281 dist distdir:
282         $(MAKE) update-po
283         @$(MAKE) dist2
284 # This is a separate target because 'update-po' must be executed before.
285 dist2: $(DISTFILES)
286         dists="$(DISTFILES)"; \
287         if test "$(PACKAGE)" = "gettext-tools"; then \
288           dists="$$dists Makevars.template"; \
289         fi; \
290         if test -f $(srcdir)/ChangeLog; then \
291           dists="$$dists ChangeLog"; \
292         fi; \
293         for i in 0 1 2 3 4 5 6 7 8 9; do \
294           if test -f $(srcdir)/ChangeLog.$$i; then \
295             dists="$$dists ChangeLog.$$i"; \
296           fi; \
297         done; \
298         if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
299         for file in $$dists; do \
300           if test -f $$file; then \
301             cp -p $$file $(distdir); \
302           else \
303             cp -p $(srcdir)/$$file $(distdir); \
304           fi; \
305         done
307 update-po: Makefile
308         $(MAKE) $(DOMAIN).pot-update
309         test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
310         $(MAKE) update-gmo
312 # General rule for updating PO files.
314 .nop.po-update:
315         @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
316         if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \
317         tmpdir=`pwd`; \
318         echo "$$lang:"; \
319         test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
320         echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
321         cd $(srcdir); \
322         if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \
323           if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
324             rm -f $$tmpdir/$$lang.new.po; \
325           else \
326             if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
327               :; \
328             else \
329               echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
330               exit 1; \
331             fi; \
332           fi; \
333         else \
334           echo "msgmerge for $$lang.po failed!" 1>&2; \
335           rm -f $$tmpdir/$$lang.new.po; \
336         fi
338 $(DUMMYPOFILES):
340 update-gmo: Makefile $(GMOFILES)
341         @:
343 Makefile: Makefile.in.in $(top_builddir)/config.status @POMAKEFILEDEPS@
344         cd $(top_builddir) \
345           && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
346                $(SHELL) ./config.status
348 force:
350 # Tell versions [3.59,3.63) of GNU make not to export all variables.
351 # Otherwise a system limit (for SysV at least) may be exceeded.
352 .NOEXPORT: