]> Dogcows Code - chaz/tar/blobdiff - bootstrap
Minor fix
[chaz/tar] / bootstrap
index b54810c0b308f275720e1a372ba66196f484566a..c250cf05bdfb1854e6191d56b8aa4852d1b3296a 100755 (executable)
--- a/bootstrap
+++ b/bootstrap
@@ -109,7 +109,10 @@ get_translations() {
   po_file=$3
 
   echo "$0: getting translations into $subdir for $domain..."
-  (cd $subdir && rm -f dummy `ls | sed -n '/\.gmo$/p; /\.po/p'`) &&
+
+  case $po_file in
+  '') (cd $subdir && rm -f dummy `ls | sed -n '/\.gmo$/p; /\.po/p'`);;
+  esac &&
 
   $WGET_COMMAND -O "$subdir/$domain.html" "$TP_URL$domain" &&
 
@@ -123,11 +126,11 @@ get_translations() {
   awk -v domain="$domain" -v po_file="$po_file" -v subdir="$subdir" '
     {
       lang = $1
-      if (po_file == (lang ".po")) next
+      if (po_file && po_file != (lang ".po")) next
 
       # Work around bugs in translations uncovered by gettext 0.15.
       # This workaround can be removed once the translations are fixed.
-      if (lang == "hu" || lang == "ja" || lang == "ky" || lang == "zh_TW") next
+      if (lang == "hu" || lang == "zh_TW") next
 
       ver = $2
       urlfmt = ""
@@ -146,10 +149,7 @@ update_po() {
     *.po)  POFILE=$1;;
     *)     POFILE=${1}.po;;
     esac
-    get_translations po $package "$POFILE" &&
-    LANG=`expr $POFILE : '\(.*\)\.po'` &&
-    { grep -q $LANG po/LINGUAS ||
-        (echo $LANG; cat po/LINGUAS) | sort -o po/LINGUAS; }
+    get_translations po $package "$POFILE"
   else
     get_translations po $package
   fi
@@ -266,7 +266,7 @@ copy_files ${PAXUTILS_SRCDIR}/m4 m4
 echo "$0: Creating m4/paxutils.m4"
 (echo "# This file is generated automatically. Please, do not edit."
  echo "#"
- echo "AC_DEFUN([tar_PAXUTILS],["
+ echo "AC_DEFUN([${package}_PAXUTILS],["
  cat ${PAXUTILS_SRCDIR}/m4/DISTFILES | sed '/^#/d;s/\(.*\)\.m4/pu_\1/' | tr a-z A-Z
  echo "])") > ./m4/paxutils.m4
 
@@ -336,7 +336,7 @@ sed '
 echo "$0: Creating m4/gnulib.m4"
 (echo "# This file is generated automatically. Please, do not edit."
  echo "#"
- echo "AC_DEFUN([tar_GNULIB],["
+ echo "AC_DEFUN([${package}_GNULIB],["
  for gnulib_module in $gnulib_modules; do
     echo "# $gnulib_module"
     $gnulib_tool --extract-autoconf-snippet $gnulib_module
@@ -350,7 +350,7 @@ echo "$0: Creating lib/Makefile.am"
  for gnulib_module in $gnulib_modules; do
     echo "# $gnulib_module"
     $gnulib_tool --extract-automake-snippet $gnulib_module
- done | sed 's/lib_SOURCES/libtar_a_SOURCES/g' ) > lib/Makefile.am
+ done | sed "s/lib_SOURCES/lib${package}_a_SOURCES/g" ) > lib/Makefile.am
 
 # Get translations.
 if test "$DOWNLOAD_PO" = "yes"; then
@@ -369,8 +369,6 @@ intl_files_to_remove='
   m4/glibc2.m4
   m4/intdiv0.m4
   m4/intmax.m4
-  m4/inttypes-h.m4
-  m4/inttypes-pri.m4
   m4/lcmessage.m4
   m4/lock.m4
   m4/printf-posix.m4
@@ -381,6 +379,7 @@ rm -fr $intl_files_to_remove || exit
 
 
 # Undo changes to gnulib files that autoreconf made.
+
 for gnulib_file in $gnulib_files; do
   test ! -f $gnulib_file || cmp -s $gnulib_file $GNULIB_SRCDIR/$gnulib_file || {
     rm -f $gnulib_file &&
@@ -403,10 +402,25 @@ do
 done
 
 
-# Put bug-reporting address into po/Makevars.
-echo "$0: sed '/^MSGID_BUGS_ADDRESS *=/s/=.*/= bug-$package@gnu.org/' po/Makevars.template >po/Makevars ..."
-sed '/^MSGID_BUGS_ADDRESS *=/s/=.*/= bug-'"$package"'@gnu.org/' po/Makevars.template >po/Makevars
-
+# Create gettext configuration.
+echo "$0: Creating po/Makevars from po/Makevars.template ..."
+sed '
+  /^MSGID_BUGS_ADDRESS *=/s/=.*/= bug-'"$package"'@gnu.org/
+  /^XGETTEXT_OPTIONS *=/{
+    s/$/ \\/
+    a\
+       --flag=_:1:pass-c-format \\\
+       --flag=N_:1:pass-c-format \\\
+       --flag=error:3:c-format --flag=error_at_line:5:c-format \\\
+       --flag=asnprintf:3:c-format --flag=vasnprintf:3:c-format \\\
+       --flag=argp_error:2:c-format \\\
+       --flag=__argp_error:2:c-format \\\
+       --flag=argp_failure:4:c-format \\\
+       --flag=__argp_failure:4:c-format \\\
+       --flag=argp_fmtstream_printf:2:c-format \\\
+       --flag=__argp_fmtstream_printf:2:c-format
+  }
+' po/Makevars.template >po/Makevars
 
 
 echo "$0: done.  Now you can run './configure'."
This page took 0.026388 seconds and 4 git commands to generate.