Fix compilation with wxWidgets 2.8.12
[amule.git] / po / Makefile.in.in
blob879fc7a242c1812a4cdbd4706db1746ef3698b07
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>
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 datarootdir = @datarootdir@
25 localedir = $(datadir)/locale
26 gettextsrcdir = $(datadir)/gettext/po
28 INSTALL = @INSTALL@
29 INSTALL_DATA = @INSTALL_DATA@
30 MKINSTALLDIRS = @MKINSTALLDIRS@
31 mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac`
33 GMSGFMT = @GMSGFMT@
34 MSGFMT = @MSGFMT@
35 XGETTEXT = @XGETTEXT@
36 MSGMERGE = msgmerge
37 MSGMERGE_UPDATE = @MSGMERGE@ --update
38 MSGINIT = msginit
39 MSGCONV = msgconv
40 MSGFILTER = msgfilter
42 POFILES = @POFILES@
43 GMOFILES = @GMOFILES@
44 UPDATEPOFILES = @UPDATEPOFILES@
45 DUMMYPOFILES = @DUMMYPOFILES@
46 DISTFILES.common = Makefile.in.in Makevars remove-potcdate.sin \
47 $(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
48 DISTFILES = $(DISTFILES.common) POTFILES.in $(DOMAIN).pot \
49 $(POFILES) $(GMOFILES) \
50 $(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
52 POTFILES = \
54 CATALOGS = @CATALOGS@
56 # Makevars gets inserted here. (Don't remove this line!)
58 .SUFFIXES:
59 .SUFFIXES: .po .gmo .mo .sed .sin .nop .po-update
61 .po.mo:
62         @echo "$(MSGFMT) -c -o $@ $<"; \
63         $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
65 .po.gmo:
66         @lang=`echo $* | sed -e 's,.*/,,'`; \
67         test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
68         echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \
69         cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
71 .sin.sed:
72         sed -e '/^#/d' $< > t-$@
73         mv t-$@ $@
76 all: all-@USE_NLS@
78 all-yes: $(CATALOGS)
79 all-no:
81 # Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
82 # otherwise packages like GCC can not be built if only parts of the source
83 # have been downloaded.
85 $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
86         $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
87           --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \
88           --files-from=$(srcdir)/POTFILES.in \
89           --copyright-holder='$(COPYRIGHT_HOLDER)'
90         test ! -f $(DOMAIN).po || { \
91           if test -f $(srcdir)/$(DOMAIN).pot; then \
92             sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
93             sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
94             if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
95               rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
96             else \
97               rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
98               mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
99             fi; \
100           else \
101             mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
102           fi; \
103         }
105 $(srcdir)/$(DOMAIN).pot:
106         $(MAKE) $(DOMAIN).pot-update
108 $(POFILES): $(srcdir)/$(DOMAIN).pot
109         @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
110         test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
111         echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \
112         cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot
115 install: install-exec install-data
116 install-exec:
117 install-data: install-data-@USE_NLS@
118         if test "$(PACKAGE)" = "gettext"; then \
119           $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
120           for file in $(DISTFILES.common); do \
121             $(INSTALL_DATA) $(srcdir)/$$file \
122                             $(DESTDIR)$(gettextsrcdir)/$$file; \
123           done; \
124         else \
125           : ; \
126         fi
127 install-data-no: all
128 install-data-yes: all
129         $(mkinstalldirs) $(DESTDIR)$(datadir)
130         @catalogs='$(CATALOGS)'; \
131         for cat in $$catalogs; do \
132           cat=`basename $$cat`; \
133           lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
134           dir=$(localedir)/$$lang/LC_MESSAGES; \
135           $(mkinstalldirs) $(DESTDIR)$$dir; \
136           if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
137           $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
138           echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
139           for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
140             if test -n "$$lc"; then \
141               if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
142                 link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
143                 mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
144                 mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
145                 (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
146                  for file in *; do \
147                    if test -f $$file; then \
148                      ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
149                    fi; \
150                  done); \
151                 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
152               else \
153                 if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
154                   :; \
155                 else \
156                   rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
157                   mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
158                 fi; \
159               fi; \
160               rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
161               ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
162               ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
163               cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
164               echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \
165             fi; \
166           done; \
167         done
169 install-strip: install
171 installdirs: installdirs-exec installdirs-data
172 installdirs-exec:
173 installdirs-data: installdirs-data-@USE_NLS@
174         if test "$(PACKAGE)" = "gettext"; then \
175           $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
176         else \
177           : ; \
178         fi
179 installdirs-data-no:
180 installdirs-data-yes:
181         $(mkinstalldirs) $(DESTDIR)$(datadir)
182         @catalogs='$(CATALOGS)'; \
183         for cat in $$catalogs; do \
184           cat=`basename $$cat`; \
185           lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
186           dir=$(localedir)/$$lang/LC_MESSAGES; \
187           $(mkinstalldirs) $(DESTDIR)$$dir; \
188           for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
189             if test -n "$$lc"; then \
190               if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
191                 link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
192                 mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
193                 mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
194                 (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
195                  for file in *; do \
196                    if test -f $$file; then \
197                      ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
198                    fi; \
199                  done); \
200                 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
201               else \
202                 if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
203                   :; \
204                 else \
205                   rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
206                   mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
207                 fi; \
208               fi; \
209             fi; \
210           done; \
211         done
213 # Define this as empty until I found a useful application.
214 installcheck:
216 uninstall: uninstall-exec uninstall-data
217 uninstall-exec:
218 uninstall-data: uninstall-data-@USE_NLS@
219         if test "$(PACKAGE)" = "gettext"; then \
220           for file in $(DISTFILES.common); do \
221             rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
222           done; \
223         else \
224           : ; \
225         fi
226 uninstall-data-no:
227 uninstall-data-yes:
228         catalogs='$(CATALOGS)'; \
229         for cat in $$catalogs; do \
230           cat=`basename $$cat`; \
231           lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
232           for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \
233             rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
234           done; \
235         done
237 check: all
239 dvi info tags TAGS ID:
241 mostlyclean:
242         rm -f remove-potcdate.sed
243         rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
244         rm -fr *.o
246 clean: mostlyclean
247         rm -f *.gmo
249 distclean: clean
250         rm -f Makefile Makefile.in POTFILES *.mo
252 maintainer-clean: distclean
253         @echo "This command is intended for maintainers to use;"
254         @echo "it deletes files that may require special tools to rebuild."
255         rm -f $(GMOFILES)
257 distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
258 dist distdir:
259         $(MAKE) update-po
260         @$(MAKE) dist2
261 # This is a separate target because 'update-po' must be executed before.
262 dist2: $(DISTFILES)
263         dists="$(DISTFILES)"; \
264         if test -f $(srcdir)/ChangeLog; then dists="$$dists ChangeLog"; fi; \
265         if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
266         for file in $$dists; do \
267           if test -f $$file; then \
268             cp -p $$file $(distdir); \
269           else \
270             cp -p $(srcdir)/$$file $(distdir); \
271           fi; \
272         done
274 update-po: Makefile
275         $(MAKE) $(DOMAIN).pot-update
276         $(MAKE) $(UPDATEPOFILES)
277         $(MAKE) update-gmo
279 # General rule for updating PO files.
281 .nop.po-update:
282         @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
283         if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; fi; \
284         tmpdir=`pwd`; \
285         echo "$$lang:"; \
286         test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
287         echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
288         cd $(srcdir); \
289         if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \
290           if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
291             rm -f $$tmpdir/$$lang.new.po; \
292           else \
293             if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
294               :; \
295             else \
296               echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
297               exit 1; \
298             fi; \
299           fi; \
300         else \
301           echo "msgmerge for $$lang.po failed!" 1>&2; \
302           rm -f $$tmpdir/$$lang.new.po; \
303         fi
305 $(DUMMYPOFILES):
307 update-gmo: Makefile $(GMOFILES)
308         @:
310 Makefile: Makefile.in.in $(top_builddir)/config.status POTFILES.in
311         cd $(top_builddir) \
312           && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
313                $(SHELL) ./config.status
315 force:
317 # Tell versions [3.59,3.63) of GNU make not to export all variables.
318 # Otherwise a system limit (for SysV at least) may be exceeded.
319 .NOEXPORT: