1 # Makefile for PO directory in any package using GNU gettext.
2 # Copyright (C) 1995-1997, 2000-2006 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
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 # Origin: gettext-0.16
15 PACKAGE_BUGREPORT
= lasse.collin@tukaani.org
24 prefix = /home
/ham
/src_4708
/BCM_SDK
/6_30_143
/src
/router
/squashfs-4.2
25 exec_prefix = ${prefix}
26 datarootdir
= ${prefix}/share
27 datadir = ${datarootdir}
28 localedir
= ${datarootdir}/locale
29 gettextsrcdir
= $(datadir)/gettext
/po
31 INSTALL
= /usr
/bin
/install -c
32 INSTALL_DATA
= ${INSTALL} -m
644
35 # In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as
36 # "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions,
37 # ${SHELL} /home/ham/src_4708/BCM_SDK/6_30_143/src/tools/misc/xz/build-aux/install-sh does not start with $(SHELL), so we add it.
38 # In automake >= 1.10, /bin/mkdir -p is derived from ${MKDIR_P}, which is defined
39 # either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake
40 # versions, $(mkinstalldirs) and $(install_sh) are unused.
41 mkinstalldirs
= $(SHELL
) ${SHELL} /home
/ham
/src_4708
/BCM_SDK
/6_30_143
/src
/tools
/misc
/xz
/build-aux
/install-sh
-d
42 install_sh
= $(SHELL
) ${SHELL} /home
/ham
/src_4708
/BCM_SDK
/6_30_143
/src
/tools
/misc
/xz
/build-aux
/install-sh
43 MKDIR_P
= /bin
/mkdir
-p
44 mkdir_p
= /bin
/mkdir
-p
46 GMSGFMT_
= /usr
/bin
/msgfmt
47 GMSGFMT_no
= /usr
/bin
/msgfmt
48 GMSGFMT_yes
= /usr
/bin
/msgfmt
49 GMSGFMT
= $(GMSGFMT_
$(USE_MSGCTXT
))
50 MSGFMT_
= /usr
/bin
/msgfmt
51 MSGFMT_no
= /usr
/bin
/msgfmt
52 MSGFMT_yes
= /usr
/bin
/msgfmt
53 MSGFMT
= $(MSGFMT_
$(USE_MSGCTXT
))
54 XGETTEXT_
= /usr
/bin
/xgettext
55 XGETTEXT_no
= /usr
/bin
/xgettext
56 XGETTEXT_yes
= /usr
/bin
/xgettext
57 XGETTEXT
= $(XGETTEXT_
$(USE_MSGCTXT
))
59 MSGMERGE_UPDATE
= /usr
/bin
/msgmerge
--update
64 POFILES
= cs.po de.po fr.po it.po pl.po
65 GMOFILES
= cs.gmo de.gmo fr.gmo it.gmo pl.gmo
66 UPDATEPOFILES
= cs.po-update de.po-update fr.po-update it.po-update pl.po-update
67 DUMMYPOFILES
= cs.nop de.nop fr.nop it.nop pl.nop
68 DISTFILES.common
= Makefile.in.in remove-potcdate.sin \
69 $(DISTFILES.common.extra1
) $(DISTFILES.common.extra2
) $(DISTFILES.common.extra3
)
70 DISTFILES
= $(DISTFILES.common
) Makevars POTFILES.in \
71 $(POFILES
) $(GMOFILES
) \
72 $(DISTFILES.extra1
) $(DISTFILES.extra2
) $(DISTFILES.extra3
)
78 ..
/src
/xz
/hardware.c \
86 ..
/src
/common
/tuklib_exit.c
88 CATALOGS
= cs.gmo de.gmo fr.gmo it.gmo pl.gmo
90 # Makevars gets inserted here. (Don't remove this line!)
91 # Makefile variables for PO directory in any package using GNU gettext.
93 # Usually the message domain is the same as the package name.
96 # These two variables depend on the location of this directory.
100 # These options get passed to xgettext.
101 XGETTEXT_OPTIONS
= --keyword
=_
--keyword
=N_
103 # This is the copyright holder that gets inserted into the header of the
104 # $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
105 # package. (Note that the msgstr strings, extracted from the package's
106 # sources, belong to the copyright holder of the package.) Translators are
107 # expected to transfer the copyright for their translations to this person
108 # or entity, or to disclaim their copyright. The empty string stands for
109 # the public domain; in this case the translators are expected to disclaim
113 # This is the email address or URL to which the translators shall report
114 # bugs in the untranslated strings:
115 # - Strings which are not entire sentences, see the maintainer guidelines
116 # in the GNU gettext documentation, section 'Preparing Strings'.
117 # - Strings which use unclear terms or require additional context to be
119 # - Strings which make invalid assumptions about notation of date, time or
121 # - Pluralisation problems.
122 # - Incorrect English spelling.
123 # - Incorrect formatting.
124 # It can be your email address, or a mailing list address where translators
125 # can write to without being subscribed, or the URL of a web page through
126 # which the translators can contact you.
129 # This is the list of locale categories, beyond LC_MESSAGES, for which the
130 # message catalogs shall be used. It is usually empty.
131 EXTRA_LOCALE_CATEGORIES
=
133 # Although you may need slightly wider terminal than 80 chars, it is
134 # much nicer to edit the output of --help when this is set.
135 XGETTEXT_OPTIONS
+= --no-wrap
136 MSGMERGE
+= --no-wrap
139 .SUFFIXES
: .po .gmo .mo .sed .sin .nop .po-create .po-update
142 @echo
"$(MSGFMT) -c -o $@ $<"; \
143 $(MSGFMT
) -c
-o t-
$@
$< && mv t-
$@
$@
146 @lang
=`echo $* | sed -e 's,.*/,,'`; \
147 test "$(srcdir)" = .
&& cdcmd
="" || cdcmd
="cd $(srcdir) && "; \
148 echo
"$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \
149 cd
$(srcdir) && rm -f
$${lang}.gmo
&& $(GMSGFMT
) -c
--statistics
-o t-
$${lang}.gmo
$${lang}.po
&& mv t-
$${lang}.gmo
$${lang}.gmo
152 sed
-e
'/^#/d' $< > t-
$@
161 # $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no
162 # internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because
163 # we don't want to bother translators with empty POT files). We assume that
164 # LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty.
165 # In this case, stamp-po is a nop (i.e. a phony target).
167 # stamp-po is a timestamp denoting the last time at which the CATALOGS have
168 # been loosely updated. Its purpose is that when a developer or translator
169 # checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
170 # "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent
171 # invocations of "make" will do nothing. This timestamp would not be necessary
172 # if updating the $(CATALOGS) would always touch them; however, the rule for
173 # $(POFILES) has been designed to not touch files that don't need to be
175 stamp-po
: $(srcdir)/$(DOMAIN
).pot
176 test ! -f
$(srcdir)/$(DOMAIN
).pot || \
177 test -z
"$(GMOFILES)" ||
$(MAKE
) $(GMOFILES
)
178 @
test ! -f
$(srcdir)/$(DOMAIN
).pot ||
{ \
179 echo
"touch stamp-po" && \
180 echo timestamp
> stamp-poT
&& \
181 mv stamp-poT stamp-po
; \
184 # Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
185 # otherwise packages like GCC can not be built if only parts of the source
186 # have been downloaded.
188 # This target rebuilds $(DOMAIN).pot; it is an expensive operation.
189 # Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
190 $(DOMAIN
).pot-update
: $(POTFILES
) $(srcdir)/POTFILES.in remove-potcdate.sed
191 if
test -n
'$(MSGID_BUGS_ADDRESS)' ||
test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT
'@'; then \
192 msgid_bugs_address
='$(MSGID_BUGS_ADDRESS)'; \
194 msgid_bugs_address
='$(PACKAGE_BUGREPORT)'; \
196 $(XGETTEXT
) --default-domain
=$(DOMAIN
) --directory
=$(top_srcdir
) \
197 --add-comments
=TRANSLATORS
: $(XGETTEXT_OPTIONS
) \
198 --files-from
=$(srcdir)/POTFILES.in \
199 --copyright-holder
='$(COPYRIGHT_HOLDER)' \
200 --msgid-bugs-address
="$$msgid_bugs_address"
201 test ! -f
$(DOMAIN
).po ||
{ \
202 if
test -f
$(srcdir)/$(DOMAIN
).pot
; then \
203 sed
-f remove-potcdate.sed
< $(srcdir)/$(DOMAIN
).pot
> $(DOMAIN
).1po
&& \
204 sed
-f remove-potcdate.sed
< $(DOMAIN
).po
> $(DOMAIN
).2po
&& \
205 if cmp
$(DOMAIN
).1po
$(DOMAIN
).2po
>/dev
/null
2>&1; then \
206 rm -f
$(DOMAIN
).1po
$(DOMAIN
).2po
$(DOMAIN
).po
; \
208 rm -f
$(DOMAIN
).1po
$(DOMAIN
).2po
$(srcdir)/$(DOMAIN
).pot
&& \
209 mv
$(DOMAIN
).po
$(srcdir)/$(DOMAIN
).pot
; \
212 mv
$(DOMAIN
).po
$(srcdir)/$(DOMAIN
).pot
; \
216 # This rule has no dependencies: we don't need to update $(DOMAIN).pot at
217 # every "make" invocation, only create it when it is missing.
218 # Only "make $(DOMAIN).pot-update" or "make dist" will force an update.
219 $(srcdir)/$(DOMAIN
).pot
:
220 $(MAKE
) $(DOMAIN
).pot-update
222 # This target rebuilds a PO file if $(DOMAIN).pot has changed.
223 # Note that a PO file is not touched if it doesn't need to be changed.
224 $(POFILES
): $(srcdir)/$(DOMAIN
).pot
225 @lang
=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
226 if
test -f
"$(srcdir)/$${lang}.po"; then \
227 test "$(srcdir)" = .
&& cdcmd
="" || cdcmd
="cd $(srcdir) && "; \
228 echo
"$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \
229 cd
$(srcdir) && $(MSGMERGE_UPDATE
) $${lang}.po
$(DOMAIN
).pot
; \
231 $(MAKE
) $${lang}.po-create
; \
235 install: install-exec install-data
237 install-data
: install-data-yes
238 if
test "$(PACKAGE)" = "gettext-tools"; then \
239 $(mkdir_p
) $(DESTDIR
)$(gettextsrcdir
); \
240 for file in
$(DISTFILES.common
) Makevars.template
; do \
241 $(INSTALL_DATA
) $(srcdir)/$$file \
242 $(DESTDIR
)$(gettextsrcdir
)/$$file; \
244 for file in Makevars
; do \
245 rm -f
$(DESTDIR
)$(gettextsrcdir
)/$$file; \
251 install-data-yes
: all
252 $(mkdir_p
) $(DESTDIR
)$(datadir)
253 @catalogs
='$(CATALOGS)'; \
254 for cat in
$$catalogs; do \
255 cat
=`basename $$cat`; \
256 lang
=`echo $$cat | sed -e 's/\.gmo$$//'`; \
257 dir=$(localedir
)/$$lang/LC_MESSAGES
; \
258 $(mkdir_p
) $(DESTDIR
)$$dir; \
259 if
test -r
$$cat; then realcat
=$$cat; else realcat
=$(srcdir)/$$cat; fi
; \
260 $(INSTALL_DATA
) $$realcat $(DESTDIR
)$$dir/$(DOMAIN
).mo
; \
261 echo
"installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
262 for lc in
'' $(EXTRA_LOCALE_CATEGORIES
); do \
263 if
test -n
"$$lc"; then \
264 if
(cd
$(DESTDIR
)$(localedir
)/$$lang && LC_ALL
=C ls
-l
-d
$$lc 2>/dev
/null
) | grep
' -> ' >/dev
/null
; then \
265 link
=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
266 mv
$(DESTDIR
)$(localedir
)/$$lang/$$lc $(DESTDIR
)$(localedir
)/$$lang/$$lc.old
; \
267 mkdir
$(DESTDIR
)$(localedir
)/$$lang/$$lc; \
268 (cd
$(DESTDIR
)$(localedir
)/$$lang/$$lc.old
&& \
270 if
test -f
$$file; then \
271 ln
-s ..
/$$link/$$file $(DESTDIR
)$(localedir
)/$$lang/$$lc/$$file; \
274 rm -f
$(DESTDIR
)$(localedir
)/$$lang/$$lc.old
; \
276 if
test -d
$(DESTDIR
)$(localedir
)/$$lang/$$lc; then \
279 rm -f
$(DESTDIR
)$(localedir
)/$$lang/$$lc; \
280 mkdir
$(DESTDIR
)$(localedir
)/$$lang/$$lc; \
283 rm -f
$(DESTDIR
)$(localedir
)/$$lang/$$lc/$(DOMAIN
).mo
; \
284 ln
-s ..
/LC_MESSAGES
/$(DOMAIN
).mo
$(DESTDIR
)$(localedir
)/$$lang/$$lc/$(DOMAIN
).mo
2>/dev
/null || \
285 ln
$(DESTDIR
)$(localedir
)/$$lang/LC_MESSAGES
/$(DOMAIN
).mo
$(DESTDIR
)$(localedir
)/$$lang/$$lc/$(DOMAIN
).mo
2>/dev
/null || \
286 cp
-p
$(DESTDIR
)$(localedir
)/$$lang/LC_MESSAGES
/$(DOMAIN
).mo
$(DESTDIR
)$(localedir
)/$$lang/$$lc/$(DOMAIN
).mo
; \
287 echo
"installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \
292 install-strip
: install
294 installdirs: installdirs-exec installdirs-data
296 installdirs-data
: installdirs-data-yes
297 if
test "$(PACKAGE)" = "gettext-tools"; then \
298 $(mkdir_p
) $(DESTDIR
)$(gettextsrcdir
); \
303 installdirs-data-yes
:
304 $(mkdir_p
) $(DESTDIR
)$(datadir)
305 @catalogs
='$(CATALOGS)'; \
306 for cat in
$$catalogs; do \
307 cat
=`basename $$cat`; \
308 lang
=`echo $$cat | sed -e 's/\.gmo$$//'`; \
309 dir=$(localedir
)/$$lang/LC_MESSAGES
; \
310 $(mkdir_p
) $(DESTDIR
)$$dir; \
311 for lc in
'' $(EXTRA_LOCALE_CATEGORIES
); do \
312 if
test -n
"$$lc"; then \
313 if
(cd
$(DESTDIR
)$(localedir
)/$$lang && LC_ALL
=C ls
-l
-d
$$lc 2>/dev
/null
) | grep
' -> ' >/dev
/null
; then \
314 link
=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
315 mv
$(DESTDIR
)$(localedir
)/$$lang/$$lc $(DESTDIR
)$(localedir
)/$$lang/$$lc.old
; \
316 mkdir
$(DESTDIR
)$(localedir
)/$$lang/$$lc; \
317 (cd
$(DESTDIR
)$(localedir
)/$$lang/$$lc.old
&& \
319 if
test -f
$$file; then \
320 ln
-s ..
/$$link/$$file $(DESTDIR
)$(localedir
)/$$lang/$$lc/$$file; \
323 rm -f
$(DESTDIR
)$(localedir
)/$$lang/$$lc.old
; \
325 if
test -d
$(DESTDIR
)$(localedir
)/$$lang/$$lc; then \
328 rm -f
$(DESTDIR
)$(localedir
)/$$lang/$$lc; \
329 mkdir
$(DESTDIR
)$(localedir
)/$$lang/$$lc; \
336 # Define this as empty until I found a useful application.
339 uninstall: uninstall-exec uninstall-data
341 uninstall-data
: uninstall-data-yes
342 if
test "$(PACKAGE)" = "gettext-tools"; then \
343 for file in
$(DISTFILES.common
) Makevars.template
; do \
344 rm -f
$(DESTDIR
)$(gettextsrcdir
)/$$file; \
351 catalogs
='$(CATALOGS)'; \
352 for cat in
$$catalogs; do \
353 cat
=`basename $$cat`; \
354 lang
=`echo $$cat | sed -e 's/\.gmo$$//'`; \
355 for lc in LC_MESSAGES
$(EXTRA_LOCALE_CATEGORIES
); do \
356 rm -f
$(DESTDIR
)$(localedir
)/$$lang/$$lc/$(DOMAIN
).mo
; \
362 info dvi ps pdf html
tags TAGS ctags CTAGS ID
:
365 rm -f remove-potcdate.sed
367 rm -f core core.
* $(DOMAIN
).po
$(DOMAIN
).1po
$(DOMAIN
).2po
*.new.po
373 rm -f Makefile Makefile.in POTFILES
*.mo
375 maintainer-clean
: distclean
376 @echo
"This command is intended for maintainers to use;"
377 @echo
"it deletes files that may require special tools to rebuild."
378 rm -f stamp-po
$(GMOFILES
)
380 distdir
= $(top_builddir
)/$(PACKAGE
)-$(VERSION
)/$(subdir
)
384 # This is a separate target because 'update-po' must be executed before.
385 dist2
: stamp-po
$(DISTFILES
)
386 dists
="$(DISTFILES)"; \
387 if
test "$(PACKAGE)" = "gettext-tools"; then \
388 dists
="$$dists Makevars.template"; \
390 if
test -f
$(srcdir)/$(DOMAIN
).pot
; then \
391 dists
="$$dists $(DOMAIN).pot stamp-po"; \
393 if
test -f
$(srcdir)/ChangeLog
; then \
394 dists
="$$dists ChangeLog"; \
396 for i in
0 1 2 3 4 5 6 7 8 9; do \
397 if
test -f
$(srcdir)/ChangeLog.
$$i; then \
398 dists
="$$dists ChangeLog.$$i"; \
401 if
test -f
$(srcdir)/LINGUAS
; then dists
="$$dists LINGUAS"; fi
; \
402 for file in
$$dists; do \
403 if
test -f
$$file; then \
404 cp
-p
$$file $(distdir
) || exit
1; \
406 cp
-p
$(srcdir)/$$file $(distdir
) || exit
1; \
411 $(MAKE
) $(DOMAIN
).pot-update
412 test -z
"$(UPDATEPOFILES)" ||
$(MAKE
) $(UPDATEPOFILES
)
415 # General rule for creating PO files.
418 @lang
=`echo $@ | sed -e 's/\.po-create$$//'`; \
419 echo
"File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \
422 # General rule for updating PO files.
425 @lang
=`echo $@ | sed -e 's/\.po-update$$//'`; \
426 if
test "$(PACKAGE)" = "gettext-tools"; then PATH
=`pwd`/..
/src
:$$PATH; fi
; \
429 test "$(srcdir)" = .
&& cdcmd
="" || cdcmd
="cd $(srcdir) && "; \
430 echo
"$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
432 if
$(MSGMERGE
) $$lang.po
$(DOMAIN
).pot
-o
$$tmpdir/$$lang.new.po
; then \
433 if cmp
$$lang.po
$$tmpdir/$$lang.new.po
>/dev
/null
2>&1; then \
434 rm -f
$$tmpdir/$$lang.new.po
; \
436 if mv
-f
$$tmpdir/$$lang.new.po
$$lang.po
; then \
439 echo
"msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
444 echo
"msgmerge for $$lang.po failed!" 1>&2; \
445 rm -f
$$tmpdir/$$lang.new.po
; \
450 update-gmo
: Makefile
$(GMOFILES
)
453 Makefile
: Makefile.in.in Makevars
$(top_builddir
)/config.status POTFILES.in LINGUAS
455 && $(SHELL
) .
/config.status
$(subdir
)/$@.in po-directories
459 # Tell versions [3.59,3.63) of GNU make not to export all variables.
460 # Otherwise a system limit (for SysV at least) may be exceeded.
462 # Special Makefile rules for English message catalogs with quotation marks.
464 DISTFILES.common.extra1
= quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot
466 .SUFFIXES
: .insert-header .po-update-en
469 $(MAKE
) en@quot.po-update
470 en@boldquot.po-create
:
471 $(MAKE
) en@boldquot.po-update
473 en@quot.po-update
: en@quot.po-update-en
474 en@boldquot.po-update
: en@boldquot.po-update-en
476 .insert-header.po-update-en
:
477 @lang
=`echo $@ | sed -e 's/\.po-update-en$$//'`; \
478 if
test "$(PACKAGE)" = "gettext"; then PATH
=`pwd`/..
/src
:$$PATH; GETTEXTLIBDIR
=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR
; fi
; \
481 ll
=`echo $$lang | sed -e 's/@.*//'`; \
482 LC_ALL
=C
; export LC_ALL
; \
484 if
$(MSGINIT
) -i
$(DOMAIN
).pot
--no-translator
-l
$$ll -o
- 2>/dev
/null | sed
-f
$$tmpdir/$$lang.insert-header |
$(MSGCONV
) -t UTF-8 |
$(MSGFILTER
) sed
-f
`echo $$lang | sed -e 's/.*@//'`.sed
2>/dev
/null
> $$tmpdir/$$lang.new.po
; then \
485 if cmp
$$lang.po
$$tmpdir/$$lang.new.po
>/dev
/null
2>&1; then \
486 rm -f
$$tmpdir/$$lang.new.po
; \
488 if mv
-f
$$tmpdir/$$lang.new.po
$$lang.po
; then \
491 echo
"creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
496 echo
"creation of $$lang.po failed!" 1>&2; \
497 rm -f
$$tmpdir/$$lang.new.po
; \
500 en@quot.insert-header
: insert-header.sin
501 sed
-e
'/^#/d' -e
's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin
> en@quot.insert-header
503 en@boldquot.insert-header
: insert-header.sin
504 sed
-e
'/^#/d' -e
's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin
> en@boldquot.insert-header
506 mostlyclean: mostlyclean-quot
508 rm -f
*.insert-header