~ubuntu-branches/ubuntu/utopic/coreutils/utopic-proposed

« back to all changes in this revision

Viewing changes to m4/po.m4

  • Committer: Colin Watson
  • Date: 2013-10-30 15:48:33 UTC
  • mfrom: (8.3.5 sid)
  • Revision ID: cjwatson@canonical.com-20131030154833-xdt6e1yfffqom1c4
merge from Debian 8.21-1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# po.m4 serial 17 (gettext-0.18)
2
 
dnl Copyright (C) 1995-2010 Free Software Foundation, Inc.
 
1
# po.m4 serial 17c
 
2
dnl Copyright (C) 1995-2013 Free Software Foundation, Inc.
3
3
dnl This file is free software; the Free Software Foundation
4
4
dnl gives unlimited permission to copy and/or distribute it,
5
5
dnl with or without modifications, as long as this notice is preserved.
24
24
[
25
25
  AC_REQUIRE([AC_PROG_MAKE_SET])dnl
26
26
  AC_REQUIRE([AC_PROG_INSTALL])dnl
27
 
  AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
 
27
  AC_REQUIRE([AC_PROG_MKDIR_P])dnl
28
28
  AC_REQUIRE([AM_NLS])dnl
29
29
 
30
30
  dnl Release version of the gettext macros. This is used to ensure that
118
118
        if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
119
119
          rm -f "$ac_dir/POTFILES"
120
120
          test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
121
 
          cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[   ]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
 
121
          gt_tab=`printf '\t'`
 
122
          cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
122
123
          POMAKEFILEDEPS="POTFILES.in"
123
124
          # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
124
125
          # on $ac_dir but don't depend on user-specified configuration
129
130
              test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
130
131
            fi
131
132
            ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
132
 
            # Hide the ALL_LINGUAS assigment from automake < 1.5.
 
133
            # Hide the ALL_LINGUAS assignment from automake < 1.5.
133
134
            eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
134
135
            POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
135
136
          else
136
137
            # The set of available languages was given in configure.in.
137
 
            # Hide the ALL_LINGUAS assigment from automake < 1.5.
 
138
            # Hide the ALL_LINGUAS assignment from automake < 1.5.
138
139
            eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
139
140
          fi
140
141
          # Compute POFILES
254
255
  fi
255
256
 
256
257
  # A sed script that extracts the value of VARIABLE from a Makefile.
 
258
  tab=`printf '\t'`
257
259
  sed_x_variable='
258
260
# Test if the hold space is empty.
259
261
x
261
263
x
262
264
ta
263
265
# Yes it was empty. Look if we have the expected variable definition.
264
 
/^[      ]*VARIABLE[     ]*=/{
 
266
/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=/{
265
267
  # Seen the first line of the variable definition.
266
 
  s/^[   ]*VARIABLE[     ]*=//
 
268
  s/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=//
267
269
  ba
268
270
}
269
271
bd
315
317
    sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
316
318
    ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
317
319
  fi
318
 
  # Hide the ALL_LINGUAS assigment from automake < 1.5.
 
320
  # Hide the ALL_LINGUAS assignment from automake < 1.5.
319
321
  eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
320
322
  # Compute POFILES
321
323
  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
405
407
  fi
406
408
 
407
409
  sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -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"
 
410
  tab=`printf '\t'`
408
411
  if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
409
412
    # Add dependencies that cannot be formulated as a simple suffix rule.
410
413
    for lang in $ALL_LINGUAS; do
411
414
      frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
412
415
      cat >> "$ac_file.tmp" <<EOF
413
416
$frobbedlang.msg: $lang.po
414
 
        @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
415
 
        \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
 
417
${tab}@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
 
418
${tab}\$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
416
419
EOF
417
420
    done
418
421
  fi
422
425
      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/'`
423
426
      cat >> "$ac_file.tmp" <<EOF
424
427
$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
425
 
        @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
426
 
        \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
 
428
${tab}@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
 
429
${tab}\$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
427
430
EOF
428
431
    done
429
432
  fi