]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
build: Read LINGUAS at 'make' time, not at 'configure' time.
authorBruno Haible <bruno@clisp.org>
Fri, 6 Dec 2024 20:35:08 +0000 (21:35 +0100)
committerBruno Haible <bruno@clisp.org>
Sat, 7 Dec 2024 04:49:37 +0000 (05:49 +0100)
* 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.

24 files changed:
gettext-runtime/m4/po.m4
gettext-runtime/po/Makefile.in.in
gettext-tools/examples/hello-c++-qt/po/Makefile.am
gettext-tools/examples/hello-c++-wxwidgets/po/Makefile.am
gettext-tools/examples/hello-clisp/po/Makefile.am
gettext-tools/examples/hello-csharp-forms/po/Makefile.am
gettext-tools/examples/hello-csharp/po/Makefile.am
gettext-tools/examples/hello-gawk/po/Makefile.am
gettext-tools/examples/hello-guile/po/Makefile.am
gettext-tools/examples/hello-java-awt/po/Makefile.am
gettext-tools/examples/hello-java-qtjambi/po/Makefile.am
gettext-tools/examples/hello-java-swing/po/Makefile.am
gettext-tools/examples/hello-java/po/Makefile.am
gettext-tools/examples/hello-librep/po/Makefile.am
gettext-tools/examples/hello-pascal/po/Makefile.am
gettext-tools/examples/hello-perl/po/Makefile.am
gettext-tools/examples/hello-php/po/Makefile.am
gettext-tools/examples/hello-python/po/Makefile.am
gettext-tools/examples/hello-sh/po/Makefile.am
gettext-tools/examples/hello-smalltalk/po/Makefile.am
gettext-tools/examples/hello-tcl-tk/po/Makefile.am
gettext-tools/examples/hello-tcl/po/Makefile.am
gettext-tools/examples/hello-ycp/po/Makefile.am
gettext-tools/examples/po/Makefile.am

index d90001ce57499d04516d81c781d0013014ad7b84..53ee71f7fa192fad945f96a4a5f79f0efd17bb94 100644 (file)
@@ -98,6 +98,16 @@ changequote([,])dnl
   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...]]"
@@ -113,88 +123,16 @@ changequote([,])dnl
         # 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
@@ -207,220 +145,23 @@ changequote([,])dnl
         ;;
       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
index d2f3a5661e353ce21d3998e6cc079ed89aaa56db..0537642a57761ae629212af2861bc0a20cba3d87 100644 (file)
@@ -76,22 +76,53 @@ MSGINIT = msginit
 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_)
index 35eb52013ac0f4325075aa7517b5d1c226d44663..e8e8aec9aa1ab71a04a2a844b219e8e814993961 100644 (file)
@@ -74,18 +74,42 @@ MSGFILTER = msgfilter
 # 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
 
index f790353093af72f6b4c32995195a113cb3701b49..d870b48dea72d084f4d2d1c61eed923b0ab05837 100644 (file)
@@ -77,18 +77,42 @@ MSGFILTER = msgfilter
 # 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
 
index 3455fda8506c805faae67b5c661ec7913d23d582..828546122da05a5050f7fe0813b4a049c7573e55 100644 (file)
@@ -71,18 +71,42 @@ MSGFILTER = msgfilter
 # 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
 
index fcf89a3ec637d83039a88af34a2e5f7ce990aeb1..421d1c721889d6471158153ccd284f52236a4518 100644 (file)
@@ -69,18 +69,55 @@ MSGFILTER = msgfilter
 # 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
 
@@ -259,6 +296,8 @@ uninstall-local-yes:
 
 html ID:
 
+DISTCLEANFILES = .csharp-rules
+
 MOSTLYCLEANFILES =
 MOSTLYCLEANFILES += stamp-poT
 MOSTLYCLEANFILES += core core.* *.stackdump $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
index fcf89a3ec637d83039a88af34a2e5f7ce990aeb1..421d1c721889d6471158153ccd284f52236a4518 100644 (file)
@@ -69,18 +69,55 @@ MSGFILTER = msgfilter
 # 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
 
@@ -259,6 +296,8 @@ uninstall-local-yes:
 
 html ID:
 
+DISTCLEANFILES = .csharp-rules
+
 MOSTLYCLEANFILES =
 MOSTLYCLEANFILES += stamp-poT
 MOSTLYCLEANFILES += core core.* *.stackdump $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
index 1e2bff30162a76a8c2436c856a35172045e804b3..6659d3b83abe88770d376036b4e07db2728bb773 100644 (file)
@@ -71,18 +71,42 @@ MSGFILTER = msgfilter
 # 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
 
index 7d6fdd20416d2da4339163254aa8e84b7137dfb2..b1d2ee2bc54afcfc50a0b1efee175baf7104c27f 100644 (file)
@@ -71,18 +71,42 @@ MSGFILTER = msgfilter
 # 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
 
index b72aebf87b6d2c7e5bbb8d5496b3667a570d9920..d8a6f4b5fa910b44cd87b055f027db7033a4bd83 100644 (file)
@@ -68,20 +68,44 @@ MSGFILTER = msgfilter
 # 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
 
index b72aebf87b6d2c7e5bbb8d5496b3667a570d9920..d8a6f4b5fa910b44cd87b055f027db7033a4bd83 100644 (file)
@@ -68,20 +68,44 @@ MSGFILTER = msgfilter
 # 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
 
index b72aebf87b6d2c7e5bbb8d5496b3667a570d9920..d8a6f4b5fa910b44cd87b055f027db7033a4bd83 100644 (file)
@@ -68,20 +68,44 @@ MSGFILTER = msgfilter
 # 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
 
index b72aebf87b6d2c7e5bbb8d5496b3667a570d9920..d8a6f4b5fa910b44cd87b055f027db7033a4bd83 100644 (file)
@@ -68,20 +68,44 @@ MSGFILTER = msgfilter
 # 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
 
index 0caae68fc22390c79f7fb13084d4a3f82e2ee9f4..3e4180edfe6d50cd45c427a74b5f0fb8409ca735 100644 (file)
@@ -71,18 +71,42 @@ MSGFILTER = msgfilter
 # 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
 
index 91eec4d828dc69dde2e4bdc16234a36144b2036f..7d58485a85009366bef8d06e4c523dc9d4148ba8 100644 (file)
@@ -71,18 +71,42 @@ MSGFILTER = msgfilter
 # 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
 
index 15d18746d90a144afb33bb1797009664bf76523f..8a78965fb05dbdbdbe83640445422db4f64e70b0 100644 (file)
@@ -81,18 +81,42 @@ MSGFILTER = msgfilter
 # 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
 
index 47d02b42ce9cd3cf30dd8c62a12f643f1d024d03..db7a0aaaee4f26ee10a8721efb9f5f3e4563a356 100644 (file)
@@ -71,18 +71,42 @@ MSGFILTER = msgfilter
 # 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
 
index b13a68a405d447314906f9bdeee194c69184fe69..4acd1e2b7f0b47abd2bf05c8080ecb33d327b158 100644 (file)
@@ -71,18 +71,42 @@ MSGFILTER = msgfilter
 # 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
 
index e4702cbcea0a58d039c5409521807977211dbe9f..04b2cab545bd454d2b4ebc45e3c4142740aa254e 100644 (file)
@@ -71,18 +71,42 @@ MSGFILTER = msgfilter
 # 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
 
index f33f4b5ba663045c3df78af2bf3f11471bf6cdd9..3938cb88f8e4a9adf620d18d64e02298ad3eb18b 100644 (file)
@@ -71,18 +71,42 @@ MSGFILTER = msgfilter
 # 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
 
index 5ac95cf22acde361701d211be6927059f2f0766c..53a8c569f91fbad351f31a2d6169b4f29dbf821d 100644 (file)
@@ -67,18 +67,55 @@ MSGFILTER = msgfilter
 # 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
 
@@ -253,6 +290,8 @@ uninstall-local-yes:
 
 html ID:
 
+DISTCLEANFILES = .tcl-rules
+
 MOSTLYCLEANFILES =
 MOSTLYCLEANFILES += stamp-poT
 MOSTLYCLEANFILES += core core.* *.stackdump $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
index 5ac95cf22acde361701d211be6927059f2f0766c..53a8c569f91fbad351f31a2d6169b4f29dbf821d 100644 (file)
@@ -67,18 +67,55 @@ MSGFILTER = msgfilter
 # 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
 
@@ -253,6 +290,8 @@ uninstall-local-yes:
 
 html ID:
 
+DISTCLEANFILES = .tcl-rules
+
 MOSTLYCLEANFILES =
 MOSTLYCLEANFILES += stamp-poT
 MOSTLYCLEANFILES += core core.* *.stackdump $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
index a0921b2902e1a7f053a57c8377d76a201487726f..b07ad0556dc7d2e46b661ce3b9b460d168463b88 100644 (file)
@@ -71,18 +71,42 @@ MSGFILTER = msgfilter
 # 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
 
index 2bacff0f6ab4f867d7112ec43d3385f6e2cbb342..de95dcbe1a89b6db4f0bb415265e17ff41a297bb 100644 (file)
@@ -147,12 +147,18 @@ MSGFILTER = msgfilter
 # 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