* gettext-runtime/m4/po.m4 (AM_PO_SUBDIRS): Move the obsolete ALL_LINGUAS check.
Define DESIRED_LINGUAS. Don't compute ALL_LINGUAS, POFILES, UPDATEPOFILES,
DUMMYPOFILES, GMOFILES, INST_LINGUAS, CATALOGS any more.
(AM_POSTPROCESS_PO_MAKEFILE): Don't compute and substitute ALL_LINGUAS, POFILES,
UPDATEPOFILES, DUMMYPOFILES, GMOFILES, PROPERTIESFILES, CLASSFILES, QMFILES,
MSGFILES, RESOURCESDLLFILES, INST_LINGUAS, CATALOGS, JAVACATALOGS, QTCATALOGS,
TCLCATALOGS, CSHARPCATALOGS any more. Don't add rules for Tcl and C# catalogs
any more.
* gettext-runtime/po/Makefile.in.in (ALL_LINGUAS, POFILES, GMOFILES,
UPDATEPOFILES, DUMMYPOFILES): Define with a computed value.
(DESIRED_LINGUAS): New macro.
(INST_LINGUAS, CATALOGS): Define with a computed value.
* gettext-tools/examples/po/Makefile.am (ALL_LINGUAS, POFILES, UPDATEPOFILES,
DUMMYPOFILES): Define with a computed value.
* gettext-tools/examples/hello-*/po/Makefile.am (ALL_LINGUAS, POFILES, GMOFILES,
UPDATEPOFILES, DUMMYPOFILES): Define with a computed value.
(DESIRED_LINGUAS): New macro.
(INST_LINGUAS, CATALOGS): Define with a computed value.
* gettext-tools/examples/hello-csharp*/po/Makefile.am (ALL_LINGUAS, POFILES,
UPDATEPOFILES, DUMMYPOFILES, RESOURCESDLLFILES): Define with a computed value.
Include .csharp-rules.
(DESIRED_LINGUAS): New macro.
(INST_LINGUAS, CATALOGS): Define with a computed value.
(DISTCLEANFILES): New variable.
* gettext-tools/examples/hello-tcl*/po/Makefile.am (ALL_LINGUAS, POFILES,
UPDATEPOFILES, DUMMYPOFILES, MSGFILES): Define with a computed value.
Include .tcl-rules.
(DESIRED_LINGUAS): New macro.
(INST_LINGUAS, CATALOGS): Define with a computed value.
(DISTCLEANFILES): New variable.
test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
+ if test -n "$ALL_LINGUAS"; then
+ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+ fi
+
+ dnl Capture the value of LINGUAS because we need it to compute CATALOGS.
+ dnl In the Makefile, call it DESIRED_LINGUAS (because there, LINGUAS denotes
+ dnl the set of available translations, given by the developer).
+ DESIRED_LINGUAS="${LINGUAS-\$(ALL_LINGUAS)}"
+ AC_SUBST([DESIRED_LINGUAS])
+
AC_CONFIG_COMMANDS([po-directories], [[
for ac_file in $CONFIG_FILES; do
# Support "outfile[:infile[:infile...]]"
# In autoconf-2.13 it is called $ac_given_srcdir.
# In autoconf-2.50 it is called $srcdir.
test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
- case "$ac_given_srcdir" in
- .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
- /*) top_srcdir="$ac_given_srcdir" ;;
- *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
# Treat a directory as a PO directory if and only if it has a
# POTFILES.in file. This allows packages to have multiple PO
# directories under different names or in different locations.
if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
POMAKEFILEDEPS="POTFILES.in"
- # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
- # on $ac_dir but don't depend on user-specified configuration
- # parameters.
if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
- # The LINGUAS file contains the set of available languages.
- if test -n "$OBSOLETE_ALL_LINGUAS"; then
- test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
- fi
- ALL_LINGUAS=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
- else
- # The set of available languages was given in configure.in.
- ALL_LINGUAS=$OBSOLETE_ALL_LINGUAS
- fi
- # Compute POFILES
- # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
- # Compute UPDATEPOFILES
- # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
- # Compute DUMMYPOFILES
- # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
- # Compute GMOFILES
- # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
- case "$ac_given_srcdir" in
- .) srcdirpre= ;;
- *) srcdirpre='$(srcdir)/' ;;
- esac
- POFILES=
- UPDATEPOFILES=
- DUMMYPOFILES=
- GMOFILES=
- for lang in $ALL_LINGUAS; do
- POFILES="$POFILES $srcdirpre$lang.po"
- UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
- DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
- GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
- done
- # CATALOGS depends on both $ac_dir and the user's LINGUAS
- # environment variable.
- INST_LINGUAS=
- if test -n "$ALL_LINGUAS"; then
- for presentlang in $ALL_LINGUAS; do
- useit=no
- if test "%UNSET%" != "$LINGUAS"; then
- desiredlanguages="$LINGUAS"
- else
- desiredlanguages="$ALL_LINGUAS"
- fi
- for desiredlang in $desiredlanguages; do
- # Use the presentlang catalog if desiredlang is
- # a. equal to presentlang, or
- # b. a variant of presentlang (because in this case,
- # presentlang can be used as a fallback for messages
- # which are not translated in the desiredlang catalog).
- case "$desiredlang" in
- "$presentlang" | "$presentlang"_* | "$presentlang".* | "$presentlang"@*)
- useit=yes
- ;;
- esac
- done
- if test $useit = yes; then
- INST_LINGUAS="$INST_LINGUAS $presentlang"
- fi
- done
- fi
- CATALOGS=
- if test -n "$INST_LINGUAS"; then
- for lang in $INST_LINGUAS; do
- CATALOGS="$CATALOGS $lang.gmo"
- done
fi
test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
- sed -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
+ sed -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
if test -f "$f"; then
case "$f" in
;;
esac
done]],
- [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
- # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS.
- OBSOLETE_ALL_LINGUAS="$ALL_LINGUAS"
- # Capture the value of LINGUAS because we need it to compute CATALOGS.
- LINGUAS="${LINGUAS-%UNSET%}"
- ])
+ [])
])
dnl Postprocesses a Makefile in a directory containing PO files.
AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
[
- # When this code is run, in config.status, two variables have already been
- # set:
- # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
- # - LINGUAS is the value of the environment variable LINGUAS at configure
- # time.
-
changequote(,)dnl
# Adjust a relative srcdir.
ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
- ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
- ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
- # In autoconf-2.13 it is called $ac_given_srcdir.
- # In autoconf-2.50 it is called $srcdir.
- test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
- case "$ac_given_srcdir" in
- .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
- /*) top_srcdir="$ac_given_srcdir" ;;
- *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
- # Find a way to echo strings without interpreting backslash.
- if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
- gt_echo='echo'
- else
- if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
- gt_echo='printf %s\n'
- else
- echo_func () {
- cat <<EOT
-$*
-EOT
- }
- gt_echo='echo_func'
- fi
- fi
-
- # A sed script that extracts the value of VARIABLE from a Makefile.
- tab=`printf '\t'`
- sed_x_variable='
-# Test if the hold space is empty.
-x
-s/P/P/
-x
-ta
-# Yes it was empty. Look if we have the expected variable definition.
-/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=/{
- # Seen the first line of the variable definition.
- s/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=//
- ba
-}
-bd
-:a
-# Here we are processing a line from the variable definition.
-# Remove comment, more precisely replace it with a space.
-s/#.*$/ /
-# See if the line ends in a backslash.
-tb
-:b
-s/\\$//
-# Print the line, without the trailing backslash.
-p
-tc
-# There was no trailing backslash. The end of the variable definition is
-# reached. Clear the hold space.
-s/^.*$//
-x
-bd
-:c
-# A trailing backslash means that the variable definition continues in the
-# next line. Put a nonempty string into the hold space to indicate this.
-s/^.*$/P/
-x
-:d
-'
changequote([,])dnl
POMAKEFILEDEPS=""
-
- if test -n "$OBSOLETE_ALL_LINGUAS"; then
- test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
- fi
if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
- # The LINGUAS file contains the set of available languages.
- ALL_LINGUAS=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
- else
- # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
- sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
- ALL_LINGUAS=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
- fi
- # Compute POFILES
- # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
- # Compute UPDATEPOFILES
- # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
- # Compute DUMMYPOFILES
- # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
- # Compute GMOFILES
- # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
- # Compute PROPERTIESFILES
- # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(DOMAIN)_$(lang).properties)
- # Compute CLASSFILES
- # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(DOMAIN)_$(lang).class)
- # Compute QMFILES
- # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
- # Compute MSGFILES
- # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
- # Compute RESOURCESDLLFILES
- # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
- case "$ac_given_srcdir" in
- .) srcdirpre= ;;
- *) srcdirpre='$(srcdir)/' ;;
- esac
- POFILES=
- UPDATEPOFILES=
- DUMMYPOFILES=
- GMOFILES=
- PROPERTIESFILES=
- CLASSFILES=
- QMFILES=
- MSGFILES=
- RESOURCESDLLFILES=
- for lang in $ALL_LINGUAS; do
- POFILES="$POFILES $srcdirpre$lang.po"
- UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
- DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
- GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
- PROPERTIESFILES="$PROPERTIESFILES \$(srcdir)/\$(DOMAIN)_$lang.properties"
- CLASSFILES="$CLASSFILES \$(srcdir)/\$(DOMAIN)_$lang.class"
- QMFILES="$QMFILES $srcdirpre$lang.qm"
- frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
- MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
- frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
- RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
- done
- # CATALOGS depends on both $ac_dir and the user's LINGUAS
- # environment variable.
- INST_LINGUAS=
- if test -n "$ALL_LINGUAS"; then
- for presentlang in $ALL_LINGUAS; do
- useit=no
- if test "%UNSET%" != "$LINGUAS"; then
- desiredlanguages="$LINGUAS"
- else
- desiredlanguages="$ALL_LINGUAS"
- fi
- for desiredlang in $desiredlanguages; do
- # Use the presentlang catalog if desiredlang is
- # a. equal to presentlang, or
- # b. a variant of presentlang (because in this case,
- # presentlang can be used as a fallback for messages
- # which are not translated in the desiredlang catalog).
- case "$desiredlang" in
- "$presentlang" | "$presentlang"_* | "$presentlang".* | "$presentlang"@*)
- useit=yes
- ;;
- esac
- done
- if test $useit = yes; then
- INST_LINGUAS="$INST_LINGUAS $presentlang"
- fi
- done
- fi
- CATALOGS=
- JAVACATALOGS=
- QTCATALOGS=
- TCLCATALOGS=
- CSHARPCATALOGS=
- if test -n "$INST_LINGUAS"; then
- for lang in $INST_LINGUAS; do
- CATALOGS="$CATALOGS $lang.gmo"
- JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
- QTCATALOGS="$QTCATALOGS $lang.qm"
- frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
- TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
- frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
- CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
- done
fi
- sed -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
- tab=`printf '\t'`
- if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
- # Add dependencies that cannot be formulated as a simple suffix rule.
- for lang in $ALL_LINGUAS; do
- frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
- cat >> "$ac_file.tmp" <<EOF
-$frobbedlang.msg: $lang.po
-${tab}@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
-${tab}\$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
-EOF
- done
- fi
- if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
- # Add dependencies that cannot be formulated as a simple suffix rule.
- for lang in $ALL_LINGUAS; do
- frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
- cat >> "$ac_file.tmp" <<EOF
-$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
-${tab}@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
-${tab}\$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
-EOF
- done
- fi
+ sed -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
if test -n "$POMAKEFILEDEPS"; then
cat >> "$ac_file.tmp" <<EOF
Makefile: $POMAKEFILEDEPS
MSGCONV = msgconv
MSGFILTER = msgfilter
-POFILES = @POFILES@
-GMOFILES = @GMOFILES@
-UPDATEPOFILES = @UPDATEPOFILES@
-DUMMYPOFILES = @DUMMYPOFILES@
+# The list of files which contain translatable strings.
+POTFILES != sed -e '/^\#/d' < $(srcdir)/POTFILES.in
+# This is computed as $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
+POTFILES_DEPS != for file in $(POTFILES); do echo $(top_srcdir)/$$file; done
+
+# The set of available translations.
+ALL_LINGUAS != if test -f $(srcdir)/LINGUAS; then \
+ sed -e '/^\#/d' < $(srcdir)/LINGUAS; \
+ else \
+ echo $(LINGUAS); \
+ fi
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+POFILES != for lang in $(ALL_LINGUAS); do echo $(srcdir)/$$lang.po; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+GMOFILES != for lang in $(ALL_LINGUAS); do echo $(srcdir)/$$lang.gmo; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+UPDATEPOFILES != for lang in $(ALL_LINGUAS); do echo $$lang.po-update; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+DUMMYPOFILES != for lang in $(ALL_LINGUAS); do echo $$lang.nop; done
+
DISTFILES.common = Makefile.in.in remove-potcdate.sed \
$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \
$(POFILES) $(GMOFILES) \
$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
-# The list of files which contain translatable strings.
-POTFILES != sed -e '/^\#/d' < $(srcdir)/POTFILES.in
-# This is computed as $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
-POTFILES_DEPS != for file in $(POTFILES); do echo $(top_srcdir)/$$file; done
-
-CATALOGS = @CATALOGS@
+# The set of desired translations, as specified by the installer or distributor.
+DESIRED_LINGUAS = @DESIRED_LINGUAS@
+# The set of translations to install. This is computed based on $(ALL_LINGUAS)
+# and $(DESIRED_LINGUAS). It is a subset of $(ALL_LINGUAS).
+# We use the presentlang catalog if desiredlang is
+# a. equal to presentlang, or
+# b. a variant of presentlang (because in this case, presentlang can be used
+# as a fallback for messages which are not translated in the desiredlang
+# catalog).
+INST_LINGUAS != for presentlang in $(ALL_LINGUAS); do \
+ useit=false; \
+ for desiredlang in $(DESIRED_LINGUAS); do \
+ case "$$desiredlang" in \
+ "$$presentlang" | "$$presentlang"_* | "$$presentlang".* | "$$presentlang"@*) \
+ useit=true ;; \
+ esac; \
+ done; \
+ if $$useit; then echo $$presentlang; fi; \
+ done
+# This is computed as $(foreach lang, $(INST_LINGUAS), $(lang).gmo)
+CATALOGS != for lang in $(INST_LINGUAS); do echo $$lang.gmo; done
POFILESDEPS_ = $(srcdir)/$(DOMAIN).pot
POFILESDEPS_yes = $(POFILESDEPS_)
# This is computed as $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
POTFILES_DEPS != for file in $(POTFILES); do echo $(top_srcdir)/$$file; done
-# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(lang).po)
-POFILES = @POFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(lang).po-update)
-UPDATEPOFILES = @UPDATEPOFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(lang).nop)
-DUMMYPOFILES = @DUMMYPOFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(lang).qm)
-QMFILES = @QMFILES@
-
-# This is computed as
-# $(foreach lang, user-specified subset of $(LINGUAS), $(lang).qm)
-CATALOGS = @QTCATALOGS@
+# The set of available translations.
+ALL_LINGUAS != if test -f $(srcdir)/LINGUAS; then \
+ sed -e '/^\#/d' < $(srcdir)/LINGUAS; \
+ else \
+ echo $(LINGUAS); \
+ fi
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+POFILES != for lang in $(ALL_LINGUAS); do echo $(srcdir)/$$lang.po; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+UPDATEPOFILES != for lang in $(ALL_LINGUAS); do echo $$lang.po-update; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+DUMMYPOFILES != for lang in $(ALL_LINGUAS); do echo $$lang.nop; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
+QMFILES != for lang in $(ALL_LINGUAS); do echo $(srcdir)/$$lang.qm; done
+
+# The set of desired translations, as specified by the installer or distributor.
+DESIRED_LINGUAS = @DESIRED_LINGUAS@
+# The set of translations to install. This is computed based on $(ALL_LINGUAS)
+# and $(DESIRED_LINGUAS). It is a subset of $(ALL_LINGUAS).
+# We use the presentlang catalog if desiredlang is
+# a. equal to presentlang, or
+# b. a variant of presentlang (because in this case, presentlang can be used
+# as a fallback for messages which are not translated in the desiredlang
+# catalog).
+INST_LINGUAS != for presentlang in $(ALL_LINGUAS); do \
+ useit=false; \
+ for desiredlang in $(DESIRED_LINGUAS); do \
+ case "$$desiredlang" in \
+ "$$presentlang" | "$$presentlang"_* | "$$presentlang".* | "$$presentlang"@*) \
+ useit=true ;; \
+ esac; \
+ done; \
+ if $$useit; then echo $$presentlang; fi; \
+ done
+# This is computed as $(foreach lang, $(INST_LINGUAS), $(lang).qm)
+CATALOGS != for lang in $(INST_LINGUAS); do echo $$lang.qm; done
SUFFIXES = .po .qm .nop .po-create .po-update
# This is computed as $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
POTFILES_DEPS != for file in $(POTFILES); do echo $(top_srcdir)/$$file; done
-# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(lang).po)
-POFILES = @POFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(lang).gmo)
-GMOFILES = @GMOFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(lang).po-update)
-UPDATEPOFILES = @UPDATEPOFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(lang).nop)
-DUMMYPOFILES = @DUMMYPOFILES@
-
-# This is computed as
-# $(foreach lang, user-specified subset of $(LINGUAS), $(lang).gmo)
-CATALOGS = @CATALOGS@
+# The set of available translations.
+ALL_LINGUAS != if test -f $(srcdir)/LINGUAS; then \
+ sed -e '/^\#/d' < $(srcdir)/LINGUAS; \
+ else \
+ echo $(LINGUAS); \
+ fi
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+POFILES != for lang in $(ALL_LINGUAS); do echo $(srcdir)/$$lang.po; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+GMOFILES != for lang in $(ALL_LINGUAS); do echo $(srcdir)/$$lang.gmo; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+UPDATEPOFILES != for lang in $(ALL_LINGUAS); do echo $$lang.po-update; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+DUMMYPOFILES != for lang in $(ALL_LINGUAS); do echo $$lang.nop; done
+
+# The set of desired translations, as specified by the installer or distributor.
+DESIRED_LINGUAS = @DESIRED_LINGUAS@
+# The set of translations to install. This is computed based on $(ALL_LINGUAS)
+# and $(DESIRED_LINGUAS). It is a subset of $(ALL_LINGUAS).
+# We use the presentlang catalog if desiredlang is
+# a. equal to presentlang, or
+# b. a variant of presentlang (because in this case, presentlang can be used
+# as a fallback for messages which are not translated in the desiredlang
+# catalog).
+INST_LINGUAS != for presentlang in $(ALL_LINGUAS); do \
+ useit=false; \
+ for desiredlang in $(DESIRED_LINGUAS); do \
+ case "$$desiredlang" in \
+ "$$presentlang" | "$$presentlang"_* | "$$presentlang".* | "$$presentlang"@*) \
+ useit=true ;; \
+ esac; \
+ done; \
+ if $$useit; then echo $$presentlang; fi; \
+ done
+# This is computed as $(foreach lang, $(INST_LINGUAS), $(lang).gmo)
+CATALOGS != for lang in $(INST_LINGUAS); do echo $$lang.gmo; done
SUFFIXES = .po .gmo .nop .po-create .po-update
# This is computed as $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
POTFILES_DEPS != for file in $(POTFILES); do echo $(top_srcdir)/$$file; done
-# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(lang).po)
-POFILES = @POFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(lang).gmo)
-GMOFILES = @GMOFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(lang).po-update)
-UPDATEPOFILES = @UPDATEPOFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(lang).nop)
-DUMMYPOFILES = @DUMMYPOFILES@
-
-# This is computed as
-# $(foreach lang, user-specified subset of $(LINGUAS), $(lang).gmo)
-CATALOGS = @CATALOGS@
+# The set of available translations.
+ALL_LINGUAS != if test -f $(srcdir)/LINGUAS; then \
+ sed -e '/^\#/d' < $(srcdir)/LINGUAS; \
+ else \
+ echo $(LINGUAS); \
+ fi
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+POFILES != for lang in $(ALL_LINGUAS); do echo $(srcdir)/$$lang.po; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+GMOFILES != for lang in $(ALL_LINGUAS); do echo $(srcdir)/$$lang.gmo; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+UPDATEPOFILES != for lang in $(ALL_LINGUAS); do echo $$lang.po-update; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+DUMMYPOFILES != for lang in $(ALL_LINGUAS); do echo $$lang.nop; done
+
+# The set of desired translations, as specified by the installer or distributor.
+DESIRED_LINGUAS = @DESIRED_LINGUAS@
+# The set of translations to install. This is computed based on $(ALL_LINGUAS)
+# and $(DESIRED_LINGUAS). It is a subset of $(ALL_LINGUAS).
+# We use the presentlang catalog if desiredlang is
+# a. equal to presentlang, or
+# b. a variant of presentlang (because in this case, presentlang can be used
+# as a fallback for messages which are not translated in the desiredlang
+# catalog).
+INST_LINGUAS != for presentlang in $(ALL_LINGUAS); do \
+ useit=false; \
+ for desiredlang in $(DESIRED_LINGUAS); do \
+ case "$$desiredlang" in \
+ "$$presentlang" | "$$presentlang"_* | "$$presentlang".* | "$$presentlang"@*) \
+ useit=true ;; \
+ esac; \
+ done; \
+ if $$useit; then echo $$presentlang; fi; \
+ done
+# This is computed as $(foreach lang, $(INST_LINGUAS), $(lang).gmo)
+CATALOGS != for lang in $(INST_LINGUAS); do echo $$lang.gmo; done
SUFFIXES = .po .gmo .nop .po-create .po-update
# This is computed as $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
POTFILES_DEPS != for file in $(POTFILES); do echo $(top_srcdir)/$$file; done
-# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(lang).po)
-POFILES = @POFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(lang).po-update)
-UPDATEPOFILES = @UPDATEPOFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(lang).nop)
-DUMMYPOFILES = @DUMMYPOFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
-RESOURCESDLLFILES = @RESOURCESDLLFILES@
-
-# This is computed as
-# $(foreach lang, user-specified subset of $(LINGUAS), $(frob $(lang))/$(DOMAIN).resources.dll)
-CATALOGS = @CSHARPCATALOGS@
+# The set of available translations.
+ALL_LINGUAS != if test -f $(srcdir)/LINGUAS; then \
+ sed -e '/^\#/d' < $(srcdir)/LINGUAS; \
+ else \
+ echo $(LINGUAS); \
+ fi
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+POFILES != for lang in $(ALL_LINGUAS); do echo $(srcdir)/$$lang.po; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+UPDATEPOFILES != for lang in $(ALL_LINGUAS); do echo $$lang.po-update; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+DUMMYPOFILES != for lang in $(ALL_LINGUAS); do echo $$lang.nop; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
+# It also creates the .csharp-rules file.
+RESOURCESDLLFILES != tab=`printf '\t'`; \
+ for lang in $(ALL_LINGUAS); do \
+ frobbedlang=`echo $$lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$$/-Latn/' -e 's/@cyrillic$$/-Cyrl/' -e 's/^sr-SP$$/sr-SP-Latn/' -e 's/^uz-UZ$$/uz-UZ-Latn/'`; \
+ echo 1>&3 "$$frobbedlang/\$$(DOMAIN).resources.dll: $$lang.po"; \
+ echo 1>&3 "$${tab}@echo \"\$$(MSGFMT) -c --csharp -d \$$(srcdir) -l $$lang \$$(srcdir)/$$lang.po -r \$$(DOMAIN)\"; \\"; \
+ echo 1>&3 "$${tab}\$$(MSGFMT) -c --csharp -d \"\$$(srcdir)\" -l $$lang \$$(srcdir)/$$lang.po -r \"\$$(DOMAIN)\" || { rm -f \"\$$(srcdir)/$$frobbedlang/\$$(DOMAIN).resources.dll\"; exit 1; }"; \
+ echo $(srcdir)/$$frobbedlang/$(DOMAIN).resources.dll; \
+ done 3> .csharp-rules
+# Include the generated rules that cannot be formulated as a simple rule.
+-include .csharp-rules
+
+# The set of desired translations, as specified by the installer or distributor.
+DESIRED_LINGUAS = @DESIRED_LINGUAS@
+# The set of translations to install. This is computed based on $(ALL_LINGUAS)
+# and $(DESIRED_LINGUAS). It is a subset of $(ALL_LINGUAS).
+# We use the presentlang catalog if desiredlang is
+# a. equal to presentlang, or
+# b. a variant of presentlang (because in this case, presentlang can be used
+# as a fallback for messages which are not translated in the desiredlang
+# catalog).
+INST_LINGUAS != for presentlang in $(ALL_LINGUAS); do \
+ useit=false; \
+ for desiredlang in $(DESIRED_LINGUAS); do \
+ case "$$desiredlang" in \
+ "$$presentlang" | "$$presentlang"_* | "$$presentlang".* | "$$presentlang"@*) \
+ useit=true ;; \
+ esac; \
+ done; \
+ if $$useit; then echo $$presentlang; fi; \
+ done
+# This is computed as $(foreach lang, $(INST_LINGUAS), $(frob $(lang))/$(DOMAIN).resources.dll)
+CATALOGS != for lang in $(INST_LINGUAS); do \
+ frobbedlang=`echo $$lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$$/-Latn/' -e 's/@cyrillic$$/-Cyrl/' -e 's/^sr-SP$$/sr-SP-Latn/' -e 's/^uz-UZ$$/uz-UZ-Latn/'`; \
+ echo $$lang/$(DOMAIN).resources.dll; \
+ done
SUFFIXES = .nop .po-create .po-update
html ID:
+DISTCLEANFILES = .csharp-rules
+
MOSTLYCLEANFILES =
MOSTLYCLEANFILES += stamp-poT
MOSTLYCLEANFILES += core core.* *.stackdump $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
# This is computed as $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
POTFILES_DEPS != for file in $(POTFILES); do echo $(top_srcdir)/$$file; done
-# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(lang).po)
-POFILES = @POFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(lang).po-update)
-UPDATEPOFILES = @UPDATEPOFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(lang).nop)
-DUMMYPOFILES = @DUMMYPOFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
-RESOURCESDLLFILES = @RESOURCESDLLFILES@
-
-# This is computed as
-# $(foreach lang, user-specified subset of $(LINGUAS), $(frob $(lang))/$(DOMAIN).resources.dll)
-CATALOGS = @CSHARPCATALOGS@
+# The set of available translations.
+ALL_LINGUAS != if test -f $(srcdir)/LINGUAS; then \
+ sed -e '/^\#/d' < $(srcdir)/LINGUAS; \
+ else \
+ echo $(LINGUAS); \
+ fi
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+POFILES != for lang in $(ALL_LINGUAS); do echo $(srcdir)/$$lang.po; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+UPDATEPOFILES != for lang in $(ALL_LINGUAS); do echo $$lang.po-update; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+DUMMYPOFILES != for lang in $(ALL_LINGUAS); do echo $$lang.nop; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
+# It also creates the .csharp-rules file.
+RESOURCESDLLFILES != tab=`printf '\t'`; \
+ for lang in $(ALL_LINGUAS); do \
+ frobbedlang=`echo $$lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$$/-Latn/' -e 's/@cyrillic$$/-Cyrl/' -e 's/^sr-SP$$/sr-SP-Latn/' -e 's/^uz-UZ$$/uz-UZ-Latn/'`; \
+ echo 1>&3 "$$frobbedlang/\$$(DOMAIN).resources.dll: $$lang.po"; \
+ echo 1>&3 "$${tab}@echo \"\$$(MSGFMT) -c --csharp -d \$$(srcdir) -l $$lang \$$(srcdir)/$$lang.po -r \$$(DOMAIN)\"; \\"; \
+ echo 1>&3 "$${tab}\$$(MSGFMT) -c --csharp -d \"\$$(srcdir)\" -l $$lang \$$(srcdir)/$$lang.po -r \"\$$(DOMAIN)\" || { rm -f \"\$$(srcdir)/$$frobbedlang/\$$(DOMAIN).resources.dll\"; exit 1; }"; \
+ echo $(srcdir)/$$frobbedlang/$(DOMAIN).resources.dll; \
+ done 3> .csharp-rules
+# Include the generated rules that cannot be formulated as a simple rule.
+-include .csharp-rules
+
+# The set of desired translations, as specified by the installer or distributor.
+DESIRED_LINGUAS = @DESIRED_LINGUAS@
+# The set of translations to install. This is computed based on $(ALL_LINGUAS)
+# and $(DESIRED_LINGUAS). It is a subset of $(ALL_LINGUAS).
+# We use the presentlang catalog if desiredlang is
+# a. equal to presentlang, or
+# b. a variant of presentlang (because in this case, presentlang can be used
+# as a fallback for messages which are not translated in the desiredlang
+# catalog).
+INST_LINGUAS != for presentlang in $(ALL_LINGUAS); do \
+ useit=false; \
+ for desiredlang in $(DESIRED_LINGUAS); do \
+ case "$$desiredlang" in \
+ "$$presentlang" | "$$presentlang"_* | "$$presentlang".* | "$$presentlang"@*) \
+ useit=true ;; \
+ esac; \
+ done; \
+ if $$useit; then echo $$presentlang; fi; \
+ done
+# This is computed as $(foreach lang, $(INST_LINGUAS), $(frob $(lang))/$(DOMAIN).resources.dll)
+CATALOGS != for lang in $(INST_LINGUAS); do \
+ frobbedlang=`echo $$lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$$/-Latn/' -e 's/@cyrillic$$/-Cyrl/' -e 's/^sr-SP$$/sr-SP-Latn/' -e 's/^uz-UZ$$/uz-UZ-Latn/'`; \
+ echo $$lang/$(DOMAIN).resources.dll; \
+ done
SUFFIXES = .nop .po-create .po-update
html ID:
+DISTCLEANFILES = .csharp-rules
+
MOSTLYCLEANFILES =
MOSTLYCLEANFILES += stamp-poT
MOSTLYCLEANFILES += core core.* *.stackdump $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
# This is computed as $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
POTFILES_DEPS != for file in $(POTFILES); do echo $(top_srcdir)/$$file; done
-# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(lang).po)
-POFILES = @POFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(lang).gmo)
-GMOFILES = @GMOFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(lang).po-update)
-UPDATEPOFILES = @UPDATEPOFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(lang).nop)
-DUMMYPOFILES = @DUMMYPOFILES@
-
-# This is computed as
-# $(foreach lang, user-specified subset of $(LINGUAS), $(lang).gmo)
-CATALOGS = @CATALOGS@
+# The set of available translations.
+ALL_LINGUAS != if test -f $(srcdir)/LINGUAS; then \
+ sed -e '/^\#/d' < $(srcdir)/LINGUAS; \
+ else \
+ echo $(LINGUAS); \
+ fi
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+POFILES != for lang in $(ALL_LINGUAS); do echo $(srcdir)/$$lang.po; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+GMOFILES != for lang in $(ALL_LINGUAS); do echo $(srcdir)/$$lang.gmo; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+UPDATEPOFILES != for lang in $(ALL_LINGUAS); do echo $$lang.po-update; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+DUMMYPOFILES != for lang in $(ALL_LINGUAS); do echo $$lang.nop; done
+
+# The set of desired translations, as specified by the installer or distributor.
+DESIRED_LINGUAS = @DESIRED_LINGUAS@
+# The set of translations to install. This is computed based on $(ALL_LINGUAS)
+# and $(DESIRED_LINGUAS). It is a subset of $(ALL_LINGUAS).
+# We use the presentlang catalog if desiredlang is
+# a. equal to presentlang, or
+# b. a variant of presentlang (because in this case, presentlang can be used
+# as a fallback for messages which are not translated in the desiredlang
+# catalog).
+INST_LINGUAS != for presentlang in $(ALL_LINGUAS); do \
+ useit=false; \
+ for desiredlang in $(DESIRED_LINGUAS); do \
+ case "$$desiredlang" in \
+ "$$presentlang" | "$$presentlang"_* | "$$presentlang".* | "$$presentlang"@*) \
+ useit=true ;; \
+ esac; \
+ done; \
+ if $$useit; then echo $$presentlang; fi; \
+ done
+# This is computed as $(foreach lang, $(INST_LINGUAS), $(lang).gmo)
+CATALOGS != for lang in $(INST_LINGUAS); do echo $$lang.gmo; done
SUFFIXES = .po .gmo .nop .po-create .po-update
# This is computed as $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
POTFILES_DEPS != for file in $(POTFILES); do echo $(top_srcdir)/$$file; done
-# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(lang).po)
-POFILES = @POFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(lang).gmo)
-GMOFILES = @GMOFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(lang).po-update)
-UPDATEPOFILES = @UPDATEPOFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(lang).nop)
-DUMMYPOFILES = @DUMMYPOFILES@
-
-# This is computed as
-# $(foreach lang, user-specified subset of $(LINGUAS), $(lang).gmo)
-CATALOGS = @CATALOGS@
+# The set of available translations.
+ALL_LINGUAS != if test -f $(srcdir)/LINGUAS; then \
+ sed -e '/^\#/d' < $(srcdir)/LINGUAS; \
+ else \
+ echo $(LINGUAS); \
+ fi
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+POFILES != for lang in $(ALL_LINGUAS); do echo $(srcdir)/$$lang.po; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+GMOFILES != for lang in $(ALL_LINGUAS); do echo $(srcdir)/$$lang.gmo; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+UPDATEPOFILES != for lang in $(ALL_LINGUAS); do echo $$lang.po-update; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+DUMMYPOFILES != for lang in $(ALL_LINGUAS); do echo $$lang.nop; done
+
+# The set of desired translations, as specified by the installer or distributor.
+DESIRED_LINGUAS = @DESIRED_LINGUAS@
+# The set of translations to install. This is computed based on $(ALL_LINGUAS)
+# and $(DESIRED_LINGUAS). It is a subset of $(ALL_LINGUAS).
+# We use the presentlang catalog if desiredlang is
+# a. equal to presentlang, or
+# b. a variant of presentlang (because in this case, presentlang can be used
+# as a fallback for messages which are not translated in the desiredlang
+# catalog).
+INST_LINGUAS != for presentlang in $(ALL_LINGUAS); do \
+ useit=false; \
+ for desiredlang in $(DESIRED_LINGUAS); do \
+ case "$$desiredlang" in \
+ "$$presentlang" | "$$presentlang"_* | "$$presentlang".* | "$$presentlang"@*) \
+ useit=true ;; \
+ esac; \
+ done; \
+ if $$useit; then echo $$presentlang; fi; \
+ done
+# This is computed as $(foreach lang, $(INST_LINGUAS), $(lang).gmo)
+CATALOGS != for lang in $(INST_LINGUAS); do echo $$lang.gmo; done
SUFFIXES = .po .gmo .nop .po-create .po-update
# This is computed as $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
POTFILES_DEPS != for file in $(POTFILES); do echo $(top_srcdir)/$$file; done
-# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(lang).po)
-POFILES = @POFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(lang).po-update)
-UPDATEPOFILES = @UPDATEPOFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(lang).nop)
-DUMMYPOFILES = @DUMMYPOFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(DOMAIN)_$(lang).properties)
-PROPERTIESFILES = @PROPERTIESFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(DOMAIN)_$(lang).class)
-CLASSFILES = @CLASSFILES@
-
-# This is computed as
-# $(foreach lang, user-specified subset of $(LINGUAS), $(DOMAIN)_$(lang).properties)
-CATALOGS = @JAVACATALOGS@
+# The set of available translations.
+ALL_LINGUAS != if test -f $(srcdir)/LINGUAS; then \
+ sed -e '/^\#/d' < $(srcdir)/LINGUAS; \
+ else \
+ echo $(LINGUAS); \
+ fi
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+POFILES != for lang in $(ALL_LINGUAS); do echo $(srcdir)/$$lang.po; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+UPDATEPOFILES != for lang in $(ALL_LINGUAS); do echo $$lang.po-update; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+DUMMYPOFILES != for lang in $(ALL_LINGUAS); do echo $$lang.nop; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(DOMAIN)_$(lang).properties)
+PROPERTIESFILES != for lang in $(ALL_LINGUAS); do echo $(srcdir)/$(DOMAIN)_$$lang.properties; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(DOMAIN)_$(lang).class)
+CLASSFILES != for lang in $(ALL_LINGUAS); do echo $(srcdir)/$(DOMAIN)_$$lang.class; done
+
+# The set of desired translations, as specified by the installer or distributor.
+DESIRED_LINGUAS = @DESIRED_LINGUAS@
+# The set of translations to install. This is computed based on $(ALL_LINGUAS)
+# and $(DESIRED_LINGUAS). It is a subset of $(ALL_LINGUAS).
+# We use the presentlang catalog if desiredlang is
+# a. equal to presentlang, or
+# b. a variant of presentlang (because in this case, presentlang can be used
+# as a fallback for messages which are not translated in the desiredlang
+# catalog).
+INST_LINGUAS != for presentlang in $(ALL_LINGUAS); do \
+ useit=false; \
+ for desiredlang in $(DESIRED_LINGUAS); do \
+ case "$$desiredlang" in \
+ "$$presentlang" | "$$presentlang"_* | "$$presentlang".* | "$$presentlang"@*) \
+ useit=true ;; \
+ esac; \
+ done; \
+ if $$useit; then echo $$presentlang; fi; \
+ done
+# This is computed as $(foreach lang, $(INST_LINGUAS), $(DOMAIN)_$(lang).properties)
+CATALOGS != for lang in $(INST_LINGUAS); do echo $(DOMAIN)_$$lang.properties; done
SUFFIXES = .po .nop .po-create .po-update
# This is computed as $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
POTFILES_DEPS != for file in $(POTFILES); do echo $(top_srcdir)/$$file; done
-# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(lang).po)
-POFILES = @POFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(lang).po-update)
-UPDATEPOFILES = @UPDATEPOFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(lang).nop)
-DUMMYPOFILES = @DUMMYPOFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(DOMAIN)_$(lang).properties)
-PROPERTIESFILES = @PROPERTIESFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(DOMAIN)_$(lang).class)
-CLASSFILES = @CLASSFILES@
-
-# This is computed as
-# $(foreach lang, user-specified subset of $(LINGUAS), $(DOMAIN)_$(lang).properties)
-CATALOGS = @JAVACATALOGS@
+# The set of available translations.
+ALL_LINGUAS != if test -f $(srcdir)/LINGUAS; then \
+ sed -e '/^\#/d' < $(srcdir)/LINGUAS; \
+ else \
+ echo $(LINGUAS); \
+ fi
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+POFILES != for lang in $(ALL_LINGUAS); do echo $(srcdir)/$$lang.po; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+UPDATEPOFILES != for lang in $(ALL_LINGUAS); do echo $$lang.po-update; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+DUMMYPOFILES != for lang in $(ALL_LINGUAS); do echo $$lang.nop; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(DOMAIN)_$(lang).properties)
+PROPERTIESFILES != for lang in $(ALL_LINGUAS); do echo $(srcdir)/$(DOMAIN)_$$lang.properties; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(DOMAIN)_$(lang).class)
+CLASSFILES != for lang in $(ALL_LINGUAS); do echo $(srcdir)/$(DOMAIN)_$$lang.class; done
+
+# The set of desired translations, as specified by the installer or distributor.
+DESIRED_LINGUAS = @DESIRED_LINGUAS@
+# The set of translations to install. This is computed based on $(ALL_LINGUAS)
+# and $(DESIRED_LINGUAS). It is a subset of $(ALL_LINGUAS).
+# We use the presentlang catalog if desiredlang is
+# a. equal to presentlang, or
+# b. a variant of presentlang (because in this case, presentlang can be used
+# as a fallback for messages which are not translated in the desiredlang
+# catalog).
+INST_LINGUAS != for presentlang in $(ALL_LINGUAS); do \
+ useit=false; \
+ for desiredlang in $(DESIRED_LINGUAS); do \
+ case "$$desiredlang" in \
+ "$$presentlang" | "$$presentlang"_* | "$$presentlang".* | "$$presentlang"@*) \
+ useit=true ;; \
+ esac; \
+ done; \
+ if $$useit; then echo $$presentlang; fi; \
+ done
+# This is computed as $(foreach lang, $(INST_LINGUAS), $(DOMAIN)_$(lang).properties)
+CATALOGS != for lang in $(INST_LINGUAS); do echo $(DOMAIN)_$$lang.properties; done
SUFFIXES = .po .nop .po-create .po-update
# This is computed as $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
POTFILES_DEPS != for file in $(POTFILES); do echo $(top_srcdir)/$$file; done
-# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(lang).po)
-POFILES = @POFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(lang).po-update)
-UPDATEPOFILES = @UPDATEPOFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(lang).nop)
-DUMMYPOFILES = @DUMMYPOFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(DOMAIN)_$(lang).properties)
-PROPERTIESFILES = @PROPERTIESFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(DOMAIN)_$(lang).class)
-CLASSFILES = @CLASSFILES@
-
-# This is computed as
-# $(foreach lang, user-specified subset of $(LINGUAS), $(DOMAIN)_$(lang).properties)
-CATALOGS = @JAVACATALOGS@
+# The set of available translations.
+ALL_LINGUAS != if test -f $(srcdir)/LINGUAS; then \
+ sed -e '/^\#/d' < $(srcdir)/LINGUAS; \
+ else \
+ echo $(LINGUAS); \
+ fi
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+POFILES != for lang in $(ALL_LINGUAS); do echo $(srcdir)/$$lang.po; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+UPDATEPOFILES != for lang in $(ALL_LINGUAS); do echo $$lang.po-update; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+DUMMYPOFILES != for lang in $(ALL_LINGUAS); do echo $$lang.nop; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(DOMAIN)_$(lang).properties)
+PROPERTIESFILES != for lang in $(ALL_LINGUAS); do echo $(srcdir)/$(DOMAIN)_$$lang.properties; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(DOMAIN)_$(lang).class)
+CLASSFILES != for lang in $(ALL_LINGUAS); do echo $(srcdir)/$(DOMAIN)_$$lang.class; done
+
+# The set of desired translations, as specified by the installer or distributor.
+DESIRED_LINGUAS = @DESIRED_LINGUAS@
+# The set of translations to install. This is computed based on $(ALL_LINGUAS)
+# and $(DESIRED_LINGUAS). It is a subset of $(ALL_LINGUAS).
+# We use the presentlang catalog if desiredlang is
+# a. equal to presentlang, or
+# b. a variant of presentlang (because in this case, presentlang can be used
+# as a fallback for messages which are not translated in the desiredlang
+# catalog).
+INST_LINGUAS != for presentlang in $(ALL_LINGUAS); do \
+ useit=false; \
+ for desiredlang in $(DESIRED_LINGUAS); do \
+ case "$$desiredlang" in \
+ "$$presentlang" | "$$presentlang"_* | "$$presentlang".* | "$$presentlang"@*) \
+ useit=true ;; \
+ esac; \
+ done; \
+ if $$useit; then echo $$presentlang; fi; \
+ done
+# This is computed as $(foreach lang, $(INST_LINGUAS), $(DOMAIN)_$(lang).properties)
+CATALOGS != for lang in $(INST_LINGUAS); do echo $(DOMAIN)_$$lang.properties; done
SUFFIXES = .po .nop .po-create .po-update
# This is computed as $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
POTFILES_DEPS != for file in $(POTFILES); do echo $(top_srcdir)/$$file; done
-# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(lang).po)
-POFILES = @POFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(lang).po-update)
-UPDATEPOFILES = @UPDATEPOFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(lang).nop)
-DUMMYPOFILES = @DUMMYPOFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(DOMAIN)_$(lang).properties)
-PROPERTIESFILES = @PROPERTIESFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(DOMAIN)_$(lang).class)
-CLASSFILES = @CLASSFILES@
-
-# This is computed as
-# $(foreach lang, user-specified subset of $(LINGUAS), $(DOMAIN)_$(lang).properties)
-CATALOGS = @JAVACATALOGS@
+# The set of available translations.
+ALL_LINGUAS != if test -f $(srcdir)/LINGUAS; then \
+ sed -e '/^\#/d' < $(srcdir)/LINGUAS; \
+ else \
+ echo $(LINGUAS); \
+ fi
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+POFILES != for lang in $(ALL_LINGUAS); do echo $(srcdir)/$$lang.po; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+UPDATEPOFILES != for lang in $(ALL_LINGUAS); do echo $$lang.po-update; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+DUMMYPOFILES != for lang in $(ALL_LINGUAS); do echo $$lang.nop; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(DOMAIN)_$(lang).properties)
+PROPERTIESFILES != for lang in $(ALL_LINGUAS); do echo $(srcdir)/$(DOMAIN)_$$lang.properties; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(DOMAIN)_$(lang).class)
+CLASSFILES != for lang in $(ALL_LINGUAS); do echo $(srcdir)/$(DOMAIN)_$$lang.class; done
+
+# The set of desired translations, as specified by the installer or distributor.
+DESIRED_LINGUAS = @DESIRED_LINGUAS@
+# The set of translations to install. This is computed based on $(ALL_LINGUAS)
+# and $(DESIRED_LINGUAS). It is a subset of $(ALL_LINGUAS).
+# We use the presentlang catalog if desiredlang is
+# a. equal to presentlang, or
+# b. a variant of presentlang (because in this case, presentlang can be used
+# as a fallback for messages which are not translated in the desiredlang
+# catalog).
+INST_LINGUAS != for presentlang in $(ALL_LINGUAS); do \
+ useit=false; \
+ for desiredlang in $(DESIRED_LINGUAS); do \
+ case "$$desiredlang" in \
+ "$$presentlang" | "$$presentlang"_* | "$$presentlang".* | "$$presentlang"@*) \
+ useit=true ;; \
+ esac; \
+ done; \
+ if $$useit; then echo $$presentlang; fi; \
+ done
+# This is computed as $(foreach lang, $(INST_LINGUAS), $(DOMAIN)_$(lang).properties)
+CATALOGS != for lang in $(INST_LINGUAS); do echo $(DOMAIN)_$$lang.properties; done
SUFFIXES = .po .nop .po-create .po-update
# This is computed as $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
POTFILES_DEPS != for file in $(POTFILES); do echo $(top_srcdir)/$$file; done
-# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(lang).po)
-POFILES = @POFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(lang).gmo)
-GMOFILES = @GMOFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(lang).po-update)
-UPDATEPOFILES = @UPDATEPOFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(lang).nop)
-DUMMYPOFILES = @DUMMYPOFILES@
-
-# This is computed as
-# $(foreach lang, user-specified subset of $(LINGUAS), $(lang).gmo)
-CATALOGS = @CATALOGS@
+# The set of available translations.
+ALL_LINGUAS != if test -f $(srcdir)/LINGUAS; then \
+ sed -e '/^\#/d' < $(srcdir)/LINGUAS; \
+ else \
+ echo $(LINGUAS); \
+ fi
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+POFILES != for lang in $(ALL_LINGUAS); do echo $(srcdir)/$$lang.po; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+GMOFILES != for lang in $(ALL_LINGUAS); do echo $(srcdir)/$$lang.gmo; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+UPDATEPOFILES != for lang in $(ALL_LINGUAS); do echo $$lang.po-update; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+DUMMYPOFILES != for lang in $(ALL_LINGUAS); do echo $$lang.nop; done
+
+# The set of desired translations, as specified by the installer or distributor.
+DESIRED_LINGUAS = @DESIRED_LINGUAS@
+# The set of translations to install. This is computed based on $(ALL_LINGUAS)
+# and $(DESIRED_LINGUAS). It is a subset of $(ALL_LINGUAS).
+# We use the presentlang catalog if desiredlang is
+# a. equal to presentlang, or
+# b. a variant of presentlang (because in this case, presentlang can be used
+# as a fallback for messages which are not translated in the desiredlang
+# catalog).
+INST_LINGUAS != for presentlang in $(ALL_LINGUAS); do \
+ useit=false; \
+ for desiredlang in $(DESIRED_LINGUAS); do \
+ case "$$desiredlang" in \
+ "$$presentlang" | "$$presentlang"_* | "$$presentlang".* | "$$presentlang"@*) \
+ useit=true ;; \
+ esac; \
+ done; \
+ if $$useit; then echo $$presentlang; fi; \
+ done
+# This is computed as $(foreach lang, $(INST_LINGUAS), $(lang).gmo)
+CATALOGS != for lang in $(INST_LINGUAS); do echo $$lang.gmo; done
SUFFIXES = .po .gmo .nop .po-create .po-update
# This is computed as $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
POTFILES_DEPS != for file in $(POTFILES); do echo $(top_srcdir)/$$file; done
-# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(lang).po)
-POFILES = @POFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(lang).gmo)
-GMOFILES = @GMOFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(lang).po-update)
-UPDATEPOFILES = @UPDATEPOFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(lang).nop)
-DUMMYPOFILES = @DUMMYPOFILES@
-
-# This is computed as
-# $(foreach lang, user-specified subset of $(LINGUAS), $(lang).gmo)
-CATALOGS = @CATALOGS@
+# The set of available translations.
+ALL_LINGUAS != if test -f $(srcdir)/LINGUAS; then \
+ sed -e '/^\#/d' < $(srcdir)/LINGUAS; \
+ else \
+ echo $(LINGUAS); \
+ fi
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+POFILES != for lang in $(ALL_LINGUAS); do echo $(srcdir)/$$lang.po; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+GMOFILES != for lang in $(ALL_LINGUAS); do echo $(srcdir)/$$lang.gmo; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+UPDATEPOFILES != for lang in $(ALL_LINGUAS); do echo $$lang.po-update; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+DUMMYPOFILES != for lang in $(ALL_LINGUAS); do echo $$lang.nop; done
+
+# The set of desired translations, as specified by the installer or distributor.
+DESIRED_LINGUAS = @DESIRED_LINGUAS@
+# The set of translations to install. This is computed based on $(ALL_LINGUAS)
+# and $(DESIRED_LINGUAS). It is a subset of $(ALL_LINGUAS).
+# We use the presentlang catalog if desiredlang is
+# a. equal to presentlang, or
+# b. a variant of presentlang (because in this case, presentlang can be used
+# as a fallback for messages which are not translated in the desiredlang
+# catalog).
+INST_LINGUAS != for presentlang in $(ALL_LINGUAS); do \
+ useit=false; \
+ for desiredlang in $(DESIRED_LINGUAS); do \
+ case "$$desiredlang" in \
+ "$$presentlang" | "$$presentlang"_* | "$$presentlang".* | "$$presentlang"@*) \
+ useit=true ;; \
+ esac; \
+ done; \
+ if $$useit; then echo $$presentlang; fi; \
+ done
+# This is computed as $(foreach lang, $(INST_LINGUAS), $(lang).gmo)
+CATALOGS != for lang in $(INST_LINGUAS); do echo $$lang.gmo; done
SUFFIXES = .po .gmo .nop .po-create .po-update
# This is computed as $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
POTFILES_DEPS != for file in $(POTFILES); do echo $(top_srcdir)/$$file; done
-# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(lang).po)
-POFILES = @POFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(lang).gmo)
-GMOFILES = @GMOFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(lang).po-update)
-UPDATEPOFILES = @UPDATEPOFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(lang).nop)
-DUMMYPOFILES = @DUMMYPOFILES@
-
-# This is computed as
-# $(foreach lang, user-specified subset of $(LINGUAS), $(lang).gmo)
-CATALOGS = @CATALOGS@
+# The set of available translations.
+ALL_LINGUAS != if test -f $(srcdir)/LINGUAS; then \
+ sed -e '/^\#/d' < $(srcdir)/LINGUAS; \
+ else \
+ echo $(LINGUAS); \
+ fi
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+POFILES != for lang in $(ALL_LINGUAS); do echo $(srcdir)/$$lang.po; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+GMOFILES != for lang in $(ALL_LINGUAS); do echo $(srcdir)/$$lang.gmo; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+UPDATEPOFILES != for lang in $(ALL_LINGUAS); do echo $$lang.po-update; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+DUMMYPOFILES != for lang in $(ALL_LINGUAS); do echo $$lang.nop; done
+
+# The set of desired translations, as specified by the installer or distributor.
+DESIRED_LINGUAS = @DESIRED_LINGUAS@
+# The set of translations to install. This is computed based on $(ALL_LINGUAS)
+# and $(DESIRED_LINGUAS). It is a subset of $(ALL_LINGUAS).
+# We use the presentlang catalog if desiredlang is
+# a. equal to presentlang, or
+# b. a variant of presentlang (because in this case, presentlang can be used
+# as a fallback for messages which are not translated in the desiredlang
+# catalog).
+INST_LINGUAS != for presentlang in $(ALL_LINGUAS); do \
+ useit=false; \
+ for desiredlang in $(DESIRED_LINGUAS); do \
+ case "$$desiredlang" in \
+ "$$presentlang" | "$$presentlang"_* | "$$presentlang".* | "$$presentlang"@*) \
+ useit=true ;; \
+ esac; \
+ done; \
+ if $$useit; then echo $$presentlang; fi; \
+ done
+# This is computed as $(foreach lang, $(INST_LINGUAS), $(lang).gmo)
+CATALOGS != for lang in $(INST_LINGUAS); do echo $$lang.gmo; done
SUFFIXES = .po .gmo .nop .po-create .po-update
# This is computed as $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
POTFILES_DEPS != for file in $(POTFILES); do echo $(top_srcdir)/$$file; done
-# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(lang).po)
-POFILES = @POFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(lang).gmo)
-GMOFILES = @GMOFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(lang).po-update)
-UPDATEPOFILES = @UPDATEPOFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(lang).nop)
-DUMMYPOFILES = @DUMMYPOFILES@
-
-# This is computed as
-# $(foreach lang, user-specified subset of $(LINGUAS), $(lang).gmo)
-CATALOGS = @CATALOGS@
+# The set of available translations.
+ALL_LINGUAS != if test -f $(srcdir)/LINGUAS; then \
+ sed -e '/^\#/d' < $(srcdir)/LINGUAS; \
+ else \
+ echo $(LINGUAS); \
+ fi
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+POFILES != for lang in $(ALL_LINGUAS); do echo $(srcdir)/$$lang.po; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+GMOFILES != for lang in $(ALL_LINGUAS); do echo $(srcdir)/$$lang.gmo; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+UPDATEPOFILES != for lang in $(ALL_LINGUAS); do echo $$lang.po-update; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+DUMMYPOFILES != for lang in $(ALL_LINGUAS); do echo $$lang.nop; done
+
+# The set of desired translations, as specified by the installer or distributor.
+DESIRED_LINGUAS = @DESIRED_LINGUAS@
+# The set of translations to install. This is computed based on $(ALL_LINGUAS)
+# and $(DESIRED_LINGUAS). It is a subset of $(ALL_LINGUAS).
+# We use the presentlang catalog if desiredlang is
+# a. equal to presentlang, or
+# b. a variant of presentlang (because in this case, presentlang can be used
+# as a fallback for messages which are not translated in the desiredlang
+# catalog).
+INST_LINGUAS != for presentlang in $(ALL_LINGUAS); do \
+ useit=false; \
+ for desiredlang in $(DESIRED_LINGUAS); do \
+ case "$$desiredlang" in \
+ "$$presentlang" | "$$presentlang"_* | "$$presentlang".* | "$$presentlang"@*) \
+ useit=true ;; \
+ esac; \
+ done; \
+ if $$useit; then echo $$presentlang; fi; \
+ done
+# This is computed as $(foreach lang, $(INST_LINGUAS), $(lang).gmo)
+CATALOGS != for lang in $(INST_LINGUAS); do echo $$lang.gmo; done
SUFFIXES = .po .gmo .nop .po-create .po-update
# This is computed as $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
POTFILES_DEPS != for file in $(POTFILES); do echo $(top_srcdir)/$$file; done
-# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(lang).po)
-POFILES = @POFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(lang).gmo)
-GMOFILES = @GMOFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(lang).po-update)
-UPDATEPOFILES = @UPDATEPOFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(lang).nop)
-DUMMYPOFILES = @DUMMYPOFILES@
-
-# This is computed as
-# $(foreach lang, user-specified subset of $(LINGUAS), $(lang).gmo)
-CATALOGS = @CATALOGS@
+# The set of available translations.
+ALL_LINGUAS != if test -f $(srcdir)/LINGUAS; then \
+ sed -e '/^\#/d' < $(srcdir)/LINGUAS; \
+ else \
+ echo $(LINGUAS); \
+ fi
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+POFILES != for lang in $(ALL_LINGUAS); do echo $(srcdir)/$$lang.po; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+GMOFILES != for lang in $(ALL_LINGUAS); do echo $(srcdir)/$$lang.gmo; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+UPDATEPOFILES != for lang in $(ALL_LINGUAS); do echo $$lang.po-update; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+DUMMYPOFILES != for lang in $(ALL_LINGUAS); do echo $$lang.nop; done
+
+# The set of desired translations, as specified by the installer or distributor.
+DESIRED_LINGUAS = @DESIRED_LINGUAS@
+# The set of translations to install. This is computed based on $(ALL_LINGUAS)
+# and $(DESIRED_LINGUAS). It is a subset of $(ALL_LINGUAS).
+# We use the presentlang catalog if desiredlang is
+# a. equal to presentlang, or
+# b. a variant of presentlang (because in this case, presentlang can be used
+# as a fallback for messages which are not translated in the desiredlang
+# catalog).
+INST_LINGUAS != for presentlang in $(ALL_LINGUAS); do \
+ useit=false; \
+ for desiredlang in $(DESIRED_LINGUAS); do \
+ case "$$desiredlang" in \
+ "$$presentlang" | "$$presentlang"_* | "$$presentlang".* | "$$presentlang"@*) \
+ useit=true ;; \
+ esac; \
+ done; \
+ if $$useit; then echo $$presentlang; fi; \
+ done
+# This is computed as $(foreach lang, $(INST_LINGUAS), $(lang).gmo)
+CATALOGS != for lang in $(INST_LINGUAS); do echo $$lang.gmo; done
SUFFIXES = .po .gmo .nop .po-create .po-update
# This is computed as $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
POTFILES_DEPS != for file in $(POTFILES); do echo $(top_srcdir)/$$file; done
-# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(lang).po)
-POFILES = @POFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(lang).gmo)
-GMOFILES = @GMOFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(lang).po-update)
-UPDATEPOFILES = @UPDATEPOFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(lang).nop)
-DUMMYPOFILES = @DUMMYPOFILES@
-
-# This is computed as
-# $(foreach lang, user-specified subset of $(LINGUAS), $(lang).gmo)
-CATALOGS = @CATALOGS@
+# The set of available translations.
+ALL_LINGUAS != if test -f $(srcdir)/LINGUAS; then \
+ sed -e '/^\#/d' < $(srcdir)/LINGUAS; \
+ else \
+ echo $(LINGUAS); \
+ fi
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+POFILES != for lang in $(ALL_LINGUAS); do echo $(srcdir)/$$lang.po; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+GMOFILES != for lang in $(ALL_LINGUAS); do echo $(srcdir)/$$lang.gmo; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+UPDATEPOFILES != for lang in $(ALL_LINGUAS); do echo $$lang.po-update; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+DUMMYPOFILES != for lang in $(ALL_LINGUAS); do echo $$lang.nop; done
+
+# The set of desired translations, as specified by the installer or distributor.
+DESIRED_LINGUAS = @DESIRED_LINGUAS@
+# The set of translations to install. This is computed based on $(ALL_LINGUAS)
+# and $(DESIRED_LINGUAS). It is a subset of $(ALL_LINGUAS).
+# We use the presentlang catalog if desiredlang is
+# a. equal to presentlang, or
+# b. a variant of presentlang (because in this case, presentlang can be used
+# as a fallback for messages which are not translated in the desiredlang
+# catalog).
+INST_LINGUAS != for presentlang in $(ALL_LINGUAS); do \
+ useit=false; \
+ for desiredlang in $(DESIRED_LINGUAS); do \
+ case "$$desiredlang" in \
+ "$$presentlang" | "$$presentlang"_* | "$$presentlang".* | "$$presentlang"@*) \
+ useit=true ;; \
+ esac; \
+ done; \
+ if $$useit; then echo $$presentlang; fi; \
+ done
+# This is computed as $(foreach lang, $(INST_LINGUAS), $(lang).gmo)
+CATALOGS != for lang in $(INST_LINGUAS); do echo $$lang.gmo; done
SUFFIXES = .po .gmo .nop .po-create .po-update
# This is computed as $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
POTFILES_DEPS != for file in $(POTFILES); do echo $(top_srcdir)/$$file; done
-# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(lang).po)
-POFILES = @POFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(lang).gmo)
-GMOFILES = @GMOFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(lang).po-update)
-UPDATEPOFILES = @UPDATEPOFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(lang).nop)
-DUMMYPOFILES = @DUMMYPOFILES@
-
-# This is computed as
-# $(foreach lang, user-specified subset of $(LINGUAS), $(lang).gmo)
-CATALOGS = @CATALOGS@
+# The set of available translations.
+ALL_LINGUAS != if test -f $(srcdir)/LINGUAS; then \
+ sed -e '/^\#/d' < $(srcdir)/LINGUAS; \
+ else \
+ echo $(LINGUAS); \
+ fi
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+POFILES != for lang in $(ALL_LINGUAS); do echo $(srcdir)/$$lang.po; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+GMOFILES != for lang in $(ALL_LINGUAS); do echo $(srcdir)/$$lang.gmo; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+UPDATEPOFILES != for lang in $(ALL_LINGUAS); do echo $$lang.po-update; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+DUMMYPOFILES != for lang in $(ALL_LINGUAS); do echo $$lang.nop; done
+
+# The set of desired translations, as specified by the installer or distributor.
+DESIRED_LINGUAS = @DESIRED_LINGUAS@
+# The set of translations to install. This is computed based on $(ALL_LINGUAS)
+# and $(DESIRED_LINGUAS). It is a subset of $(ALL_LINGUAS).
+# We use the presentlang catalog if desiredlang is
+# a. equal to presentlang, or
+# b. a variant of presentlang (because in this case, presentlang can be used
+# as a fallback for messages which are not translated in the desiredlang
+# catalog).
+INST_LINGUAS != for presentlang in $(ALL_LINGUAS); do \
+ useit=false; \
+ for desiredlang in $(DESIRED_LINGUAS); do \
+ case "$$desiredlang" in \
+ "$$presentlang" | "$$presentlang"_* | "$$presentlang".* | "$$presentlang"@*) \
+ useit=true ;; \
+ esac; \
+ done; \
+ if $$useit; then echo $$presentlang; fi; \
+ done
+# This is computed as $(foreach lang, $(INST_LINGUAS), $(lang).gmo)
+CATALOGS != for lang in $(INST_LINGUAS); do echo $$lang.gmo; done
SUFFIXES = .po .gmo .nop .po-create .po-update
# This is computed as $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
POTFILES_DEPS != for file in $(POTFILES); do echo $(top_srcdir)/$$file; done
-# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(lang).po)
-POFILES = @POFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(lang).po-update)
-UPDATEPOFILES = @UPDATEPOFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(lang).nop)
-DUMMYPOFILES = @DUMMYPOFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(frob $(lang)).msg)
-MSGFILES = @MSGFILES@
-
-# This is computed as
-# $(foreach lang, user-specified subset of $(LINGUAS), $(frob $(lang)).msg)
-CATALOGS = @TCLCATALOGS@
+# The set of available translations.
+ALL_LINGUAS != if test -f $(srcdir)/LINGUAS; then \
+ sed -e '/^\#/d' < $(srcdir)/LINGUAS; \
+ else \
+ echo $(LINGUAS); \
+ fi
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+POFILES != for lang in $(ALL_LINGUAS); do echo $(srcdir)/$$lang.po; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+UPDATEPOFILES != for lang in $(ALL_LINGUAS); do echo $$lang.po-update; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+DUMMYPOFILES != for lang in $(ALL_LINGUAS); do echo $$lang.nop; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
+# It also creates the .tcl-rules file.
+MSGFILES != tab=`printf '\t'`; \
+ for lang in $(ALL_LINGUAS); do \
+ frobbedlang=`echo $$lang | sed -e 's/\..*$$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`; \
+ echo 1>&3 "$$frobbedlang.msg: $$lang.po"; \
+ echo 1>&3 "$${tab}@echo \"\$$(MSGFMT) -c --tcl -d \$$(srcdir) -l $$lang \$$(srcdir)/$$lang.po\"; \\"; \
+ echo 1>&3 "$${tab}\$$(MSGFMT) -c --tcl -d \"\$$(srcdir)\" -l $$lang \$$(srcdir)/$$lang.po || { rm -f \"\$$(srcdir)/$$frobbedlang.msg\"; exit 1; }"; \
+ echo $(srcdir)/$$frobbedlang.msg; \
+ done 3> .tcl-rules
+# Include the generated rules that cannot be formulated as a simple rule.
+-include .tcl-rules
+
+# The set of desired translations, as specified by the installer or distributor.
+DESIRED_LINGUAS = @DESIRED_LINGUAS@
+# The set of translations to install. This is computed based on $(ALL_LINGUAS)
+# and $(DESIRED_LINGUAS). It is a subset of $(ALL_LINGUAS).
+# We use the presentlang catalog if desiredlang is
+# a. equal to presentlang, or
+# b. a variant of presentlang (because in this case, presentlang can be used
+# as a fallback for messages which are not translated in the desiredlang
+# catalog).
+INST_LINGUAS != for presentlang in $(ALL_LINGUAS); do \
+ useit=false; \
+ for desiredlang in $(DESIRED_LINGUAS); do \
+ case "$$desiredlang" in \
+ "$$presentlang" | "$$presentlang"_* | "$$presentlang".* | "$$presentlang"@*) \
+ useit=true ;; \
+ esac; \
+ done; \
+ if $$useit; then echo $$presentlang; fi; \
+ done
+# This is computed as $(foreach lang, $(INST_LINGUAS), $(frob $(lang)).msg)
+CATALOGS != for lang in $(INST_LINGUAS); do \
+ frobbedlang=`echo $$lang | sed -e 's/\..*$$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`; \
+ echo $$frobbedlang.gmo; \
+ done
SUFFIXES = .nop .po-create .po-update
html ID:
+DISTCLEANFILES = .tcl-rules
+
MOSTLYCLEANFILES =
MOSTLYCLEANFILES += stamp-poT
MOSTLYCLEANFILES += core core.* *.stackdump $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
# This is computed as $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
POTFILES_DEPS != for file in $(POTFILES); do echo $(top_srcdir)/$$file; done
-# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(lang).po)
-POFILES = @POFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(lang).po-update)
-UPDATEPOFILES = @UPDATEPOFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(lang).nop)
-DUMMYPOFILES = @DUMMYPOFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(frob $(lang)).msg)
-MSGFILES = @MSGFILES@
-
-# This is computed as
-# $(foreach lang, user-specified subset of $(LINGUAS), $(frob $(lang)).msg)
-CATALOGS = @TCLCATALOGS@
+# The set of available translations.
+ALL_LINGUAS != if test -f $(srcdir)/LINGUAS; then \
+ sed -e '/^\#/d' < $(srcdir)/LINGUAS; \
+ else \
+ echo $(LINGUAS); \
+ fi
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+POFILES != for lang in $(ALL_LINGUAS); do echo $(srcdir)/$$lang.po; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+UPDATEPOFILES != for lang in $(ALL_LINGUAS); do echo $$lang.po-update; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+DUMMYPOFILES != for lang in $(ALL_LINGUAS); do echo $$lang.nop; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
+# It also creates the .tcl-rules file.
+MSGFILES != tab=`printf '\t'`; \
+ for lang in $(ALL_LINGUAS); do \
+ frobbedlang=`echo $$lang | sed -e 's/\..*$$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`; \
+ echo 1>&3 "$$frobbedlang.msg: $$lang.po"; \
+ echo 1>&3 "$${tab}@echo \"\$$(MSGFMT) -c --tcl -d \$$(srcdir) -l $$lang \$$(srcdir)/$$lang.po\"; \\"; \
+ echo 1>&3 "$${tab}\$$(MSGFMT) -c --tcl -d \"\$$(srcdir)\" -l $$lang \$$(srcdir)/$$lang.po || { rm -f \"\$$(srcdir)/$$frobbedlang.msg\"; exit 1; }"; \
+ echo $(srcdir)/$$frobbedlang.msg; \
+ done 3> .tcl-rules
+# Include the generated rules that cannot be formulated as a simple rule.
+-include .tcl-rules
+
+# The set of desired translations, as specified by the installer or distributor.
+DESIRED_LINGUAS = @DESIRED_LINGUAS@
+# The set of translations to install. This is computed based on $(ALL_LINGUAS)
+# and $(DESIRED_LINGUAS). It is a subset of $(ALL_LINGUAS).
+# We use the presentlang catalog if desiredlang is
+# a. equal to presentlang, or
+# b. a variant of presentlang (because in this case, presentlang can be used
+# as a fallback for messages which are not translated in the desiredlang
+# catalog).
+INST_LINGUAS != for presentlang in $(ALL_LINGUAS); do \
+ useit=false; \
+ for desiredlang in $(DESIRED_LINGUAS); do \
+ case "$$desiredlang" in \
+ "$$presentlang" | "$$presentlang"_* | "$$presentlang".* | "$$presentlang"@*) \
+ useit=true ;; \
+ esac; \
+ done; \
+ if $$useit; then echo $$presentlang; fi; \
+ done
+# This is computed as $(foreach lang, $(INST_LINGUAS), $(frob $(lang)).msg)
+CATALOGS != for lang in $(INST_LINGUAS); do \
+ frobbedlang=`echo $$lang | sed -e 's/\..*$$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`; \
+ echo $$frobbedlang.gmo; \
+ done
SUFFIXES = .nop .po-create .po-update
html ID:
+DISTCLEANFILES = .tcl-rules
+
MOSTLYCLEANFILES =
MOSTLYCLEANFILES += stamp-poT
MOSTLYCLEANFILES += core core.* *.stackdump $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
# This is computed as $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
POTFILES_DEPS != for file in $(POTFILES); do echo $(top_srcdir)/$$file; done
-# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(lang).po)
-POFILES = @POFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(lang).gmo)
-GMOFILES = @GMOFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(lang).po-update)
-UPDATEPOFILES = @UPDATEPOFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(lang).nop)
-DUMMYPOFILES = @DUMMYPOFILES@
-
-# This is computed as
-# $(foreach lang, user-specified subset of $(LINGUAS), $(lang).gmo)
-CATALOGS = @CATALOGS@
+# The set of available translations.
+ALL_LINGUAS != if test -f $(srcdir)/LINGUAS; then \
+ sed -e '/^\#/d' < $(srcdir)/LINGUAS; \
+ else \
+ echo $(LINGUAS); \
+ fi
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+POFILES != for lang in $(ALL_LINGUAS); do echo $(srcdir)/$$lang.po; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+GMOFILES != for lang in $(ALL_LINGUAS); do echo $(srcdir)/$$lang.gmo; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+UPDATEPOFILES != for lang in $(ALL_LINGUAS); do echo $$lang.po-update; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+DUMMYPOFILES != for lang in $(ALL_LINGUAS); do echo $$lang.nop; done
+
+# The set of desired translations, as specified by the installer or distributor.
+DESIRED_LINGUAS = @DESIRED_LINGUAS@
+# The set of translations to install. This is computed based on $(ALL_LINGUAS)
+# and $(DESIRED_LINGUAS). It is a subset of $(ALL_LINGUAS).
+# We use the presentlang catalog if desiredlang is
+# a. equal to presentlang, or
+# b. a variant of presentlang (because in this case, presentlang can be used
+# as a fallback for messages which are not translated in the desiredlang
+# catalog).
+INST_LINGUAS != for presentlang in $(ALL_LINGUAS); do \
+ useit=false; \
+ for desiredlang in $(DESIRED_LINGUAS); do \
+ case "$$desiredlang" in \
+ "$$presentlang" | "$$presentlang"_* | "$$presentlang".* | "$$presentlang"@*) \
+ useit=true ;; \
+ esac; \
+ done; \
+ if $$useit; then echo $$presentlang; fi; \
+ done
+# This is computed as $(foreach lang, $(INST_LINGUAS), $(lang).gmo)
+CATALOGS != for lang in $(INST_LINGUAS); do echo $$lang.gmo; done
SUFFIXES = .po .gmo .nop .po-create .po-update
# This is computed as $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
POTFILES_DEPS != for file in $(POTFILES); do echo $(top_srcdir)/$$file; done
-# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(lang).po)
-POFILES = @POFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(lang).po-update)
-UPDATEPOFILES = @UPDATEPOFILES@
-# This is computed as $(foreach lang, $(LINGUAS), $(lang).nop)
-DUMMYPOFILES = @DUMMYPOFILES@
+# The set of available translations.
+ALL_LINGUAS != if test -f $(srcdir)/LINGUAS; then \
+ sed -e '/^\#/d' < $(srcdir)/LINGUAS; \
+ else \
+ echo $(LINGUAS); \
+ fi
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+POFILES != for lang in $(ALL_LINGUAS); do echo $(srcdir)/$$lang.po; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+UPDATEPOFILES != for lang in $(ALL_LINGUAS); do echo $$lang.po-update; done
+# This is computed as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+DUMMYPOFILES != for lang in $(ALL_LINGUAS); do echo $$lang.nop; done
SUFFIXES = .po .nop .po-update