| 1 |
# Makefile for PO directory in any package using GNU gettext. |
| 2 |
# Copyright (C) 1995-1997, 2000-2006 by Ulrich Drepper <[email protected]> |
| 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.16 |
| 12 |
|
| 13 |
PACKAGE = grhino |
| 14 |
VERSION = 0.16.1 |
| 15 |
PACKAGE_BUGREPORT = |
| 16 |
|
| 17 |
SHELL = /bin/sh |
| 18 |
|
| 19 |
|
| 20 |
srcdir = . |
| 21 |
top_srcdir = .. |
| 22 |
|
| 23 |
|
| 24 |
prefix = /usr/local |
| 25 |
exec_prefix = ${prefix} |
| 26 |
datarootdir = ${prefix}/share |
| 27 |
datadir = ${datarootdir} |
| 28 |
localedir = ${datarootdir}/locale |
| 29 |
gettextsrcdir = $(datadir)/gettext/po |
| 30 |
|
| 31 |
INSTALL = /usr/bin/install -c |
| 32 |
INSTALL_DATA = ${INSTALL} -m 644 |
| 33 |
|
| 34 |
# We use $(mkdir_p). |
| 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 |
# @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) @install_sh@ -d |
| 42 |
install_sh = $(SHELL) @install_sh@ |
| 43 |
MKDIR_P = /bin/mkdir -p |
| 44 |
mkdir_p = /bin/mkdir -p |
| 45 |
|
| 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)) |
| 58 |
MSGMERGE = msgmerge |
| 59 |
MSGMERGE_UPDATE = /usr/bin/msgmerge --update |
| 60 |
MSGINIT = msginit |
| 61 |
MSGCONV = msgconv |
| 62 |
MSGFILTER = msgfilter |
| 63 |
|
| 64 |
POFILES = en_GB.po |
| 65 |
GMOFILES = en_GB.gmo |
| 66 |
UPDATEPOFILES = en_GB.po-update |
| 67 |
DUMMYPOFILES = en_GB.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) |
| 73 |
|
| 74 |
POTFILES = \ |
| 75 |
../alphabeta.cc \ |
| 76 |
../alphabeta.h \ |
| 77 |
../binfile.cc \ |
| 78 |
../binfile.h \ |
| 79 |
../bitboard.cc \ |
| 80 |
../bitboard.h \ |
| 81 |
../board.cc \ |
| 82 |
../board.h \ |
| 83 |
../boardio.cc \ |
| 84 |
../boardio.h \ |
| 85 |
../book.cc \ |
| 86 |
../book.h \ |
| 87 |
../config.h \ |
| 88 |
../dump_pattern.cc \ |
| 89 |
../game.cc \ |
| 90 |
../game.h \ |
| 91 |
../gameinfo.cc \ |
| 92 |
../gameinfo.h \ |
| 93 |
../gen_book.cc \ |
| 94 |
../gen_opening.cc \ |
| 95 |
../gen_pattern.cc \ |
| 96 |
../gen_table.cc \ |
| 97 |
../gpref.cc \ |
| 98 |
../gpref.h \ |
| 99 |
../grhino.cc \ |
| 100 |
../gtstream.h \ |
| 101 |
../gtstream.cc \ |
| 102 |
../hash.cc \ |
| 103 |
../hash.h \ |
| 104 |
../iter.cc \ |
| 105 |
../iter.h \ |
| 106 |
../log_proc.h \ |
| 107 |
../opening.cc \ |
| 108 |
../opening-dat.h \ |
| 109 |
../opening.h \ |
| 110 |
../order.cc \ |
| 111 |
../order.h \ |
| 112 |
../parity.cc \ |
| 113 |
../parity.h \ |
| 114 |
../pattern.cc \ |
| 115 |
../pattern.h \ |
| 116 |
../proginfo.cc \ |
| 117 |
../proginfo.h \ |
| 118 |
../rand.cc \ |
| 119 |
../rand.h \ |
| 120 |
../randboard.cc \ |
| 121 |
../randboard.h \ |
| 122 |
../table-dat.h \ |
| 123 |
../test.cc |
| 124 |
|
| 125 |
CATALOGS = en_GB.gmo |
| 126 |
|
| 127 |
# Makevars gets inserted here. (Don't remove this line!) |
| 128 |
# Makefile variables for PO directory in any package using GNU gettext. |
| 129 |
|
| 130 |
# Usually the message domain is the same as the package name. |
| 131 |
DOMAIN = grhino |
| 132 |
|
| 133 |
# These two variables depend on the location of this directory. |
| 134 |
subdir = po |
| 135 |
top_builddir = .. |
| 136 |
|
| 137 |
# These options get passed to xgettext. |
| 138 |
XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ |
| 139 |
|
| 140 |
# This is the copyright holder that gets inserted into the header of the |
| 141 |
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding |
| 142 |
# package. (Note that the msgstr strings, extracted from the package's |
| 143 |
# sources, belong to the copyright holder of the package.) Translators are |
| 144 |
# expected to transfer the copyright for their translations to this person |
| 145 |
# or entity, or to disclaim their copyright. The empty string stands for |
| 146 |
# the public domain; in this case the translators are expected to disclaim |
| 147 |
# their copyright. |
| 148 |
COPYRIGHT_HOLDER = Kriang Lerdsuwanakij <[email protected]> |
| 149 |
|
| 150 |
# This is the email address or URL to which the translators shall report |
| 151 |
# bugs in the untranslated strings: |
| 152 |
# - Strings which are not entire sentences, see the maintainer guidelines |
| 153 |
# in the GNU gettext documentation, section 'Preparing Strings'. |
| 154 |
# - Strings which use unclear terms or require additional context to be |
| 155 |
# understood. |
| 156 |
# - Strings which make invalid assumptions about notation of date, time or |
| 157 |
# money. |
| 158 |
# - Pluralisation problems. |
| 159 |
# - Incorrect English spelling. |
| 160 |
# - Incorrect formatting. |
| 161 |
# It can be your email address, or a mailing list address where translators |
| 162 |
# can write to without being subscribed, or the URL of a web page through |
| 163 |
# which the translators can contact you. |
| 164 |
MSGID_BUGS_ADDRESS = [email protected] |
| 165 |
|
| 166 |
# This is the list of locale categories, beyond LC_MESSAGES, for which the |
| 167 |
# message catalogs shall be used. It is usually empty. |
| 168 |
EXTRA_LOCALE_CATEGORIES = |
| 169 |
|
| 170 |
.SUFFIXES: |
| 171 |
.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update |
| 172 |
|
| 173 |
.po.mo: |
| 174 |
@echo "$(MSGFMT) -c -o $@ $<"; \ |
| 175 |
$(MSGFMT) -c -o t-$@ $< && mv t-$@ $@ |
| 176 |
|
| 177 |
.po.gmo: |
| 178 |
@lang=`echo $* | sed -e 's,.*/,,'`; \ |
| 179 |
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ |
| 180 |
echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \ |
| 181 |
cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo |
| 182 |
|
| 183 |
.sin.sed: |
| 184 |
sed -e '/^#/d' $< > t-$@ |
| 185 |
mv t-$@ $@ |
| 186 |
|
| 187 |
|
| 188 |
all: all-yes |
| 189 |
|
| 190 |
all-yes: stamp-po |
| 191 |
all-no: |
| 192 |
|
| 193 |
# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no |
| 194 |
# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because |
| 195 |
# we don't want to bother translators with empty POT files). We assume that |
| 196 |
# LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty. |
| 197 |
# In this case, stamp-po is a nop (i.e. a phony target). |
| 198 |
|
| 199 |
# stamp-po is a timestamp denoting the last time at which the CATALOGS have |
| 200 |
# been loosely updated. Its purpose is that when a developer or translator |
| 201 |
# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS, |
| 202 |
# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent |
| 203 |
# invocations of "make" will do nothing. This timestamp would not be necessary |
| 204 |
# if updating the $(CATALOGS) would always touch them; however, the rule for |
| 205 |
# $(POFILES) has been designed to not touch files that don't need to be |
| 206 |
# changed. |
| 207 |
stamp-po: $(srcdir)/$(DOMAIN).pot |
| 208 |
test ! -f $(srcdir)/$(DOMAIN).pot || \ |
| 209 |
test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES) |
| 210 |
@test ! -f $(srcdir)/$(DOMAIN).pot || { \ |
| 211 |
echo "touch stamp-po" && \ |
| 212 |
echo timestamp > stamp-poT && \ |
| 213 |
mv stamp-poT stamp-po; \ |
| 214 |
} |
| 215 |
|
| 216 |
# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update', |
| 217 |
# otherwise packages like GCC can not be built if only parts of the source |
| 218 |
# have been downloaded. |
| 219 |
|
| 220 |
# This target rebuilds $(DOMAIN).pot; it is an expensive operation. |
| 221 |
# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed. |
| 222 |
$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed |
| 223 |
if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \ |
| 224 |
msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ |
| 225 |
else \ |
| 226 |
msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \ |
| 227 |
fi; \ |
| 228 |
$(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ |
| 229 |
--add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \ |
| 230 |
--files-from=$(srcdir)/POTFILES.in \ |
| 231 |
--copyright-holder='$(COPYRIGHT_HOLDER)' \ |
| 232 |
--msgid-bugs-address="$$msgid_bugs_address" |
| 233 |
test ! -f $(DOMAIN).po || { \ |
| 234 |
if test -f $(srcdir)/$(DOMAIN).pot; then \ |
| 235 |
sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ |
| 236 |
sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \ |
| 237 |
if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \ |
| 238 |
rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \ |
| 239 |
else \ |
| 240 |
rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \ |
| 241 |
mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ |
| 242 |
fi; \ |
| 243 |
else \ |
| 244 |
mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ |
| 245 |
fi; \ |
| 246 |
} |
| 247 |
|
| 248 |
# This rule has no dependencies: we don't need to update $(DOMAIN).pot at |
| 249 |
# every "make" invocation, only create it when it is missing. |
| 250 |
# Only "make $(DOMAIN).pot-update" or "make dist" will force an update. |
| 251 |
$(srcdir)/$(DOMAIN).pot: |
| 252 |
$(MAKE) $(DOMAIN).pot-update |
| 253 |
|
| 254 |
# This target rebuilds a PO file if $(DOMAIN).pot has changed. |
| 255 |
# Note that a PO file is not touched if it doesn't need to be changed. |
| 256 |
$(POFILES): $(srcdir)/$(DOMAIN).pot |
| 257 |
@lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ |
| 258 |
if test -f "$(srcdir)/$${lang}.po"; then \ |
| 259 |
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ |
| 260 |
echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ |
| 261 |
cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \ |
| 262 |
else \ |
| 263 |
$(MAKE) $${lang}.po-create; \ |
| 264 |
fi |
| 265 |
|
| 266 |
|
| 267 |
install: install-exec install-data |
| 268 |
install-exec: |
| 269 |
install-data: install-data-yes |
| 270 |
if test "$(PACKAGE)" = "gettext-tools"; then \ |
| 271 |
$(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ |
| 272 |
for file in $(DISTFILES.common) Makevars.template; do \ |
| 273 |
$(INSTALL_DATA) $(srcdir)/$$file \ |
| 274 |
$(DESTDIR)$(gettextsrcdir)/$$file; \ |
| 275 |
done; \ |
| 276 |
for file in Makevars; do \ |
| 277 |
rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ |
| 278 |
done; \ |
| 279 |
else \ |
| 280 |
: ; \ |
| 281 |
fi |
| 282 |
install-data-no: all |
| 283 |
install-data-yes: all |
| 284 |
$(mkdir_p) $(DESTDIR)$(datadir) |
| 285 |
@catalogs='$(CATALOGS)'; \ |
| 286 |
for cat in $$catalogs; do \ |
| 287 |
cat=`basename $$cat`; \ |
| 288 |
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ |
| 289 |
dir=$(localedir)/$$lang/LC_MESSAGES; \ |
| 290 |
$(mkdir_p) $(DESTDIR)$$dir; \ |
| 291 |
if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \ |
| 292 |
$(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \ |
| 293 |
echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \ |
| 294 |
for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ |
| 295 |
if test -n "$$lc"; then \ |
| 296 |
if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ |
| 297 |
link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ |
| 298 |
mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ |
| 299 |
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ |
| 300 |
(cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ |
| 301 |
for file in *; do \ |
| 302 |
if test -f $$file; then \ |
| 303 |
ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ |
| 304 |
fi; \ |
| 305 |
done); \ |
| 306 |
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ |
| 307 |
else \ |
| 308 |
if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ |
| 309 |
:; \ |
| 310 |
else \ |
| 311 |
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ |
| 312 |
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ |
| 313 |
fi; \ |
| 314 |
fi; \ |
| 315 |
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ |
| 316 |
ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ |
| 317 |
ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ |
| 318 |
cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ |
| 319 |
echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \ |
| 320 |
fi; \ |
| 321 |
done; \ |
| 322 |
done |
| 323 |
|
| 324 |
install-strip: install |
| 325 |
|
| 326 |
installdirs: installdirs-exec installdirs-data |
| 327 |
installdirs-exec: |
| 328 |
installdirs-data: installdirs-data-yes |
| 329 |
if test "$(PACKAGE)" = "gettext-tools"; then \ |
| 330 |
$(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ |
| 331 |
else \ |
| 332 |
: ; \ |
| 333 |
fi |
| 334 |
installdirs-data-no: |
| 335 |
installdirs-data-yes: |
| 336 |
$(mkdir_p) $(DESTDIR)$(datadir) |
| 337 |
@catalogs='$(CATALOGS)'; \ |
| 338 |
for cat in $$catalogs; do \ |
| 339 |
cat=`basename $$cat`; \ |
| 340 |
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ |
| 341 |
dir=$(localedir)/$$lang/LC_MESSAGES; \ |
| 342 |
$(mkdir_p) $(DESTDIR)$$dir; \ |
| 343 |
for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ |
| 344 |
if test -n "$$lc"; then \ |
| 345 |
if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ |
| 346 |
link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ |
| 347 |
mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ |
| 348 |
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ |
| 349 |
(cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ |
| 350 |
for file in *; do \ |
| 351 |
if test -f $$file; then \ |
| 352 |
ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ |
| 353 |
fi; \ |
| 354 |
done); \ |
| 355 |
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ |
| 356 |
else \ |
| 357 |
if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ |
| 358 |
:; \ |
| 359 |
else \ |
| 360 |
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ |
| 361 |
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ |
| 362 |
fi; \ |
| 363 |
fi; \ |
| 364 |
fi; \ |
| 365 |
done; \ |
| 366 |
done |
| 367 |
|
| 368 |
# Define this as empty until I found a useful application. |
| 369 |
installcheck: |
| 370 |
|
| 371 |
uninstall: uninstall-exec uninstall-data |
| 372 |
uninstall-exec: |
| 373 |
uninstall-data: uninstall-data-yes |
| 374 |
if test "$(PACKAGE)" = "gettext-tools"; then \ |
| 375 |
for file in $(DISTFILES.common) Makevars.template; do \ |
| 376 |
rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ |
| 377 |
done; \ |
| 378 |
else \ |
| 379 |
: ; \ |
| 380 |
fi |
| 381 |
uninstall-data-no: |
| 382 |
uninstall-data-yes: |
| 383 |
catalogs='$(CATALOGS)'; \ |
| 384 |
for cat in $$catalogs; do \ |
| 385 |
cat=`basename $$cat`; \ |
| 386 |
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ |
| 387 |
for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \ |
| 388 |
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ |
| 389 |
done; \ |
| 390 |
done |
| 391 |
|
| 392 |
check: all |
| 393 |
|
| 394 |
info dvi ps pdf html tags TAGS ctags CTAGS ID: |
| 395 |
|
| 396 |
mostlyclean: |
| 397 |
rm -f remove-potcdate.sed |
| 398 |
rm -f stamp-poT |
| 399 |
rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po |
| 400 |
rm -fr *.o |
| 401 |
|
| 402 |
clean: mostlyclean |
| 403 |
|
| 404 |
distclean: clean |
| 405 |
rm -f Makefile Makefile.in POTFILES *.mo |
| 406 |
|
| 407 |
maintainer-clean: distclean |
| 408 |
@echo "This command is intended for maintainers to use;" |
| 409 |
@echo "it deletes files that may require special tools to rebuild." |
| 410 |
rm -f stamp-po $(GMOFILES) |
| 411 |
|
| 412 |
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) |
| 413 |
dist distdir: |
| 414 |
$(MAKE) update-po |
| 415 |
@$(MAKE) dist2 |
| 416 |
# This is a separate target because 'update-po' must be executed before. |
| 417 |
dist2: stamp-po $(DISTFILES) |
| 418 |
dists="$(DISTFILES)"; \ |
| 419 |
if test "$(PACKAGE)" = "gettext-tools"; then \ |
| 420 |
dists="$$dists Makevars.template"; \ |
| 421 |
fi; \ |
| 422 |
if test -f $(srcdir)/$(DOMAIN).pot; then \ |
| 423 |
dists="$$dists $(DOMAIN).pot stamp-po"; \ |
| 424 |
fi; \ |
| 425 |
if test -f $(srcdir)/ChangeLog; then \ |
| 426 |
dists="$$dists ChangeLog"; \ |
| 427 |
fi; \ |
| 428 |
for i in 0 1 2 3 4 5 6 7 8 9; do \ |
| 429 |
if test -f $(srcdir)/ChangeLog.$$i; then \ |
| 430 |
dists="$$dists ChangeLog.$$i"; \ |
| 431 |
fi; \ |
| 432 |
done; \ |
| 433 |
if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \ |
| 434 |
for file in $$dists; do \ |
| 435 |
if test -f $$file; then \ |
| 436 |
cp -p $$file $(distdir) || exit 1; \ |
| 437 |
else \ |
| 438 |
cp -p $(srcdir)/$$file $(distdir) || exit 1; \ |
| 439 |
fi; \ |
| 440 |
done |
| 441 |
|
| 442 |
update-po: Makefile |
| 443 |
$(MAKE) $(DOMAIN).pot-update |
| 444 |
test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES) |
| 445 |
$(MAKE) update-gmo |
| 446 |
|
| 447 |
# General rule for creating PO files. |
| 448 |
|
| 449 |
.nop.po-create: |
| 450 |
@lang=`echo $@ | sed -e 's/\.po-create$$//'`; \ |
| 451 |
echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \ |
| 452 |
exit 1 |
| 453 |
|
| 454 |
# General rule for updating PO files. |
| 455 |
|
| 456 |
.nop.po-update: |
| 457 |
@lang=`echo $@ | sed -e 's/\.po-update$$//'`; \ |
| 458 |
if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \ |
| 459 |
tmpdir=`pwd`; \ |
| 460 |
echo "$$lang:"; \ |
| 461 |
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ |
| 462 |
echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ |
| 463 |
cd $(srcdir); \ |
| 464 |
if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \ |
| 465 |
if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ |
| 466 |
rm -f $$tmpdir/$$lang.new.po; \ |
| 467 |
else \ |
| 468 |
if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ |
| 469 |
:; \ |
| 470 |
else \ |
| 471 |
echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ |
| 472 |
exit 1; \ |
| 473 |
fi; \ |
| 474 |
fi; \ |
| 475 |
else \ |
| 476 |
echo "msgmerge for $$lang.po failed!" 1>&2; \ |
| 477 |
rm -f $$tmpdir/$$lang.new.po; \ |
| 478 |
fi |
| 479 |
|
| 480 |
$(DUMMYPOFILES): |
| 481 |
|
| 482 |
update-gmo: Makefile $(GMOFILES) |
| 483 |
@: |
| 484 |
|
| 485 |
Makefile: Makefile.in.in Makevars $(top_builddir)/config.status POTFILES.in |
| 486 |
cd $(top_builddir) \ |
| 487 |
&& $(SHELL) ./config.status $(subdir)/[email protected] po-directories |
| 488 |
|
| 489 |
force: |
| 490 |
|
| 491 |
# Tell versions [3.59,3.63) of GNU make not to export all variables. |
| 492 |
# Otherwise a system limit (for SysV at least) may be exceeded. |
| 493 |
.NOEXPORT: |
| 494 |
# Special Makefile rules for English message catalogs with quotation marks. |
| 495 |
|
| 496 |
DISTFILES.common.extra1 = quot.sed boldquot.sed [email protected] [email protected] insert-header.sin Rules-quot |
| 497 |
|
| 498 |
.SUFFIXES: .insert-header .po-update-en |
| 499 |
|
| 500 |
[email protected]: |
| 501 |
$(MAKE) [email protected] |
| 502 |
[email protected]: |
| 503 |
$(MAKE) [email protected] |
| 504 |
|
| 505 |
[email protected]: [email protected] |
| 506 |
[email protected]: [email protected] |
| 507 |
|
| 508 |
.insert-header.po-update-en: |
| 509 |
@lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \ |
| 510 |
if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \ |
| 511 |
tmpdir=`pwd`; \ |
| 512 |
echo "$$lang:"; \ |
| 513 |
ll=`echo $$lang | sed -e 's/@.*//'`; \ |
| 514 |
LC_ALL=C; export LC_ALL; \ |
| 515 |
cd $(srcdir); \ |
| 516 |
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 \ |
| 517 |
if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ |
| 518 |
rm -f $$tmpdir/$$lang.new.po; \ |
| 519 |
else \ |
| 520 |
if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ |
| 521 |
:; \ |
| 522 |
else \ |
| 523 |
echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ |
| 524 |
exit 1; \ |
| 525 |
fi; \ |
| 526 |
fi; \ |
| 527 |
else \ |
| 528 |
echo "creation of $$lang.po failed!" 1>&2; \ |
| 529 |
rm -f $$tmpdir/$$lang.new.po; \ |
| 530 |
fi |
| 531 |
|
| 532 |
[email protected]: insert-header.sin |
| 533 |
sed -e '/^#/d' -e 's/HEADER/[email protected]/g' $(srcdir)/insert-header.sin > [email protected] |
| 534 |
|
| 535 |
[email protected]: insert-header.sin |
| 536 |
sed -e '/^#/d' -e 's/HEADER/[email protected]/g' $(srcdir)/insert-header.sin > [email protected] |
| 537 |
|
| 538 |
mostlyclean: mostlyclean-quot |
| 539 |
mostlyclean-quot: |
| 540 |
rm -f *.insert-header |