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