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