Makefile.in.in (flex-2.6.3) | : | Makefile.in.in (flex-2.6.4) | ||
---|---|---|---|---|
# Makefile for PO directory in any package using GNU gettext. | # Makefile for PO directory in any package using GNU gettext. | |||
# Copyright (C) 1995-1997, 2000-2007, 2009-2010 by Ulrich Drepper <drepper@gnu.a i.mit.edu> | # Copyright (C) 1995-1997, 2000-2007, 2009-2010 by Ulrich Drepper <drepper@gnu.a i.mit.edu> | |||
# | # | |||
# This file can be copied and used freely without restrictions. It can | # This file can be copied and used freely without restrictions. It can | |||
# be used in projects which are not available under the GNU General Public | # be used in projects which are not available under the GNU General Public | |||
# License but which still want to provide support for the GNU gettext | # License but which still want to provide support for the GNU gettext | |||
# functionality. | # functionality. | |||
# Please note that the actual code of GNU gettext is covered by the GNU | # Please note that the actual code of GNU gettext is covered by the GNU | |||
# General Public License and is *not* in the public domain. | # General Public License and is *not* in the public domain. | |||
# | # | |||
# Origin: gettext-0.19 | # Origin: gettext-0.18 | |||
GETTEXT_MACRO_VERSION = 0.19 | GETTEXT_MACRO_VERSION = 0.18 | |||
PACKAGE = @PACKAGE@ | PACKAGE = @PACKAGE@ | |||
VERSION = @VERSION@ | VERSION = @VERSION@ | |||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ | |||
SED = @SED@ | ||||
SHELL = /bin/sh | SHELL = /bin/sh | |||
@SET_MAKE@ | @SET_MAKE@ | |||
srcdir = @srcdir@ | srcdir = @srcdir@ | |||
top_srcdir = @top_srcdir@ | top_srcdir = @top_srcdir@ | |||
VPATH = @srcdir@ | VPATH = @srcdir@ | |||
prefix = @prefix@ | prefix = @prefix@ | |||
exec_prefix = @exec_prefix@ | exec_prefix = @exec_prefix@ | |||
datarootdir = @datarootdir@ | datarootdir = @datarootdir@ | |||
skipping to change at line 80 | skipping to change at line 79 | |||
DISTFILES.common = Makefile.in.in remove-potcdate.sin \ | DISTFILES.common = Makefile.in.in remove-potcdate.sin \ | |||
$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3) | $(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3) | |||
DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \ | DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \ | |||
$(POFILES) $(GMOFILES) \ | $(POFILES) $(GMOFILES) \ | |||
$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3) | $(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3) | |||
POTFILES = \ | POTFILES = \ | |||
CATALOGS = @CATALOGS@ | CATALOGS = @CATALOGS@ | |||
POFILESDEPS_ = $(srcdir)/$(DOMAIN).pot | ||||
POFILESDEPS_yes = $(POFILESDEPS_) | ||||
POFILESDEPS_no = | ||||
POFILESDEPS = $(POFILESDEPS_$(PO_DEPENDS_ON_POT)) | ||||
DISTFILESDEPS_ = update-po | ||||
DISTFILESDEPS_yes = $(DISTFILESDEPS_) | ||||
DISTFILESDEPS_no = | ||||
DISTFILESDEPS = $(DISTFILESDEPS_$(DIST_DEPENDS_ON_UPDATE_PO)) | ||||
# Makevars gets inserted here. (Don't remove this line!) | # Makevars gets inserted here. (Don't remove this line!) | |||
.SUFFIXES: | .SUFFIXES: | |||
.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update | .SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update | |||
.po.mo: | .po.mo: | |||
@echo "$(MSGFMT) -c -o $@ $<"; \ | @echo "$(MSGFMT) -c -o $@ $<"; \ | |||
$(MSGFMT) -c -o t-$@ $< && mv t-$@ $@ | $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@ | |||
.po.gmo: | .po.gmo: | |||
@lang=`echo $* | sed -e 's,.*/,,'`; \ | @lang=`echo $* | sed -e 's,.*/,,'`; \ | |||
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ | test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ | |||
echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \ | echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \ | |||
cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbos e -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo | cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbos e -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo | |||
.sin.sed: | .sin.sed: | |||
sed -e '/^#/d' $< > t-$@ | sed -e '/^#/d' $< > t-$@ | |||
mv t-$@ $@ | mv t-$@ $@ | |||
all: all-@USE_NLS@ | all: check-macro-version all-@USE_NLS@ | |||
all-yes: stamp-po | all-yes: stamp-po | |||
all-no: | all-no: | |||
# Ensure that the gettext macros and this Makefile.in.in are in sync. | # Ensure that the gettext macros and this Makefile.in.in are in sync. | |||
CHECK_MACRO_VERSION = \ | check-macro-version: | |||
test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \ | @test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \ | |||
|| { 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; \ | || { 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; \ | |||
exit 1; \ | exit 1; \ | |||
} | } | |||
# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no | # $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no | |||
# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because | # internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because | |||
# we don't want to bother translators with empty POT files). We assume that | # we don't want to bother translators with empty POT files). We assume that | |||
# LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty. | # LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty. | |||
# In this case, stamp-po is a nop (i.e. a phony target). | # In this case, stamp-po is a nop (i.e. a phony target). | |||
# stamp-po is a timestamp denoting the last time at which the CATALOGS have | # stamp-po is a timestamp denoting the last time at which the CATALOGS have | |||
# been loosely updated. Its purpose is that when a developer or translator | # been loosely updated. Its purpose is that when a developer or translator | |||
# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS, | # checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS, | |||
# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent | # "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent | |||
# invocations of "make" will do nothing. This timestamp would not be necessary | # invocations of "make" will do nothing. This timestamp would not be necessary | |||
# if updating the $(CATALOGS) would always touch them; however, the rule for | # if updating the $(CATALOGS) would always touch them; however, the rule for | |||
# $(POFILES) has been designed to not touch files that don't need to be | # $(POFILES) has been designed to not touch files that don't need to be | |||
# changed. | # changed. | |||
stamp-po: $(srcdir)/$(DOMAIN).pot | stamp-po: $(srcdir)/$(DOMAIN).pot | |||
@$(CHECK_MACRO_VERSION) | ||||
test ! -f $(srcdir)/$(DOMAIN).pot || \ | test ! -f $(srcdir)/$(DOMAIN).pot || \ | |||
test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES) | test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES) | |||
@test ! -f $(srcdir)/$(DOMAIN).pot || { \ | @test ! -f $(srcdir)/$(DOMAIN).pot || { \ | |||
echo "touch stamp-po" && \ | echo "touch stamp-po" && \ | |||
echo timestamp > stamp-poT && \ | echo timestamp > stamp-poT && \ | |||
mv stamp-poT stamp-po; \ | mv stamp-poT stamp-po; \ | |||
} | } | |||
# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update', | # Note: Target 'all' must not depend on target '$(DOMAIN).pot-update', | |||
# otherwise packages like GCC can not be built if only parts of the source | # otherwise packages like GCC can not be built if only parts of the source | |||
# have been downloaded. | # have been downloaded. | |||
# This target rebuilds $(DOMAIN).pot; it is an expensive operation. | # This target rebuilds $(DOMAIN).pot; it is an expensive operation. | |||
# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed. | # Note that $(DOMAIN).pot is not touched if it doesn't need to be changed. | |||
# The determination of whether the package xyz is a GNU one is based on the | ||||
# heuristic whether some file in the top level directory mentions "GNU xyz". | ||||
# If GNU 'find' is available, we avoid grepping through monster files. | ||||
$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed | $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed | |||
package_gnu="$(PACKAGE_GNU)"; \ | if LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null | grep -v 'l | |||
test -n "$$package_gnu" || { \ | ibtool:' >/dev/null; then \ | |||
if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; th | package_gnu='GNU '; \ | |||
en \ | ||||
LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f \ | ||||
-size -10000000c -exec grep 'GNU @PACKAGE@' \ | ||||
/dev/null '{}' ';' 2>/dev/null; \ | ||||
else \ | ||||
LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null; \ | ||||
fi; \ | ||||
} | grep -v 'libtool:' >/dev/null; then \ | ||||
package_gnu=yes; \ | ||||
else \ | ||||
package_gnu=no; \ | ||||
fi; \ | ||||
}; \ | ||||
if test "$$package_gnu" = "yes"; then \ | ||||
package_prefix='GNU '; \ | ||||
else \ | else \ | |||
package_prefix=''; \ | package_gnu=''; \ | |||
fi; \ | fi; \ | |||
if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PA CKAGE_BUGREPORT'@'; then \ | if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PA CKAGE_BUGREPORT'@'; then \ | |||
msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ | msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ | |||
else \ | else \ | |||
msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \ | msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \ | |||
fi; \ | fi; \ | |||
case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ | case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ | |||
'' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \ | '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \ | |||
$(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ | $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ | |||
--add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPT IONS@ \ | --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPT IONS@ \ | |||
--files-from=$(srcdir)/POTFILES.in \ | --files-from=$(srcdir)/POTFILES.in \ | |||
--copyright-holder='$(COPYRIGHT_HOLDER)' \ | --copyright-holder='$(COPYRIGHT_HOLDER)' \ | |||
--msgid-bugs-address="$$msgid_bugs_address" \ | --msgid-bugs-address="$$msgid_bugs_address" \ | |||
;; \ | ;; \ | |||
*) \ | *) \ | |||
$(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ | $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ | |||
--add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPT IONS@ \ | --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPT IONS@ \ | |||
--files-from=$(srcdir)/POTFILES.in \ | --files-from=$(srcdir)/POTFILES.in \ | |||
--copyright-holder='$(COPYRIGHT_HOLDER)' \ | --copyright-holder='$(COPYRIGHT_HOLDER)' \ | |||
--package-name="$${package_prefix}@PACKAGE@" \ | --package-name="$${package_gnu}@PACKAGE@" \ | |||
--package-version='@VERSION@' \ | --package-version='@VERSION@' \ | |||
--msgid-bugs-address="$$msgid_bugs_address" \ | --msgid-bugs-address="$$msgid_bugs_address" \ | |||
;; \ | ;; \ | |||
esac | esac | |||
test ! -f $(DOMAIN).po || { \ | test ! -f $(DOMAIN).po || { \ | |||
if test -f $(srcdir)/$(DOMAIN).pot; then \ | if test -f $(srcdir)/$(DOMAIN).pot; then \ | |||
sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ | sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ | |||
sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \ | sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \ | |||
if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \ | if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \ | |||
rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \ | rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \ | |||
skipping to change at line 221 | skipping to change at line 191 | |||
} | } | |||
# This rule has no dependencies: we don't need to update $(DOMAIN).pot at | # This rule has no dependencies: we don't need to update $(DOMAIN).pot at | |||
# every "make" invocation, only create it when it is missing. | # every "make" invocation, only create it when it is missing. | |||
# Only "make $(DOMAIN).pot-update" or "make dist" will force an update. | # Only "make $(DOMAIN).pot-update" or "make dist" will force an update. | |||
$(srcdir)/$(DOMAIN).pot: | $(srcdir)/$(DOMAIN).pot: | |||
$(MAKE) $(DOMAIN).pot-update | $(MAKE) $(DOMAIN).pot-update | |||
# This target rebuilds a PO file if $(DOMAIN).pot has changed. | # This target rebuilds a PO file if $(DOMAIN).pot has changed. | |||
# Note that a PO file is not touched if it doesn't need to be changed. | # Note that a PO file is not touched if it doesn't need to be changed. | |||
$(POFILES): $(POFILESDEPS) | $(POFILES): $(srcdir)/$(DOMAIN).pot | |||
@lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ | @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ | |||
if test -f "$(srcdir)/$${lang}.po"; then \ | if test -f "$(srcdir)/$${lang}.po"; then \ | |||
test -f $(srcdir)/$(DOMAIN).pot || $(MAKE) $(srcdir)/$(DOMAIN).pot; \ | ||||
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ | test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ | |||
echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $ ${lang}.po $(DOMAIN).pot"; \ | echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $ ${lang}.po $(DOMAIN).pot"; \ | |||
cd $(srcdir) \ | cd $(srcdir) \ | |||
&& { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]* ,,'` in \ | && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]* ,,'` in \ | |||
'' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ | '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ | |||
$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN) .pot;; \ | $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN) .pot;; \ | |||
*) \ | *) \ | |||
$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${la ng}.po $(DOMAIN).pot;; \ | $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${la ng}.po $(DOMAIN).pot;; \ | |||
esac; \ | esac; \ | |||
}; \ | }; \ | |||
skipping to change at line 384 | skipping to change at line 353 | |||
distclean: clean | distclean: clean | |||
rm -f Makefile Makefile.in POTFILES *.mo | rm -f Makefile Makefile.in POTFILES *.mo | |||
maintainer-clean: distclean | maintainer-clean: distclean | |||
@echo "This command is intended for maintainers to use;" | @echo "This command is intended for maintainers to use;" | |||
@echo "it deletes files that may require special tools to rebuild." | @echo "it deletes files that may require special tools to rebuild." | |||
rm -f stamp-po $(GMOFILES) | rm -f stamp-po $(GMOFILES) | |||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) | distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) | |||
dist distdir: | dist distdir: | |||
test -z "$(DISTFILESDEPS)" || $(MAKE) $(DISTFILESDEPS) | $(MAKE) update-po | |||
@$(MAKE) dist2 | @$(MAKE) dist2 | |||
# This is a separate target because 'update-po' must be executed before. | # This is a separate target because 'update-po' must be executed before. | |||
dist2: stamp-po $(DISTFILES) | dist2: stamp-po $(DISTFILES) | |||
dists="$(DISTFILES)"; \ | dists="$(DISTFILES)"; \ | |||
if test "$(PACKAGE)" = "gettext-tools"; then \ | if test "$(PACKAGE)" = "gettext-tools"; then \ | |||
dists="$$dists Makevars.template"; \ | dists="$$dists Makevars.template"; \ | |||
fi; \ | fi; \ | |||
if test -f $(srcdir)/$(DOMAIN).pot; then \ | if test -f $(srcdir)/$(DOMAIN).pot; then \ | |||
dists="$$dists $(DOMAIN).pot stamp-po"; \ | dists="$$dists $(DOMAIN).pot stamp-po"; \ | |||
fi; \ | fi; \ | |||
End of changes. 13 change blocks. | ||||
43 lines changed or deleted | 12 lines changed or added |