VirtualBox

source: kBuild/vendor/sed/current/po/Makefile.in.in

Last change on this file was 599, checked in by bird, 18 years ago

GNU sed 4.1.5.

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

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette