annotate CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/share/gettext/po/Makefile.in.in @ 68:5028fdace37b

planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author jpayne
date Tue, 18 Mar 2025 16:23:26 -0400
parents
children
rev   line source
jpayne@68 1 # Makefile for PO directory in any package using GNU gettext.
jpayne@68 2 # Copyright (C) 1995-2000 Ulrich Drepper <drepper@gnu.ai.mit.edu>
jpayne@68 3 # Copyright (C) 2000-2023 Free Software Foundation, Inc.
jpayne@68 4 #
jpayne@68 5 # Copying and distribution of this file, with or without modification,
jpayne@68 6 # are permitted in any medium without royalty provided the copyright
jpayne@68 7 # notice and this notice are preserved. This file is offered as-is,
jpayne@68 8 # without any warranty.
jpayne@68 9 #
jpayne@68 10 # Origin: gettext-0.22
jpayne@68 11 GETTEXT_MACRO_VERSION = 0.20
jpayne@68 12
jpayne@68 13 PACKAGE = @PACKAGE@
jpayne@68 14 VERSION = @VERSION@
jpayne@68 15 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
jpayne@68 16
jpayne@68 17 SED = @SED@
jpayne@68 18 SHELL = /bin/sh
jpayne@68 19 @SET_MAKE@
jpayne@68 20
jpayne@68 21 srcdir = @srcdir@
jpayne@68 22 top_srcdir = @top_srcdir@
jpayne@68 23 VPATH = @srcdir@
jpayne@68 24
jpayne@68 25 prefix = @prefix@
jpayne@68 26 exec_prefix = @exec_prefix@
jpayne@68 27 datarootdir = @datarootdir@
jpayne@68 28 datadir = @datadir@
jpayne@68 29 localedir = @localedir@
jpayne@68 30 gettextsrcdir = $(datadir)/gettext/po
jpayne@68 31
jpayne@68 32 INSTALL = @INSTALL@
jpayne@68 33 INSTALL_DATA = @INSTALL_DATA@
jpayne@68 34
jpayne@68 35 # We use $(mkdir_p).
jpayne@68 36 # In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as
jpayne@68 37 # "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions,
jpayne@68 38 # @install_sh@ does not start with $(SHELL), so we add it.
jpayne@68 39 # In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined
jpayne@68 40 # either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake
jpayne@68 41 # versions, $(mkinstalldirs) and $(install_sh) are unused.
jpayne@68 42 mkinstalldirs = $(SHELL) @install_sh@ -d
jpayne@68 43 install_sh = $(SHELL) @install_sh@
jpayne@68 44 MKDIR_P = @MKDIR_P@
jpayne@68 45 mkdir_p = @mkdir_p@
jpayne@68 46
jpayne@68 47 # When building gettext-tools, we prefer to use the built programs
jpayne@68 48 # rather than installed programs. However, we can't do that when we
jpayne@68 49 # are cross compiling.
jpayne@68 50 CROSS_COMPILING = @CROSS_COMPILING@
jpayne@68 51
jpayne@68 52 GMSGFMT_ = @GMSGFMT@
jpayne@68 53 GMSGFMT_no = @GMSGFMT@
jpayne@68 54 GMSGFMT_yes = @GMSGFMT_015@
jpayne@68 55 GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT))
jpayne@68 56 XGETTEXT_ = @XGETTEXT@
jpayne@68 57 XGETTEXT_no = @XGETTEXT@
jpayne@68 58 XGETTEXT_yes = @XGETTEXT_015@
jpayne@68 59 XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT))
jpayne@68 60 MSGMERGE = @MSGMERGE@
jpayne@68 61 MSGMERGE_UPDATE = @MSGMERGE@ --update
jpayne@68 62 MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@
jpayne@68 63 MSGINIT = msginit
jpayne@68 64 MSGCONV = msgconv
jpayne@68 65 MSGFILTER = msgfilter
jpayne@68 66
jpayne@68 67 POFILES = @POFILES@
jpayne@68 68 GMOFILES = @GMOFILES@
jpayne@68 69 UPDATEPOFILES = @UPDATEPOFILES@
jpayne@68 70 DUMMYPOFILES = @DUMMYPOFILES@
jpayne@68 71 DISTFILES.common = Makefile.in.in remove-potcdate.sin \
jpayne@68 72 $(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
jpayne@68 73 DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \
jpayne@68 74 $(POFILES) $(GMOFILES) \
jpayne@68 75 $(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
jpayne@68 76
jpayne@68 77 POTFILES = \
jpayne@68 78
jpayne@68 79 CATALOGS = @CATALOGS@
jpayne@68 80
jpayne@68 81 POFILESDEPS_ = $(srcdir)/$(DOMAIN).pot
jpayne@68 82 POFILESDEPS_yes = $(POFILESDEPS_)
jpayne@68 83 POFILESDEPS_no =
jpayne@68 84 POFILESDEPS = $(POFILESDEPS_$(PO_DEPENDS_ON_POT))
jpayne@68 85
jpayne@68 86 DISTFILESDEPS_ = update-po
jpayne@68 87 DISTFILESDEPS_yes = $(DISTFILESDEPS_)
jpayne@68 88 DISTFILESDEPS_no =
jpayne@68 89 DISTFILESDEPS = $(DISTFILESDEPS_$(DIST_DEPENDS_ON_UPDATE_PO))
jpayne@68 90
jpayne@68 91 # Makevars gets inserted here. (Don't remove this line!)
jpayne@68 92
jpayne@68 93 all: all-@USE_NLS@
jpayne@68 94
jpayne@68 95
jpayne@68 96 .SUFFIXES:
jpayne@68 97 .SUFFIXES: .po .gmo .sed .sin .nop .po-create .po-update
jpayne@68 98
jpayne@68 99 # The .pot file, stamp-po, .po files, and .gmo files appear in release tarballs.
jpayne@68 100 # The GNU Coding Standards say in
jpayne@68 101 # <https://www.gnu.org/prep/standards/html_node/Makefile-Basics.html>:
jpayne@68 102 # "GNU distributions usually contain some files which are not source files
jpayne@68 103 # ... . Since these files normally appear in the source directory, they
jpayne@68 104 # should always appear in the source directory, not in the build directory.
jpayne@68 105 # So Makefile rules to update them should put the updated files in the
jpayne@68 106 # source directory."
jpayne@68 107 # Therefore we put these files in the source directory, not the build directory.
jpayne@68 108
jpayne@68 109 # During .po -> .gmo conversion, take into account the most recent changes to
jpayne@68 110 # the .pot file. This eliminates the need to update the .po files when the
jpayne@68 111 # .pot file has changed, which would be troublesome if the .po files are put
jpayne@68 112 # under version control.
jpayne@68 113 $(GMOFILES): $(srcdir)/$(DOMAIN).pot
jpayne@68 114 .po.gmo:
jpayne@68 115 @lang=`echo $* | sed -e 's,.*/,,'`; \
jpayne@68 116 test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
jpayne@68 117 echo "$${cdcmd}rm -f $${lang}.gmo && $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $${lang}.po $(DOMAIN).pot && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.1po && rm -f $${lang}.1po"; \
jpayne@68 118 cd $(srcdir) && \
jpayne@68 119 rm -f $${lang}.gmo && \
jpayne@68 120 $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $${lang}.po $(DOMAIN).pot && \
jpayne@68 121 $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.1po && \
jpayne@68 122 mv t-$${lang}.gmo $${lang}.gmo && \
jpayne@68 123 rm -f $${lang}.1po
jpayne@68 124
jpayne@68 125 .sin.sed:
jpayne@68 126 sed -e '/^#/d' $< > t-$@
jpayne@68 127 mv t-$@ $@
jpayne@68 128
jpayne@68 129
jpayne@68 130 all-yes: $(srcdir)/stamp-po
jpayne@68 131 all-no:
jpayne@68 132
jpayne@68 133 # Ensure that the gettext macros and this Makefile.in.in are in sync.
jpayne@68 134 CHECK_MACRO_VERSION = \
jpayne@68 135 test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \
jpayne@68 136 || { echo "*** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version $(GETTEXT_MACRO_VERSION) but the autoconf macros are from gettext version @GETTEXT_MACRO_VERSION@" 1>&2; \
jpayne@68 137 exit 1; \
jpayne@68 138 }
jpayne@68 139
jpayne@68 140 # $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no
jpayne@68 141 # internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because
jpayne@68 142 # we don't want to bother translators with empty POT files). We assume that
jpayne@68 143 # LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty.
jpayne@68 144 # In this case, $(srcdir)/stamp-po is a nop (i.e. a phony target).
jpayne@68 145
jpayne@68 146 # $(srcdir)/stamp-po is a timestamp denoting the last time at which the CATALOGS
jpayne@68 147 # have been loosely updated. Its purpose is that when a developer or translator
jpayne@68 148 # checks out the package from a version control system, and the $(DOMAIN).pot
jpayne@68 149 # file is not under version control, "make" will update the $(DOMAIN).pot and
jpayne@68 150 # the $(CATALOGS), but subsequent invocations of "make" will do nothing. This
jpayne@68 151 # timestamp would not be necessary if updating the $(CATALOGS) would always
jpayne@68 152 # touch them; however, the rule for $(POFILES) has been designed to not touch
jpayne@68 153 # files that don't need to be changed.
jpayne@68 154 $(srcdir)/stamp-po: $(srcdir)/$(DOMAIN).pot
jpayne@68 155 @$(CHECK_MACRO_VERSION)
jpayne@68 156 test ! -f $(srcdir)/$(DOMAIN).pot || \
jpayne@68 157 test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
jpayne@68 158 @test ! -f $(srcdir)/$(DOMAIN).pot || { \
jpayne@68 159 echo "touch $(srcdir)/stamp-po" && \
jpayne@68 160 echo timestamp > $(srcdir)/stamp-poT && \
jpayne@68 161 mv $(srcdir)/stamp-poT $(srcdir)/stamp-po; \
jpayne@68 162 }
jpayne@68 163
jpayne@68 164 # Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
jpayne@68 165 # otherwise packages like GCC can not be built if only parts of the source
jpayne@68 166 # have been downloaded.
jpayne@68 167
jpayne@68 168 # This target rebuilds $(DOMAIN).pot; it is an expensive operation.
jpayne@68 169 # Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
jpayne@68 170 # The determination of whether the package xyz is a GNU one is based on the
jpayne@68 171 # heuristic whether some file in the top level directory mentions "GNU xyz".
jpayne@68 172 # If GNU 'find' is available, we avoid grepping through monster files.
jpayne@68 173 $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
jpayne@68 174 package_gnu="$(PACKAGE_GNU)"; \
jpayne@68 175 test -n "$$package_gnu" || { \
jpayne@68 176 if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \
jpayne@68 177 LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep -i 'GNU @PACKAGE@' /dev/null '{}' ';' 2>/dev/null; \
jpayne@68 178 else \
jpayne@68 179 LC_ALL=C grep -i 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null; \
jpayne@68 180 fi; \
jpayne@68 181 } | grep -v 'libtool:' >/dev/null; then \
jpayne@68 182 package_gnu=yes; \
jpayne@68 183 else \
jpayne@68 184 package_gnu=no; \
jpayne@68 185 fi; \
jpayne@68 186 }; \
jpayne@68 187 if test "$$package_gnu" = "yes"; then \
jpayne@68 188 package_prefix='GNU '; \
jpayne@68 189 else \
jpayne@68 190 package_prefix=''; \
jpayne@68 191 fi; \
jpayne@68 192 if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
jpayne@68 193 msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
jpayne@68 194 else \
jpayne@68 195 msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \
jpayne@68 196 fi; \
jpayne@68 197 case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
jpayne@68 198 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \
jpayne@68 199 $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
jpayne@68 200 --add-comments=TRANSLATORS: \
jpayne@68 201 --files-from=$(srcdir)/POTFILES.in \
jpayne@68 202 --copyright-holder='$(COPYRIGHT_HOLDER)' \
jpayne@68 203 --msgid-bugs-address="$$msgid_bugs_address" \
jpayne@68 204 $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
jpayne@68 205 ;; \
jpayne@68 206 *) \
jpayne@68 207 $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
jpayne@68 208 --add-comments=TRANSLATORS: \
jpayne@68 209 --files-from=$(srcdir)/POTFILES.in \
jpayne@68 210 --copyright-holder='$(COPYRIGHT_HOLDER)' \
jpayne@68 211 --package-name="$${package_prefix}@PACKAGE@" \
jpayne@68 212 --package-version='@VERSION@' \
jpayne@68 213 --msgid-bugs-address="$$msgid_bugs_address" \
jpayne@68 214 $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
jpayne@68 215 ;; \
jpayne@68 216 esac
jpayne@68 217 test ! -f $(DOMAIN).po || { \
jpayne@68 218 if test -f $(srcdir)/$(DOMAIN).pot-header; then \
jpayne@68 219 sed -e '1,/^#$$/d' < $(DOMAIN).po > $(DOMAIN).1po && \
jpayne@68 220 cat $(srcdir)/$(DOMAIN).pot-header $(DOMAIN).1po > $(DOMAIN).po && \
jpayne@68 221 rm -f $(DOMAIN).1po \
jpayne@68 222 || exit 1; \
jpayne@68 223 fi; \
jpayne@68 224 if test -f $(srcdir)/$(DOMAIN).pot; then \
jpayne@68 225 sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
jpayne@68 226 sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
jpayne@68 227 if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
jpayne@68 228 rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
jpayne@68 229 else \
jpayne@68 230 rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
jpayne@68 231 mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
jpayne@68 232 fi; \
jpayne@68 233 else \
jpayne@68 234 mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
jpayne@68 235 fi; \
jpayne@68 236 }
jpayne@68 237
jpayne@68 238 # This rule has no dependencies: we don't need to update $(DOMAIN).pot at
jpayne@68 239 # every "make" invocation, only create it when it is missing.
jpayne@68 240 # Only "make $(DOMAIN).pot-update" or "make dist" will force an update.
jpayne@68 241 $(srcdir)/$(DOMAIN).pot:
jpayne@68 242 $(MAKE) $(DOMAIN).pot-update
jpayne@68 243
jpayne@68 244 # This target rebuilds a PO file if $(DOMAIN).pot has changed.
jpayne@68 245 # Note that a PO file is not touched if it doesn't need to be changed.
jpayne@68 246 $(POFILES): $(POFILESDEPS)
jpayne@68 247 @test -f $(srcdir)/$(DOMAIN).pot || $(MAKE) $(srcdir)/$(DOMAIN).pot
jpayne@68 248 @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
jpayne@68 249 if test -f "$(srcdir)/$${lang}.po"; then \
jpayne@68 250 test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
jpayne@68 251 echo "$${cdcmd}$(MSGMERGE_UPDATE) --quiet $(MSGMERGE_OPTIONS) --lang=$${lang} --previous $${lang}.po $(DOMAIN).pot"; \
jpayne@68 252 cd $(srcdir) \
jpayne@68 253 && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
jpayne@68 254 '' | 0.[0-9] | 0.[0-9].* | 0.10 | 0.10.*) \
jpayne@68 255 $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \
jpayne@68 256 0.1[1-5] | 0.1[1-5].*) \
jpayne@68 257 $(MSGMERGE_UPDATE) --quiet $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \
jpayne@68 258 0.1[6-7] | 0.1[6-7].*) \
jpayne@68 259 $(MSGMERGE_UPDATE) --quiet $(MSGMERGE_OPTIONS) --previous $${lang}.po $(DOMAIN).pot;; \
jpayne@68 260 *) \
jpayne@68 261 $(MSGMERGE_UPDATE) --quiet $(MSGMERGE_OPTIONS) --lang=$${lang} --previous $${lang}.po $(DOMAIN).pot;; \
jpayne@68 262 esac; \
jpayne@68 263 }; \
jpayne@68 264 else \
jpayne@68 265 $(MAKE) $${lang}.po-create; \
jpayne@68 266 fi
jpayne@68 267
jpayne@68 268
jpayne@68 269 install: install-exec install-data
jpayne@68 270 install-exec:
jpayne@68 271 install-data: install-data-@USE_NLS@
jpayne@68 272 if test "$(PACKAGE)" = "gettext-tools"; then \
jpayne@68 273 $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
jpayne@68 274 for file in $(DISTFILES.common) Makevars.template; do \
jpayne@68 275 $(INSTALL_DATA) $(srcdir)/$$file \
jpayne@68 276 $(DESTDIR)$(gettextsrcdir)/$$file; \
jpayne@68 277 done; \
jpayne@68 278 for file in Makevars; do \
jpayne@68 279 rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
jpayne@68 280 done; \
jpayne@68 281 else \
jpayne@68 282 : ; \
jpayne@68 283 fi
jpayne@68 284 install-data-no: all
jpayne@68 285 install-data-yes: all
jpayne@68 286 @catalogs='$(CATALOGS)'; \
jpayne@68 287 for cat in $$catalogs; do \
jpayne@68 288 cat=`basename $$cat`; \
jpayne@68 289 lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
jpayne@68 290 dir=$(localedir)/$$lang/LC_MESSAGES; \
jpayne@68 291 $(mkdir_p) $(DESTDIR)$$dir; \
jpayne@68 292 if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
jpayne@68 293 $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
jpayne@68 294 echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
jpayne@68 295 for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
jpayne@68 296 if test -n "$$lc"; then \
jpayne@68 297 if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
jpayne@68 298 link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
jpayne@68 299 mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
jpayne@68 300 mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
jpayne@68 301 (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
jpayne@68 302 for file in *; do \
jpayne@68 303 if test -f $$file; then \
jpayne@68 304 ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
jpayne@68 305 fi; \
jpayne@68 306 done); \
jpayne@68 307 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
jpayne@68 308 else \
jpayne@68 309 if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
jpayne@68 310 :; \
jpayne@68 311 else \
jpayne@68 312 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
jpayne@68 313 mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
jpayne@68 314 fi; \
jpayne@68 315 fi; \
jpayne@68 316 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
jpayne@68 317 ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
jpayne@68 318 ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
jpayne@68 319 cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
jpayne@68 320 echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \
jpayne@68 321 fi; \
jpayne@68 322 done; \
jpayne@68 323 done
jpayne@68 324
jpayne@68 325 install-strip: install
jpayne@68 326
jpayne@68 327 installdirs: installdirs-exec installdirs-data
jpayne@68 328 installdirs-exec:
jpayne@68 329 installdirs-data: installdirs-data-@USE_NLS@
jpayne@68 330 if test "$(PACKAGE)" = "gettext-tools"; then \
jpayne@68 331 $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
jpayne@68 332 else \
jpayne@68 333 : ; \
jpayne@68 334 fi
jpayne@68 335 installdirs-data-no:
jpayne@68 336 installdirs-data-yes:
jpayne@68 337 @catalogs='$(CATALOGS)'; \
jpayne@68 338 for cat in $$catalogs; do \
jpayne@68 339 cat=`basename $$cat`; \
jpayne@68 340 lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
jpayne@68 341 dir=$(localedir)/$$lang/LC_MESSAGES; \
jpayne@68 342 $(mkdir_p) $(DESTDIR)$$dir; \
jpayne@68 343 for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
jpayne@68 344 if test -n "$$lc"; then \
jpayne@68 345 if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
jpayne@68 346 link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
jpayne@68 347 mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
jpayne@68 348 mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
jpayne@68 349 (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
jpayne@68 350 for file in *; do \
jpayne@68 351 if test -f $$file; then \
jpayne@68 352 ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
jpayne@68 353 fi; \
jpayne@68 354 done); \
jpayne@68 355 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
jpayne@68 356 else \
jpayne@68 357 if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
jpayne@68 358 :; \
jpayne@68 359 else \
jpayne@68 360 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
jpayne@68 361 mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
jpayne@68 362 fi; \
jpayne@68 363 fi; \
jpayne@68 364 fi; \
jpayne@68 365 done; \
jpayne@68 366 done
jpayne@68 367
jpayne@68 368 # Define this as empty until I found a useful application.
jpayne@68 369 installcheck:
jpayne@68 370
jpayne@68 371 uninstall: uninstall-exec uninstall-data
jpayne@68 372 uninstall-exec:
jpayne@68 373 uninstall-data: uninstall-data-@USE_NLS@
jpayne@68 374 if test "$(PACKAGE)" = "gettext-tools"; then \
jpayne@68 375 for file in $(DISTFILES.common) Makevars.template; do \
jpayne@68 376 rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
jpayne@68 377 done; \
jpayne@68 378 else \
jpayne@68 379 : ; \
jpayne@68 380 fi
jpayne@68 381 uninstall-data-no:
jpayne@68 382 uninstall-data-yes:
jpayne@68 383 catalogs='$(CATALOGS)'; \
jpayne@68 384 for cat in $$catalogs; do \
jpayne@68 385 cat=`basename $$cat`; \
jpayne@68 386 lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
jpayne@68 387 for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \
jpayne@68 388 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
jpayne@68 389 done; \
jpayne@68 390 done
jpayne@68 391
jpayne@68 392 check: all
jpayne@68 393
jpayne@68 394 info dvi ps pdf html tags TAGS ctags CTAGS ID:
jpayne@68 395
jpayne@68 396 install-dvi install-ps install-pdf install-html:
jpayne@68 397
jpayne@68 398 mostlyclean:
jpayne@68 399 rm -f remove-potcdate.sed
jpayne@68 400 rm -f $(srcdir)/stamp-poT
jpayne@68 401 rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
jpayne@68 402 rm -fr *.o
jpayne@68 403
jpayne@68 404 clean: mostlyclean
jpayne@68 405
jpayne@68 406 distclean: clean
jpayne@68 407 rm -f Makefile Makefile.in POTFILES
jpayne@68 408
jpayne@68 409 maintainer-clean: distclean
jpayne@68 410 @echo "This command is intended for maintainers to use;"
jpayne@68 411 @echo "it deletes files that may require special tools to rebuild."
jpayne@68 412 rm -f $(srcdir)/$(DOMAIN).pot $(srcdir)/stamp-po $(GMOFILES)
jpayne@68 413
jpayne@68 414 distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
jpayne@68 415 dist distdir:
jpayne@68 416 test -z "$(DISTFILESDEPS)" || $(MAKE) $(DISTFILESDEPS)
jpayne@68 417 @$(MAKE) dist2
jpayne@68 418 # This is a separate target because 'update-po' must be executed before.
jpayne@68 419 dist2: $(srcdir)/stamp-po $(DISTFILES)
jpayne@68 420 @dists="$(DISTFILES)"; \
jpayne@68 421 if test "$(PACKAGE)" = "gettext-tools"; then \
jpayne@68 422 dists="$$dists Makevars.template"; \
jpayne@68 423 fi; \
jpayne@68 424 if test -f $(srcdir)/$(DOMAIN).pot; then \
jpayne@68 425 dists="$$dists $(DOMAIN).pot stamp-po"; \
jpayne@68 426 else \
jpayne@68 427 case $(XGETTEXT) in \
jpayne@68 428 :) echo "Warning: Creating a tarball without '$(DOMAIN).pot', because a suitable 'xgettext' program was not found in PATH." 1>&2;; \
jpayne@68 429 *) echo "Warning: Creating a tarball without '$(DOMAIN).pot', because 'xgettext' found no strings to extract. Check the contents of the POTFILES.in file and the XGETTEXT_OPTIONS in the Makevars file." 1>&2;; \
jpayne@68 430 esac; \
jpayne@68 431 fi; \
jpayne@68 432 if test -f $(srcdir)/ChangeLog; then \
jpayne@68 433 dists="$$dists ChangeLog"; \
jpayne@68 434 fi; \
jpayne@68 435 for i in 0 1 2 3 4 5 6 7 8 9; do \
jpayne@68 436 if test -f $(srcdir)/ChangeLog.$$i; then \
jpayne@68 437 dists="$$dists ChangeLog.$$i"; \
jpayne@68 438 fi; \
jpayne@68 439 done; \
jpayne@68 440 if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
jpayne@68 441 for file in $$dists; do \
jpayne@68 442 if test -f $$file; then \
jpayne@68 443 cp -p $$file $(distdir) || exit 1; \
jpayne@68 444 else \
jpayne@68 445 cp -p $(srcdir)/$$file $(distdir) || exit 1; \
jpayne@68 446 fi; \
jpayne@68 447 done
jpayne@68 448
jpayne@68 449 update-po: Makefile
jpayne@68 450 $(MAKE) $(DOMAIN).pot-update
jpayne@68 451 test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
jpayne@68 452 $(MAKE) update-gmo
jpayne@68 453
jpayne@68 454 # General rule for creating PO files.
jpayne@68 455
jpayne@68 456 .nop.po-create:
jpayne@68 457 @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \
jpayne@68 458 echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \
jpayne@68 459 exit 1
jpayne@68 460
jpayne@68 461 # General rule for updating PO files.
jpayne@68 462
jpayne@68 463 .nop.po-update:
jpayne@68 464 @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
jpayne@68 465 if test "$(PACKAGE)" = "gettext-tools" && test "$(CROSS_COMPILING)" != "yes"; then PATH=`pwd`/../src:$$PATH; fi; \
jpayne@68 466 tmpdir=`pwd`; \
jpayne@68 467 echo "$$lang:"; \
jpayne@68 468 test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
jpayne@68 469 echo "$${cdcmd}$(MSGMERGE) --quiet $(MSGMERGE_OPTIONS) --lang=$$lang --previous $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
jpayne@68 470 cd $(srcdir); \
jpayne@68 471 if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
jpayne@68 472 '' | 0.[0-9] | 0.[0-9].* | 0.10 | 0.10.*) \
jpayne@68 473 $(MSGMERGE) $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
jpayne@68 474 0.1[1-5] | 0.1[1-5].*) \
jpayne@68 475 $(MSGMERGE) --quiet $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
jpayne@68 476 0.1[6-7] | 0.1[6-7].*) \
jpayne@68 477 $(MSGMERGE) --quiet $(MSGMERGE_OPTIONS) --previous -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
jpayne@68 478 *) \
jpayne@68 479 $(MSGMERGE) --quiet $(MSGMERGE_OPTIONS) --lang=$$lang --previous -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
jpayne@68 480 esac; \
jpayne@68 481 }; then \
jpayne@68 482 if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
jpayne@68 483 rm -f $$tmpdir/$$lang.new.po; \
jpayne@68 484 else \
jpayne@68 485 if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
jpayne@68 486 :; \
jpayne@68 487 else \
jpayne@68 488 echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
jpayne@68 489 exit 1; \
jpayne@68 490 fi; \
jpayne@68 491 fi; \
jpayne@68 492 else \
jpayne@68 493 echo "msgmerge for $$lang.po failed!" 1>&2; \
jpayne@68 494 rm -f $$tmpdir/$$lang.new.po; \
jpayne@68 495 fi
jpayne@68 496
jpayne@68 497 $(DUMMYPOFILES):
jpayne@68 498
jpayne@68 499 update-gmo: Makefile $(GMOFILES)
jpayne@68 500 @:
jpayne@68 501
jpayne@68 502 # Recreate Makefile by invoking config.status. Explicitly invoke the shell,
jpayne@68 503 # because execution permission bits may not work on the current file system.
jpayne@68 504 # Use @SHELL@, which is the shell determined by autoconf for the use by its
jpayne@68 505 # scripts, not $(SHELL) which is hardwired to /bin/sh and may be deficient.
jpayne@68 506 Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@
jpayne@68 507 cd $(top_builddir) \
jpayne@68 508 && @SHELL@ ./config.status $(subdir)/$@.in po-directories
jpayne@68 509
jpayne@68 510 force:
jpayne@68 511
jpayne@68 512 # Tell versions [3.59,3.63) of GNU make not to export all variables.
jpayne@68 513 # Otherwise a system limit (for SysV at least) may be exceeded.
jpayne@68 514 .NOEXPORT: